assertion (IA__gtk_box_reorder_child: assertion)

Bug #719078 reported by Dave Gilbert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
amide (Ubuntu)
Invalid
Undecided
Unassigned
gtk2-engines-oxygen (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: amide

Gtk-CRITICAL (recursed) **: IA__gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed

On loading any stl file (including the trivial one attached) amide crashes with the error:

(process:9278): Gtk-CRITICAL (recursed) **: IA__gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed
aborting...
Aborted (core dumped)

I've had Amide work on previous versions of ubuntu (not sure which the last time I tried it was however).

Dave

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: amide 0.9.2-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-3.30-generic 2.6.38-rc4
Uname: Linux 2.6.38-3-generic x86_64
Architecture: amd64
CheckboxSubmission: f2d10bd9f943a85b486a282e7840a570
CheckboxSystem: 0531969bcfd4f03af7405c98dc94a948
Date: Mon Feb 14 23:44:25 2011
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 LC_MESSAGES=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: amide

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :
Download full text (3.2 KiB)

I built it from the apt-get retrieved source and got the following backtrace; the interesting bit is:

#21 0x00000000004c94e1 in amide_log_handler (log_domain=<value optimised out>, log_level=<value optimised out>, message=0x92a4b0 "Extension stl not recognized on file: /discs/more/3dbrot/prob/h.stl\nGuessing File Type", user_data=0x926010) at amide.c:92

which shows it was trying to give me an error dialog telling me I'd foolishly forgot to give it the right type of file,
and b)

#4 0x00007ffff72cec05 in gtk_dialog_set_alternative_button_order () from /usr/lib/libgtk-x11-2.0.so.0
#5 0x00007fffecdc604a in Oxygen::DialogEngine::registerWidget(_GtkWidget*) () from /usr/lib/gtk-2.0/2.10.0/engines/liboxygen-gtk.so

so it is going through the oxygen theme - but I'm not sure whether it's Amide or Oxygen's fault (which would
probably be ironic).

(gdb) where
#0 0x00007ffff591ab45 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff591e496 in abort () at abort.c:92
#2 0x00007ffff6156a52 in g_logv () from /lib/libglib-2.0.so.0
#3 0x00007ffff6156adf in g_log () from /lib/libglib-2.0.so.0
#4 0x00007ffff72cec05 in gtk_dialog_set_alternative_button_order () from /usr/lib/libgtk-x11-2.0.so.0
#5 0x00007fffecdc604a in Oxygen::DialogEngine::registerWidget(_GtkWidget*) () from /usr/lib/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
#6 0x00007fffece3b47d in ?? () from /usr/lib/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
#7 0x00007ffff7475006 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#8 0x00007ffff747a89c in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#9 0x00007ffff66457fc in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff66567e3 in ?? () from /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff6660258 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#12 0x00007ffff666041f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff746ccce in gtk_widget_realize () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007ffff74772e8 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x00007ffff66457fc in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff66567e3 in ?? () from /usr/lib/libgobject-2.0.so.0
#17 0x00007ffff6660258 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#18 0x00007ffff666041f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff746dc86 in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x00007ffff72ce968 in gtk_dialog_run () from /usr/lib/libgtk-x11-2.0.so.0
#21 0x00000000004c94e1 in amide_log_handler (log_domain=<value optimised out>, log_level=<value optimised out>, message=0x92a4b0 "Extension stl not recognized on file: /discs/more/3dbrot/prob/h.stl\nGuessing File Type", user_data=0x926010) at amide.c:92
#22 0x00007ffff615673c in g_logv () from /lib/libglib-2.0.so.0
#23 0x00007ffff6156adf in g_log () from /lib/libglib-2.0.so.0
#24 0x00000000004e9dbc in amitk_data_set_import_file (method=<value optimised out>, submethod=<value optimised out>, filename=0x823b00 "/discs/more/3dbrot/prob/h.stl", preferences=0x926010, update_func=<value optimised out>, update_data=<value optimised out>)
    at amitk_data_set.c:1506
#25 0x00000000004c9720 in main (a...

Read more...

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :
Download full text (7.2 KiB)

(New backtrace with debug at the end - IMHO this is an gtk2-engines-oxygen problem)

So, the log error that's being generated at the gtk level is caused by the Oxygen code doing this:

gtk2-engines-oxygen-1.0.2/src/animations/oxygendialogengine.cpp:28

28 bool DialogEngine::registerWidget( GtkWidget* widget )
29 {
30 if( contains( widget ) ) return false;
31
32 /*
33 gtk_dialog_set_alternative_button_order will cause errors to be logged, but don't want these
34 so register or own error handler, and then unregister afterwards...
(gdb)
35 */
36 const unsigned int id( g_log_set_handler("Gtk", G_LOG_LEVEL_CRITICAL, Gtk::oxygen_log_handler, NULL) );
37
38 // change order
39 gtk_dialog_set_alternative_button_order( GTK_DIALOG( widget ),
40 GTK_RESPONSE_HELP,
41 GTK_RESPONSE_OK,
42 GTK_RESPONSE_YES,
43 GTK_RESPONSE_ACCEPT,
44 GTK_RESPONSE_APPLY,
(gdb)
45 GTK_RESPONSE_REJECT,
46 GTK_RESPONSE_CLOSE,
47 GTK_RESPONSE_NO,
48 GTK_RESPONSE_CANCEL,
49 -1 );
50
51 // reset error handler
52 g_log_remove_handler( "Gtk", id );
53 g_log_set_handler( "Gtk", G_LOG_LEVEL_CRITICAL, g_log_default_handler, NULL );

I don't think the dialog has a GTK_RESPONSE_HELP so gtk_dialog_set_alternative_button_order_valist ends up calling gtk_box_reorder_child with a null child pointer (gtkdialog.c:1246)

The problem here is that:
  1) Amide raises an error (reasonable given as a user I did something wrong)
  2) In it's log handler Amide opens a dialog
  3) the oxygen theme code tries to trap any more log actions which it knows are going to be triggered by the dodgy call to reorder
  4) the gtk code then ends up hitting an assertion (having passed a NULL pointer when trying to look up where the _HELP button is
  5) The assertion triggers the logging code - which aborts having realised it's recursing.

Now.
  a) I don't think gtk2-oxygen-theme's way of avoiding the error is sane
  b) I'm not convinced gtk_dialog_set_alternative_button_order_valist should actually leave it as far as letting a NULL pointer be passed

It probably didn't crash for me before because I wasn't running under KDE, and it probably works for other apps because they either don't have their own log handlers or don't try and open dialogs in them.

#0 0x00007ffff591ab45 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff591e496 in abort () at abort.c:92
#2 0x00007ffff6156a52 in g_logv (log_domain=0x7ffff74e317b "Gtk", log_level=<value optimised out>, format=0x7ffff619d4a8 "%s: assertion `%s' failed", args1=0x7fffffffc860) at /build/buildd/glib2.0-2.28.0/glib/gmessages.c:557
#3 0x00007ffff6156adf in g_log (log_domain=<value optimised out>, log_level=<value optimised out>, format=<value optimised out>) at /build/buildd/glib2.0-2.28.0/glib/gmessages.c:577
#4 0x00007ffff72cec05 in gtk_dialog_set_alternative_button_order_valist (dialog=0x8bec90, first_respon...

Read more...

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Ruslan's fix in the bug at bugs.kde.org fixes this nicely, see:

http://commits.kde.org/oxygen-gtk/b5a9fa63c7ff65b5615af5981e7d7b7f3f1f580c

Dave

Changed in amide (Ubuntu):
status: New → Invalid
Revision history for this message
Felix Geyer (debfx) wrote :

Fixed in gtk2-engines-oxygen 1.0.3-0ubuntu1

Changed in gtk2-engines-oxygen (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.