Re: Mixed assembly crashes on exit




1. On the first development machine: I have now set debugging for both the
main project (compiled with /clr) to mixed, and also set debugging for the
managed project to mixed. Is that correct?


Yes.

I have tried setting breakpoints at various places in MINTERNAL.H. This
appears to be the module where ModuleUninitializer.SingletonDomainUnload() is
defined. However, the program never stops at any of these breakpoints.


OK, it could be related with the problem, may be.

Do you have copies of MINTERNAL.H and MSTARTUP.CPP? If so, you can see where
the crash is occurring.


Yes, I see them. The problem is that they are probably not the reason, but victims
of a problem that occurs earlier.

When I exit the program, the program crashes the output window shows the
following:

'FootanalNovel.exe': Loaded 'C:\WINDOWS\system32\xpsp2res.dll', Binary was
not built with debug information.
An unhandled exception of type 'System.StackOverflowException' occurred in
mscorlib.dll


Since the application was clean when tested with PageHeap, I would now suspect
a kind of stack corruption problem. Do the projects have /GS compiler option enabled?
If they don't, will enabling it change anything?

Also, if the app's design allows, try to temporarily disable some pieces of code
that are used at shutdown phase. May be this way it will be possible to see where
the corruption occurs (if the problem goes away after disabling some code).

Also, when the debugger has stopped at the stack overflow, try to use the steps
described here (assuming that you are debugging the Debug build):
http://www.debuginfo.com/articles/easywindbg.html#debugstackoverflow
It will not necessarily help (since the app is mixed, not pure native), but still
it would be interesting to see the output of the commands ('kf' mainly)

Btw, are you familiar with WinDbg? If you are, we could check some additional
things with its help.

Oleg




.



Relevant Pages

  • Re: Mixed assembly crashes on exit
    ... main project to mixed, and also set debugging for the ... a kind of stack corruption problem. ... It will not necessarily help (since the app is mixed, not pure native), but still ...
    (microsoft.public.vsnet.debugging)
  • Re: Why forth is not popular
    ... Even most people here responded they write a file, test it, exit the compiler, make changes to their code and run the beast again. ... which had a more sophisticated file system than many 21st century systems. ... Made it easy to find and remove the debugging ... I must admit that Perl has had its way, but Perl doesn't claim to be a compiler. ...
    (comp.lang.forth)
  • Re: Reading a string of unknown size
    ... and are ignored by the compiler. ... how can it be redundant? ... Have you ever tried *not* messing up a void * pointer? ... inadvertantly underallocate and you have good heap debugging facilities ...
    (comp.lang.c)
  • Re: simple compiler to CLI (.NET) ilasm
    ... ??>> i've done small/simple compiler of somthing lisp-like into .NET ilasm. ... --intelligent DSL debugging - some meta-commands ...
    (comp.lang.lisp)
  • Re: STM32 ARM toolset advice?
    ... Mark Borgerson wrote: ... variables in the limited RAM space. ... but in a well implemented compiler ... The source level debugging code should be able to track a variable ...
    (comp.arch.embedded)

Loading