[Mono-dev] Embedded mono crash on exception

Robert Jordan robertj at gmx.net
Thu Aug 6 08:31:08 UTC 2015


On 06.08.2015 08:12, Trigve wrote:
> I'm using embedded mono (using unity) in C++ DLL. I'm calling some managed
> functions using mono_runtime_invoke(). The function does throw an exception,
> which I caught with the MonoException argument. Then I want to unwind stack
> (in C++) so I throw my custom exception. But application crashes at address
> 00000000 (last function on the stack is ExecuteHandler2 at 20()). So it looks
> like some exception handler is set pointing to the NULL.


I'm pasting this from the Nabble Forum because it didn't make
into the mail:

> First-chance exception at 0x7548C42D in Unity.exe: Microsoft C++ exception: ExceptionAlreadySet at memory location 0x0028D63C.
>
> First-chance exception at 0x00000000 in Unity.exe: 0xC0000005: Access violation executing location 0x00000000.

Not sure about Unity's Mono (it's a customized version) but
"First-chance exception at 0x00000000" is usually not an error,
at least not in the old Mono version Unity is using.

This exception is an artifact of Mono's NullReferenceException handling.
You are supposed to ignore it.

Robert





More information about the Mono-devel-list mailing list