[Mono-list] mscoree.dll crash

Kornél Pál kornelpal at gmail.com
Fri May 1 06:16:19 EDT 2009


MSVCRT is calling CorExitProcess on exit if mscoree.dll is loaded. 
mono.dll is hooking some mscoree.dll exports (including CorExitProcess) 
to itself but is not removing these hooks on unload.

I suggest you to keep an extra reference to mono.dll so that it will not 
be unloaded until process termination.

This is a bug that should definitely be fixed but I will need some time 
to come up with an optimal solution.


fozzie wrote:
> The problem occurs when a separate DLL is pulled into the central executable
> via LoadLibrary(). On shutdown of the executable the DLL is freed via
> FreeLibrary() and this results in unload of mono.dll, which changes the
> mscoree.dll address space.
> The debug work directory should be set to $(OutDir) or mscorlib.dll will not
> be found. There is a breakpoint immediately after mono_jit_init_version() to
> allow examination of the address of CorExitProcess. 
> The lib and etc directories from the Mono 2.4 install should be copied below
> bin\mono\. 
> The following are copied from the install directories to the bin\debug
> directory. They aren't big so i kept them in the zip:
> libglib-2.0-0.dll
> libgmodule-2.0-0.dll
> libgthread-2.0-0.dll
> I tried uploading the file in both Chrome and IE 8, but it doesn't seem to
> work so i've stuck it at
> http://rapidshare.com/files/226924363/mscoree_crash.zip.html. Hopefully it
> helps to track this down.

More information about the Mono-list mailing list