views:

87

answers:

1

I have a .NET Windows service that appears to be crashing due to C00000005 (access violation--according to Dr Watson). When I attach the VS debugger to it--whether I build it with or without symbols--the VS debugger just stops when the service crashes, instead of stopping to give me a chance to do any investigation.

  1. Is that to be expected, or am I doing something wrong?
  2. Will using WinDbg let me do something more in real time (obviously, WinDbg lets me do crash dump analysis)?

Thanks!

A: 

You should go to the exceptions window (Debug -> Exceptions) and select the Thrown check box for that exception in the Win32 Exceptions. Moreover, pay attention that you are debugging Native Code (see the attached to combo box in the attach to process window.

Ikaso
@Christopher: Did my answer help you?
Ikaso
Sorry, no. The problem turned out to be a COM DLL that was unloading itself before joining all of the threads it had spawned. When one of the sleeping threads woke up, it tried to execute code that wasn't in memory any more, which ultimately caused recursive exception handler calls to overflow the stack.Bottom line: don't use OmniORB in a COM DLL unless you know what you're doing.
Christopher