[Mono-list] Mono embedding issue
andreas.faerber at web.de
Wed Oct 11 17:49:50 EDT 2006
>> When embedding Mono 188.8.131.52 on OS X i386, I get an assertion failure
>> in mono_jit_init:
>> ** ERROR **: file threads.c: line 420 (mono_thread_attach): assertion
>> failed: (thread_handle)
>> It goes on to mention SIGABRT and includes an empty stacktrace.
>> The same code, compiled against the corresponding ppc Mono.framework,
>> works great on PPC. I've looked at the beforementioned source file in
>> SVN head and found no clue.
> Is this thread registered with Mono? Mono requires that all threads
> that will have access to Mono are registered with the GC.
I've re-read the mini.c and threads.c source - the failing assertion
is directly after a call to GetCurrentThread() inside
mono_thread_attach (which is being called as the last step of
mini_init and mono_jit_init). Still it works on ppc, which puzzles me.
What do you propose me to do about the issue?
A colleague of mine, long-time Mac user, has just discovered the
pleasures of "Microsoft-created" C# and the Mono runtime - based on
this I believe a "cute" graphical integration of Mono with Xcode as
the standard IDE would be beneficial for the developer outreach of
Mono on that platform, and if staff uses it at our university this
may well lead to students getting to know C# and Mono in addition to
the unfortunately wide-spread and dominant Java. From the available
non-official Xcode documentation and some managed Objective-C
reflection code of my own I've discovered a way of writing a bundle
where the only native code is the execution of an assembly included
within the bundle; the managed code in turn uses my Cocoa bridge to
provide the classes doing the actual work, accessing Mono's rich
libraries and avoiding the need to re-write such code in Objective-C.
It is my assumption that if we resolve this embedding issue then not
only Xcode plugins but also widgets and other non-application parts
of OS X can be written using managed code!
So, should I try to prepare a patch for the runtime with the renaming
Paolo proposed in #77324 as a solution? Or could it be related to the
non-specified x86 thread attaching issues mentioned by Paolo in #77638?
So far I have only tried to compile Mono under Cygwin on Windows,
where I had instructions from the Wiki, including specific
instructions and a script for the dependencies; if anyone would tell
me how to go about it on OS X without ruining my existing Mono
installation I'd be willing to give it a try.
More information about the Mono-list