Managed Debugging Assistant error

Hi,

Recently, I added managed code to my existing application, which is unmanged code. Everything runs fine until I exit the program. Here is the error I received:

Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'c:\CHBUILD\CH\Debug\chi.exe'.
Additional Information: The runtime has encountered a fatal error. The address of the error was at 0x7c81eb33, on thread 0x238. The error code is 0x800703e9. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.

I traced the program; this error occurs after my "main" program have exited. Any help would be appreciated. Oh, one more thing, the program stops at "mstartup.cpp" line 756. Thanks.




Answer this question

Managed Debugging Assistant error

  • rute01

    This usually means there was an Access Violation in the unmanaged portion of the code. Common causes are:

    1) some bug in the native portion of your app corrupted the CLR. (eg, it acciditentally trashed CLR memory).
    2) you made a pinvoke and the marshallers had the wrong signatures (which generally degenerates into #1).
    3) there was a bug in CLR

    Try
    1) running it under a native debugger and stopping on all 1st-chance AVs. One of the callstacks may be interesting.
    2) running it under a managed debugger and seeing if you get any MDAs warning you about more specific things.

    Mike



  • Managed Debugging Assistant error