GNOME Bugzilla – Bug 705692
Segmentation fault on horizontal slider
Last modified: 2013-08-14 04:06:08 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:
+ Trace 232361
Note: this does not happen with the vertical slider initially created.
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).
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.
Looks like gtk_widget_real_destroy should also disconnect the signal.
Added a hack in gnumeric, so we don't crash anymore.
GtkSpinButtonAccessible also connect some signals that are never disconnected.