On Mon, Oct 31, 2011 at 09:25:26AM -0700, Juan Pineda wrote: > The current Qemu master branch crashes under OSX with a GThread error. > Commenting out vlc.c line 2188 (call to g_thread_init) allows it to run > successfully.
As a general rule all calls to 'g_thread_init(NULL)' should be protected by a conditional thus: if (!g_thread_supported()) g_thread_init(NULL); Even though QEMU calls g_thread_init() very early in main(), there is always the possibility that some library QEMU links to, has got an ELF initializer, triggering before main(), which calls g_thread_init(). NB on GLib versions >= 2.24, g_thread_init() is a no-op if called more than once[1], but for sake of compatibility QEMU ought to use the conditonal check. Regards, Daniel [1] The reason for this change is that GObject itself actually calls g_thread_init() secretly too. -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|