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 705692 - Segmentation fault on horizontal slider
Segmentation fault on horizontal slider
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Accessibility
3.9.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-08-08 17:27 UTC by Andreas J. Guelzow
Modified: 2013-08-14 04:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2013-08-08 17:27:04 UTC
new gnumeric
A1: 23
create a slider
open its properties window
switch to horizontal
okay
open its properties window
link to A1
okay
boom:

  • #0 g_object_notify
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #1 gtk_range_accessible_value_changed
    at /build/buildd/gtk+3.0-3.2.0/./gtk/a11y/gtkrangeaccessible.c line 38
  • #2 g_cclosure_marshal_VOID__VOID
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #3 g_closure_invoke
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #4 ??
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #7 gtk_adjustment_value_changed
    at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkadjustment.c line 764
  • #8 gtk_adjustment_set_value
    at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkadjustment.c line 445
  • #9 sheet_widget_adjustment_set_value
    at sheet-object-widget.c line 1268
  • #10 adjustment_eval
    at sheet-object-widget.c line 1322
  • #11 dependent_eval
    at dependent.c line 1730
  • #12 workbook_recalc
    at dependent.c line 2833
  • #13 gnm_app_recalc
    at application.c line 1593
  • #14 update_after_action
    at commands.c line 350
  • #15 gnm_command_push_undo
    at commands.c line 718
  • #16 cmd_so_set_adjustment
    at commands.c line 7917
  • #17 cb_adjustment_config_ok_clicked
    at sheet-object-widget.c line 1559
  • #18 g_cclosure_marshal_VOID__VOID
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #19 g_closure_invoke
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #20 ??
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #21 g_signal_emit_valist
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #22 g_signal_emit
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #23 gtk_button_clicked
    at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkbutton.c line 1197

Comment 1 Andreas J. Guelzow 2013-08-08 17:29:03 UTC
Note: this does not happen with the vertical slider initially created.
Comment 2 Jean Bréfort 2013-08-09 12:49:35 UTC
This is because we use the same adjustment for all widgets. Looks like that when a widget is destroyed, some signals are still active. Might be a gtk+ bug (or feature).
Comment 3 Jean Bréfort 2013-08-09 16:35:34 UTC
gtk_range_accessible_finalize() has:

  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (object));
  if (widget)
    {
      adj = gtk_range_get_adjustment (GTK_RANGE (widget));
      if (adj)
        g_signal_handlers_disconnect_by_func (adj,
                                              gtk_range_accessible_value_changed,
                                              range);
    }

but gtk_widget_real_destroy() set the widget to NULL before unrefing the accessible:

      GtkAccessible *accessible = g_object_steal_qdata (G_OBJECT (widget), quark_accessible_object);
      
      if (accessible)
        {
          gtk_accessible_set_widget (accessible, NULL);
          g_object_unref (accessible);
        }
    }

so widget is always null when gtk_range_accessible_finalize() is called and the signals are not disconnected.
Comment 4 Morten Welinder 2013-08-09 16:52:20 UTC
Looks like gtk_widget_real_destroy should also disconnect the signal.
Comment 5 Jean Bréfort 2013-08-09 17:00:03 UTC
Added a hack in gnumeric, so we don't crash anymore.
Comment 6 Jean Bréfort 2013-08-09 17:10:46 UTC
GtkSpinButtonAccessible also connect some signals that are never disconnected.