Visual Studio crashes when I debug a project with a certain form open in design mode..."Catastrophic failure"
Asked Answered
C

1

3

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?

Choanocyte answered 3/3, 2010 at 23:33 Comment(2)
I have no insights as to why that would be happening, maybe some code in your form is causing issues.. Other than that, I'd just like to say, the debugger fails regardless.. and i just make sure all my exceptions are handled and returned to me through my application, and just build & run in release modeLawtun
You are going to need help from Microsoft Support to narrow this down. They won't solve it unless you can send them your project.Denbrook
A
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

Ash answered 23/2, 2012 at 9:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.