Visual Studio crashes when I debug a project with a certain form open in design mode…“Catastrophic failure”

时光怂恿深爱的人放手 提交于 2019-12-10 20:25:47

问题


As the title says, VS2008 keeps crashing on me whenever I debug a project when a certain form is open. I attached another VS2008 instance to it and found the following exception to be the culprit:

System.Runtime.InteropServices.COMException occurred
  Message="Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))"
  Source="mscorlib"
  ErrorCode=-2147418113
  StackTrace:
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
       at Microsoft.VisualStudio.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
  InnerException: 

The problem I'm having is that I have no idea why this would happen. We use a few COM components (this is an old version of software I'm updating), but they don't cause any exceptions when the program is actually running, or when viewing design view normally. Only when I debug when the form is open. The program itself runs fine when debugging after VS's crash, but Visual Studio itself is hosed.

I know the simplest answer is to "make sure that form is closed!" but it takes forever to load and it's a much smoother workflow to keep it open (plus, I don't always remember to close it!)

So, has anyone run into this? Does anyone have any ideas why this might be happening?


回答1:


You could try to 'refresh' you IDE istallation by command line:

devenv.exe /setup 

/setup - Forces Visual Studio to merge resource metadata that describes menus, toolbars, and command groups, from all VSPackages available.

or run it with detailed logging to see what's happened:

devenv.exe /log

/log - Starts Visual Studio and logs all activity to the log file.

See MSDN: Devenv Command Line Switches for the rest of supported Visual Studio IDE switches



来源:https://stackoverflow.com/questions/2375869/visual-studio-crashes-when-i-debug-a-project-with-a-certain-form-open-in-design

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!