After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 453361 - gnome-mount crashed with SIGSEGV in g_datalist_id_set_data_full()
gnome-mount crashed with SIGSEGV in g_datalist_id_set_data_full()
Status: RESOLVED FIXED
Product: gnome-mount
Classification: Deprecated
Component: programs
unspecified
Other Linux
: Normal critical
: ---
Assigned To: David Zeuthen (not reading bugmail)
Depends on:
Blocks:
 
 
Reported: 2007-07-03 12:04 UTC by Sebastien Bacher
Modified: 2008-06-27 10:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Ubuntu patch (1.07 KB, patch)
2008-02-07 11:59 UTC, Martin Pitt
none Details | Review

Description Sebastien Bacher 2007-07-03 12:04:50 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
...
  • #0 IA__g_datalist_id_set_data_full
    at /build/buildd/glib2.0-2.13.5/glib/gdataset.c line 216
  • #1 g_object_real_dispose
    at /build/buildd/glib2.0-2.13.5/gobject/gobject.c line 533
  • #2 gtk_object_dispose
    at /build/buildd/gtk+2.0-2.11.4/gtk/gtkobject.c line 423
  • #3 gtk_widget_dispose
    at /build/buildd/gtk+2.0-2.11.4/gtk/gtkwidget.c line 7439
  • #4 gtk_window_dispose
    at /build/buildd/gtk+2.0-2.11.4/gtk/gtkwindow.c line 1966
  • #5 IA__g_object_unref
    at /build/buildd/glib2.0-2.13.5/gobject/gobject.c line 1765
  • #6 IA__gtk_widget_unref
    at /build/buildd/gtk+2.0-2.11.4/gtk/gtkwidget.c line 7931
  • #7 volume_mount_with_options
    at gnome-mount.c line 862
  • #8 volume_mount
    at gnome-mount.c line 1564
  • #9 main
    at gnome-mount.c line 3131
  • #10 ??
  • #11 ??
  • #12 ??
  • #13 ??
  • #14 ??
  • #15 ??

Comment 1 g11024342@trbvm.com 2008-02-04 12:54:48 UTC
Since this bug has 21 duplicates on Launchpad I think the status can safely be changed to confirmed...
Comment 2 Martin Pitt 2008-02-07 11:47:45 UTC
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.
Comment 3 Martin Pitt 2008-02-07 11:59:56 UTC
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).
Comment 4 Martin Pitt 2008-02-07 12:01:42 UTC
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.
Comment 5 Martin Pitt 2008-02-07 12:48:55 UTC
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.
Comment 6 Cosimo Cecchi 2008-06-27 10:16:44 UTC
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.