[Mono-osx] App crashes at mono_jit_exec when launched from Xcode

Adrian McCague amccague at gmail.com
Tue Oct 6 18:49:57 UTC 2015


I have a similar issue as well, I did not observe this with OSX 10.10
(all flavours), OSX 10.11 Beta 1 or 2 (can't remember which I upgraded
from). Now seeing this in the final release of El Capitan.

I am not using mono_jit_exec but instead mono_runtime_invoke to invoke
a class constructor in a DLL assembly. The LLVM debugger in XCode is
hitting an EXC_BAD_ACCESS (even for an empty constructor), which is
usually seen together with a NullReferenceException for obvious reasons.

Upon detaching the debugger and allowing Mono to continue execution,
this is output to the console:

> Unhandled Exception:
> Nested exception detected.
> Original Exception: at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_specific (intptr,int) <0x00086>
> at System.TypeInitializationException..ctor (string,System.Exception) <0x00033>
>
> Nested exception:at (wrapper managed-to-native) System.RuntimeType.getFullName (System.RuntimeType,bool,bool) <0x00094>
> at System.RuntimeType.ToString () <0x00018>
> at System.Exception.get_ClassName () <0x00027>
> at System.Exception.ToString () <0x0001c>
>
> [ERROR] FATAL UNHANDLED EXCEPTION: Nested exception detected.
> Original Exception: at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_specific (intptr,int) <0x00086>
> at System.TypeInitializationException..ctor (string,System.Exception) <0x00033>
>
> Nested exception:at (wrapper managed-to-native) System.RuntimeType.getFullName (System.RuntimeType,bool,bool) <0x00094>
> at System.RuntimeType.ToString () <0x00018>
> at System.Exception.get_ClassName () <0x00027>
> at System.Exception.ToString () <0x0001c>

Execution is fine using the same build but without attaching the
debugger. It is safe to attach the debugger after mono_runtime_invoke
has been called.

Have tried with both Mono 4.2.0 and 4.2.1


More information about the Mono-osx mailing list