GNOME Bugzilla – Bug 453361
gnome-mount crashed with SIGSEGV in g_datalist_id_set_data_full()
Last modified: 2008-06-27 10:16:44 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/gnome-mount/+bug/122673 "Binary package hint: gnome-mount Had just booted Gutsy (using VirtualBox 1.3.8). ... Package: gnome-mount 0.6-1ubuntu2 ...
+ Trace 145445
Since this bug has 21 duplicates on Launchpad I think the status can safely be changed to confirmed...
Raising the stakes to 40 duplicates now. :-) I tracked this down a bit. It happens if show_error_dialog_mount() is called for an error (like AlreadyMounted, or UnknownMethod, like in above stack trace) which does not have a special treatment, i. e. it just does w = gtk_message_dialog_new() [... nothing that touches w ...] /* don't show any dialog for this */ gtk_widget_unref (w); This causes: (gnome-mount:9015): GLib-GObject-WARNING **: instance with invalid (NULL) class pointer (gnome-mount:9015): GLib-GObject-CRITICAL **: g_signal_handlers_destroy: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed after the _new() call, *w is (gdb) p *w $2 = {object = {parent_instance = {g_type_instance = {g_class = 0x67a9f0}, ref_count = 1, qdata = 0x6b5f40}, flags = 2098704}, private_flags = 15872, state = 0 '\0', saved_state = 0 '\0', name = 0x0, style = 0x680010, requisition = {width = 0, height = 0}, allocation = {x = -1, y = -1, width = 1, height = 1}, window = 0x0, parent = 0x0} As you can see, window is NULL because the widget has never been realized. For me it helps to use gtk_widget_destroy() instead of gtk_widget_unref(). (The latter is deprecated, BTW, but using the replacement g_object_unref() crashes as well). This might be a bug in GTK (I'm not a real expert), so please feel free to clone this bug to GTK.
Created attachment 104627 [details] [review] Ubuntu patch This is the patch I applied in Ubuntu to fix/circumvent the patch. This is with GTK 2.12.7, BTW (just in case it really is a GTK bug).
I could reproduce the crash with an AlreadyMounted error (which happens because gnome-volume-manager and nautilus+gvfs race for mounting drives). However, the original crash report was for something different: error = {name = 0x8088978 "org.freedesktop.DBus.Error.UnknownMethod", message = 0x808ceb0 "Method \"Mount\" with signature \"ssas\" on interface \"org.freedesktop.Hal.Device.Volume\" doesn't exist\n", dummy1 = 0, dummy2 = 1, dummy3 = 0, This also looks like a genuine error which should be fixed, too.
Ah, seems this is *not* a GTK bug after all: http://mail.gnome.org/archives/gtk-devel-list/2008-January/msg00068.html So my patch seems to be correct.
This is already fixed in gnome-mount 0.8, closing as FIXED. 2008-02-25 David Zeuthen <davidz@redhat.com> * src/gnome-mount.c: Fix crasher when unreffing a toplevel; use gtk_widget_destroy() instead. Avoid lots of debug spew.