【问题标题】:Visual Studio crashes when typing in editor在编辑器中键入时 Visual Studio 崩溃
【发布时间】:2011-06-15 01:25:55
【问题描述】:

我已经使用 VS2010 几个星期了,但在过去的几天里,它完全无法使用。当我在编辑器中输入任何内容时,Visual Studio 会引发异常,然后我会收到很多智能错误(代码很好,如果我在尝试使用编辑器之前运行,我可以编译它) - 这是日志消息:

  <entry>
    <record>241</record>
    <time>2011/01/25 08:30:34.109</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.InvalidCastException: Unable to cast COM object of type &apos;System.__ComObject&apos; to interface type &apos;Microsoft.VisualStudio.TextManager.Interop.IVsTextReplaceEvents&apos;. This operation failed because the QueryInterface call on the COM component for the interface with IID &apos;{CF9928D9-65AE-4319-A446-94ED5C45ECDE}&apos; failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).&#x000D;&#x000A;   at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean&amp; pfNeedsRelease)&#x000D;&#x000A;   at Microsoft.VisualStudio.TextManager.Interop.IVsTextReplaceEvents.OnReplace(ChangeInput[] pCI)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.OnTextBufferChangedHighPriority(Object sender, TextContentChangedEventArgs e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)</description>
  </entry>
  <entry>
    <record>242</record>
    <time>2011/01/25 08:30:34.125</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.InvalidCastException: Unable to cast COM object of type &apos;System.__ComObject&apos; to interface type &apos;Microsoft.VisualStudio.Editor.Implementation.IVsTextStreamEvents_Private&apos;. This operation failed because the QueryInterface call on the COM component for the interface with IID &apos;{96FC7D44-BCDD-4F00-AE4D-07E26B2C0E52}&apos; failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).&#x000D;&#x000A;   at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean&amp; pfNeedsRelease)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.IVsTextStreamEvents_Private.OnChangeStreamText(Int32 iPos, Int32 iOldLen, Int32 iNewLen, Int32 fLast)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.OnTextBufferChanged(Object sender, TextContentChangedEventArgs e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)</description>
  </entry>

【问题讨论】:

  • 那么 VS 什么时候真正崩溃了?

标签: visual-studio-2010 editor crash intellisense


【解决方案1】:

这似乎是由于您计算机上的注册表中缺少某些信息。如果您访问 MS Connect website,您会发现有关此问题的讨论以及似乎是解决方案的方法。

解决方案(从该页面复制):

使用regedit查看以下键:

在 32 位 Windows 上:[HKEY_CLASSES_ROOT\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}\InProcServer32]
在 64 位 Windows 上:[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}\InProcServer32]

“(默认)”值应为以下之一:
在 32 位 Windows 上:"C:\Program Files\Common Files\Microsoft Shared\MSEnv\TextMgrP.dll"
在 64 位 Windows 上:"C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\TextMgrP.dll"

【讨论】:

  • 这非常有效。我在 Visual Studio 2012 中突然遇到了上述问题,这解决了它。
  • 这个密钥已经存在于我的系统上,但 VS2017 仍然会立即崩溃输入 VB.NET 代码(即使是在新创建的项目中)。这种行为日复一日。
【解决方案2】:

看起来像是扩展或添加的问题。将它们全部禁用,然后一一重新启用,看看其中一个是否起作用..

【讨论】:

  • ho1 的回答是正确的;这是与注册表中缺少的条目相关的错误,而不是扩展。
  • 感谢您的回复,这阻止了VD崩溃,但智能仍然疯狂了一段时间,但现在似乎已经解决了,感谢您的帮助!
  • 使用几个月后开始出现问题,我认为是VS扩展没有正确安装/卸载的问题(我怀疑我尝试过的逆向工程师扩展之一)
  • 就我而言,这没有任何改变。即使在安全模式下启动,VS 也会立即崩溃。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2010-09-24
  • 2016-03-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-06-28
  • 1970-01-01
相关资源
最近更新 更多