Version: unspecified (using KDE 4.6.0) OS: Linux Original bug: https://bugs.launchpad.net/ubuntu/+source/gtk2-engines-oxygen/+bug/719078 If I run amide but pass it a .stl file (which it can't read!) it crashes with the error: process:9278): Gtk-CRITICAL (recursed) **: IA__gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed aborting... Aborted (core dumped) To me the path looks like Amide has it's own log handler registered and it opens a dialog, that then finds it's way through oxygen-gtk which tries to reorder the buttons while inserting its own log handler to hide the errors from the way the reorder call is used; the log code then gives up since it's already logging an error. See the Ubuntu bug for a bit more of the history as I was trying to debug it. Reproducible: Always Steps to Reproduce: Configure KDE to use oxygen-gtk run amide passing it any .stl file Actual Results: process:9278): Gtk-CRITICAL (recursed) **: IA__gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed aborting... Aborted (core dumped) Expected Results: A dialog box telling me that I'd passed a file that amide couldn't read. #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_response_id=<value optimised out>) at /build/buildd/gtk+2.0-2.24.0/gtk/gtkdialog.c:1246 #5 IA__gtk_dialog_set_alternative_button_order (dialog=0x8bec90, first_response_id=<value optimised out>) at /build/buildd/gtk+2.0-2.24.0/gtk/gtkdialog.c:1313 #6 0x00007fffecdc604a in Oxygen::DialogEngine::registerWidget (this=0x86d0c0, widget=0x8bec90) at /build/buildd/gtk2-engines-oxygen-1.0.2/src/animations/oxygendialogengine.cpp:49 #7 0x00007fffece3b47d in Oxygen::draw_flat_box (style=<value optimised out>, window=0x854240, state=GTK_STATE_NORMAL, shadow=GTK_SHADOW_NONE, clipRect=0x0, widget=<value optimised out>, detail=0x7ffff75a83ef "base", x=0, y=0, w=418, h=120) at /build/buildd/gtk2-engines-oxygen-1.0.2/src/oxygenstylewrapper.cpp:135 #8 0x00007ffff7475006 in gtk_window_paint (widget=<value optimised out>, area=<value optimised out>) at /build/buildd/gtk+2.0-2.24.0/gtk/gtkwindow.c:7218 #9 0x00007ffff747a89c in gtk_window_realize (widget=0x8bec90) at /build/buildd/gtk+2.0-2.24.0/gtk/gtkwindow.c:4962 #10 0x00007ffff66457fc in g_closure_invoke (closure=0x8e3fd0, return_value=0x0, n_param_values=1, param_values=0x95c0c0, invocation_hint=0x7fffffffcf60) at /build/buildd/glib2.0-2.28.0/gobject/gclosure.c:767 #11 0x00007ffff66567e3 in signal_emit_unlocked_R (node=<value optimised out>, detail=0, instance=0x8bec90, emission_return=0x0, instance_and_params=0x95c0c0) at /build/buildd/glib2.0-2.28.0/gobject/gsignal.c:3182 #12 0x00007ffff6660258 in g_signal_emit_valist (instance=<value optimised out>, signal_id=<value optimised out>, detail=<value optimised out>, var_args=<value optimised out>) at /build/buildd/glib2.0-2.28.0/gobject/gsignal.c:2983 #13 0x00007ffff666041f in g_signal_emit (instance=<value optimised out>, signal_id=<value optimised out>, detail=<value optimised out>) at /build/buildd/glib2.0-2.28.0/gobject/gsignal.c:3040 #14 0x00007ffff746ccce in IA__gtk_widget_realize (widget=0x8bec90) at /build/buildd/gtk+2.0-2.24.0/gtk/gtkwidget.c:3532 #15 0x00007ffff74772e8 in gtk_window_show (widget=0x8bec90) at /build/buildd/gtk+2.0-2.24.0/gtk/gtkwindow.c:4630 #16 0x00007ffff66457fc in g_closure_invoke (closure=0x8598b0, return_value=0x0, n_param_values=1, param_values=0x91e900, invocation_hint=0x7fffffffd430) at /build/buildd/glib2.0-2.28.0/gobject/gclosure.c:767 #17 0x00007ffff66567e3 in signal_emit_unlocked_R (node=<value optimised out>, detail=0, instance=0x8bec90, emission_return=0x0, instance_and_params=0x91e900) at /build/buildd/glib2.0-2.28.0/gobject/gsignal.c:3182 #18 0x00007ffff6660258 in g_signal_emit_valist (instance=<value optimised out>, signal_id=<value optimised out>, detail=<value optimised out>, var_args=<value optimised out>) at /build/buildd/glib2.0-2.28.0/gobject/gsignal.c:2983 #19 0x00007ffff666041f in g_signal_emit (instance=<value optimised out>, signal_id=<value optimised out>, detail=<value optimised out>) at /build/buildd/glib2.0-2.28.0/gobject/gsignal.c:3040 #20 0x00007ffff746dc86 in IA__gtk_widget_show (widget=0x8bec90) at /build/buildd/gtk+2.0-2.24.0/gtk/gtkwidget.c:3214 #21 0x00007ffff72ce968 in IA__gtk_dialog_run (dialog=0x8bec90) at /build/buildd/gtk+2.0-2.24.0/gtk/gtkdialog.c:1065 #22 0x00000000004c94e1 in amide_log_handler (log_domain=<value optimised out>, log_level=<value optimised out>, message=0x92c280 "Extension stl not recognized on file: /discs/more/3dbrot/prob/h.stl\nGuessing File Type", user_data=0x926000) at amide.c:92 #23 0x00007ffff615673c in g_logv (log_domain=0x0, log_level=<value optimised out>, format=0x56dde8 "Extension %s not recognized on file: %s\nGuessing File Type", args1=0x7fffffffdc70) at /build/buildd/glib2.0-2.28.0/glib/gmessages.c:527 #24 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 #25 0x00000000004e9dbc in amitk_data_set_import_file (method=<value optimised out>, submethod=<value optimised out>, filename=0x823b00 "/discs/more/3dbrot/prob/h.stl", preferences=0x926000, update_func=<value optimised out>, update_data=<value optimised out>) at amitk_data_set.c:1506 #26 0x00000000004c9720 in main (argc=1, argv=0x7fffffffdff8) at amide.c:205 (gdb)
What version of gtk+-2.0 do you have?
Ah, i see, 2.24.0.
Some versions: gtk2-engines-oxygen 1.0.2-0ubuntu1 amide 0.9.2-1ubuntu1 libgtk2.0-0 2.24.0-0ubuntu3 libkdecore5 4:4.6.0-0ubuntu3 Isn't the fix here to ask Gtk to either check the value in gtk_dialog_set_alternative_button_order_valist or provide an interface to test if the dialog has a particular button? Dave
Well, it does have such interface - here's how this function works: child = dialog_find_button (dialog, response_id); gtk_box_reorder_child (GTK_BOX (dialog->action_area), child, position); So, we'll have to use dialog_find_button to check if the button is present and use *_valist version of function with valid response ids only instead. I'll fix this when i have enough time (or Hugo will if he comes here earlier).
Ah, yeah, patches are welcome if you want to solve this faster ;)
Well I was about to write such a patch; the problem is that dialog_find_button is a static function within gtk, I don't see an external function that wraps it. Dave
Git commit b5a9fa63c7ff65b5615af5981e7d7b7f3f1f580c by Ruslan Kabatsayev. Committed on 18/02/2011 at 21:56. Pushed by kabatsayev into branch '1.0'. Don't set dialog button order for responses which don't exist on the dialog CCBUG: 266561 M +24 -13 src/animations/oxygendialogengine.cpp M +25 -0 src/oxygengtkutils.cpp M +3 -0 src/oxygengtkutils.h http://commits.kde.org/oxygen-gtk/b5a9fa63c7ff65b5615af5981e7d7b7f3f1f580c
@Dave The above should fix it. Please tell if it fixes for you.
Hey Ruslan - that works great! Patched it on top of the Ubuntu packages, and tested before and after application and it goes away nicely. Nice work! Dave
OK, then please mark this bug as fixed.