GNOME Bugzilla – Bug 702886
SEGV when creating a new GtkDialog (GLib 2.37.x)
Last modified: 2014-06-02 20:06:56 UTC
This issue can be reproduced on Linux x86_64 and Windows MinGW 32-bit. The crash occurs everytime, it renders Glade unusable. Description - SEGV when adding a new top-level GtkDialog to an empty project - SEGV when adding a GtkComboBox - SEGV when loading a GtkBuilder .ui definition containing any composed widgets Analysis Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7dabe41 in glade_widget_set_object (gwidget=0x8a3620, new_object=0x10d3820, destroy=1) at glade-widget.c:3359 3359 g_return_if_fail (new_object == NULL || g_type_is_a (G_OBJECT_TYPE (new_object), gwidget->adaptor->type)); Glade-3 crashes during creation of the GtkDialog's internal GtkVBox because gwidget->adaptor is NULL The creation of the 'adaptor' can be tracked down to frame #3 (see stack trace below). It gets lost somewhere in Frame #2,#1,#0 Looks like a problem with the custom widget constructor methods of GLib. The following GLib versions have been checked: - GLib 2.34.3 - no crash - GLib 2.35.7 - no crash - GLib 2.36.x - not tested - GLib 2.37.1 - SEGV When creating different composed widgets, the stack trace looks very similar and always ends up at the same location at glade-widget.c:3359 Adding an additional check for (gwidget->adaptor != NULL) doesn't help, it will crash later at different locations. Stack trace
+ Trace 232129
Additional Glade-3 debug output: $ gdb glade-3 GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /opt/casy/gtk/.Linux.3.x86_64/bin/glade-3...done. (gdb) r Starting program: /opt/casy/gtk/.Linux.3.x86_64/bin/glade-3 warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffd000 [Thread debugging using libthread_db enabled] (glade-3:5648): GladeUI-WARNING **: Failed to open catalog directory '': Error opening directory '': No such file or directory (glade-3:5648): GladeUI-WARNING **: Failed to open catalog directory '': Error opening directory '': No such file or directory GladeUI-Message: No displayable values for property GtkToolPalette::icon-size GladeUI-Message: No displayable values for property GtkToolItemGroup::ellipsize GladeUI-Message: No displayable values for property GtkToolItemGroup::header-relief (glade-3:5648): GladeUI-WARNING **: Already registered displayable value None for none (type GtkSelectionMode) (glade-3:5648): GladeUI-WARNING **: Already registered displayable value Single for single (type GtkSelectionMode) (glade-3:5648): GladeUI-WARNING **: Already registered displayable value Browse for browse (type GtkSelectionMode) GladeUI-Message: 2 missing displayable value for GtkSheet::selection-mode GladeUI-Message: No displayable values for property GtkSheet::entry-type GladeUI-Message: No displayable values for property GtkSheet::vjust GladeUI-Message: No displayable values for property GtkSheetColumn::entry-type GladeUI-Message: No displayable values for property GtkSheetColumn::vjust GladeUI-Message: Glade needs artwork; a default icon will be used for the following classes: GtkPlotData needs an icon named 'widget-gtkextra-gtkplotdata' GtkPlotCanvasEllipse needs an icon named 'widget-gtkextra-gtkplotcanvasellipse' GtkPlotCanvasRectangle needs an icon named 'widget-gtkextra-gtkplotcanvasrectangle' GtkPlotPS needs an icon named 'widget-gtkextra-gtkplotps' GtkPlotSurface needs an icon named 'widget-gtkextra-gtkplotsurface' GtkPlotCanvasLine needs an icon named 'widget-gtkextra-gtkplotcanvasline' GtkPlotArrayList needs an icon named 'widget-gtkextra-gtkplotarraylist' GtkPlotSegment needs an icon named 'widget-gtkextra-gtkplotsegment' GtkDirTree needs an icon named 'widget-gtkextra-gtkdirtree' GtkPlotPC needs an icon named 'widget-gtkextra-gtkplotpc' GtkPlotArray needs an icon named 'widget-gtkextra-gtkplotarray' GtkPlotDT needs an icon named 'widget-gtkextra-gtkplotdt' GtkPlotCanvasPlot needs an icon named 'widget-gtkextra-gtkplotcanvasplot' GtkPlotCanvasPixmap needs an icon named 'widget-gtkextra-gtkplotcanvaspixmap' GtkPlotBar needs an icon named 'widget-gtkextra-gtkplotbar' GtkPlotCanvasText needs an icon named 'widget-gtkextra-gtkplotcanvastext' GtkPlotGdk needs an icon named 'widget-gtkextra-gtkplotgdk' GtkPlotCSurface needs an icon named 'widget-gtkextra-gtkplotcsurface' GtkPlotCanvasChild needs an icon named 'widget-gtkextra-gtkplotcanvaschild' GtkDataEntry needs an icon named 'widget-gtkextra-gtkdataentry' GladeUI-Message: No DevHelp installed on your system, devhelp feature will be disabled. [New Thread 0x7fffeb039700 (LWP 5682)] [New Thread 0x7fffea838700 (LWP 5683)] [New Thread 0x7fffea037700 (LWP 5685)] [New Thread 0x7fffe9836700 (LWP 5686)] [New Thread 0x7fffe9035700 (LWP 5688)] [Thread 0x7fffe9035700 (LWP 5688) exited] [Thread 0x7fffea838700 (LWP 5683) exited] [Thread 0x7fffeb039700 (LWP 5682) exited] Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7dabe41 in glade_widget_set_object (gwidget=0x8a3620, new_object=0xfe2050, destroy=1) at glade-widget.c:3359 3359 g_return_if_fail (new_object == NULL ||
Fixed in glade-3-8 branch. The problem was that glib changed the order in which contruct properties are set, so when glade was creating the internal children wrapper object the object was being set before the adaptor triggering the bug. https://git.gnome.org/browse/glade/commit/?h=glade-3-8&id=9aa539e209281201256a71e2ebc434f7fd97262b BTW I will make a new release soon!
Thanks, we will check it out. fp
Checked with GLib 2.37.93 / Glade 3.8.4 - working.
*** Bug 731080 has been marked as a duplicate of this bug. ***