Re: Mixed assembly crashes on exit




I have reproduced the problem on two development systems. While the final
error is different on the two systems, is different, it occurs in the same
general area. I have tracked the code to MINTERNAL.H,
ModuleUninitializer::SingletonDomainUnload(). It is using a C++ for each
statement to iterate through a collection of handlers presumably to unload
the modules of the program. It is possible that this collection has gotten
corrupted.


Since the application has native components, I would recommend to start
by checking for possible native heap corruptions (which could, as a side effect,
cause this problem), an effective way to do it is shown by the link below:
http://www.debuginfo.com/tips/userbpntdll.html
(when running the app under debugger, watch also for unexpected first chance
exceptions in Debug Output window, or configure the debugger to stop
when an access violation exception is "thrown" - see Debug | Exceptions dialog)

If it does not help, and if you can reproduce the problem under debugger,
try to inspect the stack collection used by ModuleUninitializer object.
Will there be anything strange in the data?
Also try to set breakpoint in SingletoneDomainUnload function and step
through it, into the modules - will it be able to step at least into one module
(into its DomainUnload), or will it break immediately?

When the crash occurs, what functions are on the call stack?
Also, how does the disassembly around the place of crash look?

--
Oleg
[VC++ MVP http://www.debuginfo.com/]





.



Relevant Pages

  • Re: Windows Service Terminated Unexpectedly
    ... without exceptions it definately makes are programming lives more difficult;) ... I suggest adding some EventLogging into the code. ... It will help to identify where the crash is occuring. ... into the debugger when the first exception occurs. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: MyString Class
    ... > I compiled your program and run it under the debugger. ... > The first crash happens in ... ... > memory is flawed. ... First bug fixed. ...
    (comp.lang.cpp)
  • Re: ExecutionEngineException in dotnet 2.0 application doing interop with VB6 legacy code
    ... I have attached a debugger to the crashing apps, setting up symbol server and pdb stuff. ... The crash is never twice on the same code location. ... I have walked the code and made sure all connections where closed when done and the problem disappeared. ... has 800KLOC of VB6 code. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: how can I create minidumps of second chance exceptions in .NET 1.1 managed code?
    ... Using the configuration like you suggested sends the exception to the JIT debugger which is registered in a system-wide manner, and I don't want to register there. ... ADPlus is usually good in catching 2nd chance managed exceptions." ...
    (microsoft.public.vsnet.debugging)
  • Re: Lockup debugging
    ... I can crash the machine when it's running with ScrollLock, ... The debugger cannot break in. ... > locks up. ...
    (microsoft.public.development.device.drivers)