GNOME Bugzilla – Bug 710783
Crash when opening a Glade file
Last modified: 2013-11-26 23:57:35 UTC
Created attachment 257992 [details] Glade file from LibreOffice Glade crashes when I open the attached file. Versions: Glade 3.14.2/Ubuntu 13.10 Here's the output: samuel@samuel-terra:~/programming/libreoffice$ glade -v sd/uiconfig/simpress/ui/slidetransitionspanel.ui (glade:14267): Gtk-CRITICAL **: gtk_recent_chooser_set_filter: assertion 'GTK_IS_RECENT_FILTER (filter)' failed GladeUI-Message: No displayable values for property GtkEntry::input-purpose GladeUI-Message: No displayable values for property GtkEntry::input-hints GladeUI-Message: No displayable values for property GtkTextView::input-purpose GladeUI-Message: No displayable values for property GtkTextView::input-hints GladeUI-Message: 1 missing displayable value for GtkCellRendererAccel::accel-mode (glade:14267): GladeUI-CRITICAL **: glade_widget_adaptor_get_object_type: assertion 'GLADE_IS_WIDGET_ADAPTOR (adaptor)' failed (glade:14267): GladeUI-CRITICAL **: glade_widget_set_object: assertion 'new_object == NULL || g_type_is_a (G_OBJECT_TYPE (new_object), glade_widget_adaptor_get_object_type (gwidget->priv->adaptor))' failed (glade:14267): GladeUI-ERROR **: Unable to get GladeWidget for internal child selection Trace/Breakpoint ausgelöst (Speicherabzug geschrieben)
I can not reproduce it on Debian version 3.14.2 nor on master Try getting a backtrace in the first glade_widget_adaptor_get_object_type() assertion.
How do I get that backtrace?
Well, you need to install glade debug package if that exists or recompile with --enable-debug then use gdb to run it and break in g_log() before loading the ui file
I can reproduce this crash on my Ubuntu 13.10 and have the same bug with the file OutlineEditor.ui This bug seems to be related to bug https://bugzilla.redhat.com/show_bug.cgi?id=973277. Glade does not understand the attribute "internal-child" as shown below: <object class="GtkDialog" id="FileSaveWarningDialog"> <child internal-child="vbox"> </child> </object> I think it is very anti-social to produce files that cannot be opened in a future version of this program.
Created attachment 258166 [details] BrowserWindow.ui from titania
Created attachment 258174 [details] Backtrace opening slidetransitionspanel.ui
Hope this backtrace is helpful. I put a breakpoint in "g_log()" and this is the output of "backtrace full" after loading the file.
(In reply to comment #4) > I can reproduce this crash on my Ubuntu 13.10 and have the same bug with the > file OutlineEditor.ui > > This bug seems to be related to bug > https://bugzilla.redhat.com/show_bug.cgi?id=973277. Seems like it but it is not, the problem is that GtkBox is not instantiable in gtk2 but it is in gtk3, so when glade tries to create an instance glib aborts. Btw this bug is fixed in glade-3-8 branch > Glade does not understand the attribute "internal-child" as shown below: > > <object class="GtkDialog" id="FileSaveWarningDialog"> > <child internal-child="vbox"> > </child> > </object> > > I think it is very anti-social to produce files that cannot be opened in a > future version of this program. Pointing fingers is worst IMHO, in any case this is a bug and as with most bugs, was not intended!
(In reply to comment #7) > Hope this backtrace is helpful. I put a breakpoint in "g_log()" and this is the > output of "backtrace full" after loading the file. this is weird, the backtrace suggest glade_widget_adaptor_get_by_name ("GtkTreeSelection") returns something that is not a GladeWidgetAdaptor see glade_widget_read() code if ((adaptor = glade_widget_adaptor_get_by_name (klass)) && (type = glade_widget_adaptor_get_object_type (adaptor)) && G_TYPE_IS_INSTANTIATABLE (type) && G_TYPE_IS_ABSTRACT (type) == FALSE) The only think I can think of is that the adaptor is getting unreffed for some reason, so if you can, try adding a reference in glade_widget_adaptor_register() by adding a g_object_ref (adaptor); and see what happens
I think the problem is that Glade cannot find the internal child (Line 36 in slidetransitionspanel.ui). In glade_widget_read() the function glade_widget_get_internal_child() is called which looks only in the parents for the internal child. When I move the #treeview-selection above the #transitions_list e.g. in the .ui file, the crash doesn't happen anymore.
Created attachment 258806 [details] [review] Proposed Patch
BTW which versionof glib do you have? is >= 2.37?
$ ldd --version ldd (Ubuntu EGLIBC 2.17-93ubuntu4) 2.17
Ohh i meant glib not libc $ dpkg -s libglib2.0-0
$ dpkg -s libglib2.0-0 Package: libglib2.0-0 Status: install ok installed Priority: optional Section: libs Installed-Size: 4289 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: amd64 Multi-Arch: same Source: glib2.0 Version: 2.38.1-0ubuntu1 ...
Aha! yeah I think this bug is a duplicate of 705745. There was a change in glib 2.37 that exposed a bug in glade so you need glade-3-14 branch or 3.16 I will make a new release asap *** This bug has been marked as a duplicate of bug 705745 ***