[Mono-dev] mono calling g_thread_init() late

John Luke john.luke at gmail.com
Sun May 27 16:03:45 EDT 2007


Newer development glib versions (I think 2.13.0 and newer) print a
warning if g_thread_init() is not the first glib function called.  This
seems to cause every mono program to print a scary message like:

***MEMORY-WARNING***: /usr/lib/mono/1.0/mcs.exe[29627]: GSlice:
g_thread_init() must be called before all other GLib functions; memory
corruption due to late invocation of g_thread_init() has been detected;
this program is likely to crash, leak or unexpectedly abort soon...

It doesn't seem to cause crashes or any bad behavior as far as I can
tell.  Probable relevant ChangeLog entry:

Fri Dec 29 13:28:07 2006  Tim Janik  <timj at imendio.com>

        * glib/gslice.c: turned detection of too late g_thread_init()
        into a warning. this is a temporary work-around for some
        to fix affected programs, memory corruption still occours

And last, long thread on gtk-devel-list about it:

More information about the Mono-devel-list mailing list