views:

32

answers:

2

I have a .NET application that makes calls to a native Win32 DLL using interop services. When I run this program, it will crash somewhere inside the DLL. However, I have been unable to get any stack dump information.

When I run in the Visual Studio debugger, the debugger exits when the crash happens. I get the "Blah-blah-app has stopped working. Windows is checking for a solution to the problem...". If I click the Debug button that appears, I get an error message saying that the process is already open in a debugger, but the debugger from which I launched the app is not functional.

I have tried to enable local crash dumps, following the instructions here: Collecting User-Mode Dumps. However, no crash dump is generated, and I notice that the page says "Applications that do their own custom crash reporting, including .NET applications, are not supported by this feature."

+2  A: 

It sounds like you are using managed debugging which is the default setting for managed projects. If you're having a crash in a native DLL you'll need to enable mixed mode debugging to get the events and stacks you're looking for.

  • Right Click on the project and Select Properties
  • Go to the Debug Tab
  • Check the "Enable Unmanaged Debugging" checkbox

Repeat your scenario.

JaredPar
A: 

Install the Debugging Tools for Windows from the SDK and use windbg.exe to debug the program.

Kristopher Johnson