Crash in Gtk:Main::run (callback/signal problem)


We are creating an application using GTKMM. We are using a lot of
Gtk::Button and Gtk::DrawingArea controls and connecting expose_event() and
button_press_event() on them using standard gtkmm code. Application works
fine and react as wanted. Unfortunately, we noticed some random crash a
while ago, and since release is near I was assigned to fix them. I don't
know exactly what cause the crash, but if I click on every button randomly
the fastest I can for 2-3 minutes, it always crash with the same problem.

Here is the callstack:
#0  0xb7fc8410 in __kernel_vsyscall ()
#1  0xb71c2085 in raise () from /lib/tls/i686/cmov/
#2  0xb71c3a01 in abort () from /lib/tls/i686/cmov/
#3  0xb746311a in g_logv () from /usr/lib/
#4  0xb7463159 in g_log () from /usr/lib/
#5  0xb7b56416 in Glib::exception_handlers_invoke () from
#6  0xb7ea5cdb in Gtk::Widget_Class::button_press_event_callback () from
#7  0xb78f18d4 in ?? () from /usr/lib/
#8  0xb74f3069 in ?? () from /usr/lib/
#9  0xb74f4749 in g_closure_invoke () from /usr/lib/
#10 0xb750910a in ?? () from /usr/lib/
#11 0xb750a937 in g_signal_emit_valist () from /usr/lib/
#12 0xb750af59 in g_signal_emit () from /usr/lib/
#13 0xb7a10667 in ?? () from /usr/lib/
#14 0xb78eab21 in gtk_propagate_event () from /usr/lib/
#15 0xb78ebe92 in gtk_main_do_event () from /usr/lib/
#16 0xb7644a9a in ?? () from /usr/lib/
#17 0xb7459cf6 in g_main_context_dispatch () from /usr/lib/
#18 0xb745d0b3 in ?? () from /usr/lib/
#19 0xb745d497 in g_main_loop_run () from /usr/lib/
#20 0xb78ec264 in gtk_main () from /usr/lib/
#21 0xb7e26307 in Gtk::Main::run_impl () from /usr/lib/
#22 0xb7e2716a in Gtk::Main::run () from /usr/lib/
#23 0x08054a42 in main (argc=1, argv=0xbfc8f634) at main.cpp:113

As you can see, debug break in Gtk::Main::run(). Judging from the stack at
#6, it have something to do with
Gtk::Widget_Class::button_press_event_callback. Since every callback we have
works fine, I wonder what it could be. Is there a problem is we manage to
click 2 buttons with callback in the same gtk iteration? Can this be some
gtk multi-thread problem? We only use one for the UI.
View this message in context:
Sent from the Gtkmm mailing list archive at

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]