Re: Signal handler bug in GTK?
- From: Sander Marechal <s marechal jejik com>
- To: Tristan Van Berkom <tristan van berkom gmail com>, gtk-devel-list gnome org
- Cc:
- Subject: Re: Signal handler bug in GTK?
- Date: Sun, 14 May 2006 23:48:21 +0200
Tristan Van Berkom wrote:
Are they really called /before/ you are calling
glade_xml_signal_autoconnect () ?
Yes. glade_xml_signal_autoconnect() is almost the last thing I call
before gtk_main(). See my code at
http://svn.jejik.com/viewcvs.cgi/hearts/trunk/src/hearts.c?view=markup&rev=27&pathrev=27
On line 904 I call cfg_load(). This function is at line 550. The signals
seem to be emitted from that function, in a call to
gtk_file_chooser_set_filename() on line 631. After cfg_load() returns I
call glade_xml_signal_autoconnect() on line 918 and gtk_main() on line
922. There's only one function call in between, game_new(), but that
doesn't touch the gtk_file_chooser at all and the signals come from the
gtk_file_chooser.
It looks like gtk_main() is emitting the signals from
gtk_file_chooser_set_filename() with the signal handlers defined in
glade_xml_signal_autoconnect() but with NULL for data.
its also
possible that with another version of GTK+, the signals are getting
fired from
code that is deffered to an idle handler or some such.
To be exact about the versions: It works on GTK 2.8.6 which is part of
Ubuntu 5.10 (Breezy). The bug is in the last version, which us used in
Ubuntu 6.06 (Dapper Drake). You can test if for yourself. Get an Ubuntu
5.10 and an Ubuntu 6.06 Alpha Live CD and grab hearts from my SVN server.
Below is the debug output I get. You're more familliar with GTK so
hopefully it makes more sense to you then it does to me. To me it looks
like #44 is main(), #43 is gtk_main, #42 through #6 are the signals
being emitted from the gtk_file_chooser, #5 and #4 is my signal handler
and #3 through #0 is a g_assert in my handler that fails and triggers
the crash (caused because the signal handlers emit NULL's for data).
I hope this helps.
--
Sander
Backtrace was generated from '/usr/local/bin/hearts'
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1223960896 (LWP 8868)]
[New Thread -1241695312 (LWP 8869)]
0xffffe410 in __kernel_vsyscall ()
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb74f648b in __waitpid_nocancel () from
/lib/tls/i686/cmov/libpthread.so.0
#2 0xb7f358e6 in libgnomeui_module_info_get () from
/usr/lib/libgnomeui-2.so.0
#3 <signal handler called>
#4 0x080501ef in background_set_tiled (tiled=1) at hearts.c:802
#5 0x0804e15a in on_background_changed (widget=0x0, data=0x0) at
events.c:472
#6 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
#7 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#8 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#9 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#10 0xb75d1030 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#11 0xb7a6bea8 in gtk_file_chooser_button_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
#12 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
#13 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#14 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#15 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#16 0xb75d1030 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#17 0xb7a7a1b4 in _gtk_file_chooser_delegate_get_quark ()
from /usr/lib/libgtk-x11-2.0.so.0
#18 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
#19 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#20 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#21 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#22 0xb75d1030 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#23 0xb7a7a1b4 in _gtk_file_chooser_delegate_get_quark ()
from /usr/lib/libgtk-x11-2.0.so.0
#24 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
#25 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#26 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#27 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#28 0xb75d1030 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#29 0xb7a78aa5 in _gtk_file_chooser_default_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
#30 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
#31 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#32 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#33 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#34 0xb75cde89 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#35 0xb7b7f4de in _gtk_tree_selection_emit_changed ()
from /usr/lib/libgtk-x11-2.0.so.0
#36 0xb7b98ecf in gtk_tree_view_set_model () from
/usr/lib/libgtk-x11-2.0.so.0
#37 0xb7a74580 in _gtk_file_chooser_default_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
#38 0xb7a7465d in _gtk_file_chooser_default_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
#39 0xb754f448 in g_main_context_is_owner () from /usr/lib/libglib-2.0.so.0
#40 0xb754d876 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#41 0xb7550936 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#42 0xb7550c58 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#43 0xb7ac75a5 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#44 0x08050458 in main (argc=0, argv=0x0) at hearts.c:922
Thread 2 (Thread -1241695312 (LWP 8869)):
#0 0xffffe410 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb747b8c4 in poll () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0xb7550788 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#3 0xb7550c58 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#4 0xb7cd070e in link_thread_io_context () from /usr/lib/libORBit-2.so.0
No symbol table info available.
#5 0xb7569582 in g_static_private_free () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#6 0xb74f0341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
No symbol table info available.
#7 0xb74854ee in clone () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
Thread 1 (Thread -1223960896 (LWP 8868)):
#0 0xffffe410 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb74f648b in __waitpid_nocancel () from
/lib/tls/i686/cmov/libpthread.so.0
No symbol table info available.
#2 0xb7f358e6 in libgnomeui_module_info_get () from
/usr/lib/libgnomeui-2.so.0
No symbol table info available.
#3 <signal handler called>
No symbol table info available.
#4 0x080501ef in background_set_tiled (tiled=1) at hearts.c:802
playingarea_widget = <value optimized out>
#5 0x0804e15a in on_background_changed (widget=0x0, data=0x0) at
events.c:472
path = (gchar *) 0x0
playingarea_widget = <value optimized out>
#6 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#7 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#8 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
No symbol table info available.
#9 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#10 0xb75d1030 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#11 0xb7a6bea8 in gtk_file_chooser_button_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#12 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#13 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#14 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
No symbol table info available.
#15 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#16 0xb75d1030 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#17 0xb7a7a1b4 in _gtk_file_chooser_delegate_get_quark ()
from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#18 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#19 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#20 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
No symbol table info available.
#21 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#22 0xb75d1030 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#23 0xb7a7a1b4 in _gtk_file_chooser_delegate_get_quark ()
from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#24 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#25 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#26 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
No symbol table info available.
#27 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#28 0xb75d1030 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#29 0xb7a78aa5 in _gtk_file_chooser_default_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#30 0xb75c9423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#31 0xb75bd79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#32 0xb75cc2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
No symbol table info available.
#33 0xb75cdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#34 0xb75cde89 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#35 0xb7b7f4de in _gtk_tree_selection_emit_changed ()
from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#36 0xb7b98ecf in gtk_tree_view_set_model () from
/usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#37 0xb7a74580 in _gtk_file_chooser_default_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#38 0xb7a7465d in _gtk_file_chooser_default_get_type ()
from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#39 0xb754f448 in g_main_context_is_owner () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#40 0xb754d876 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#41 0xb7550936 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#42 0xb7550c58 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#43 0xb7ac75a5 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#44 0x08050458 in main (argc=0, argv=0x0) at hearts.c:922
playingarea_widget = <value optimized out>
filter = (GtkFileFilter *) 0x82a4220
l = <value optimized out>
#0 0xffffe410 in __kernel_vsyscall ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]