User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5 Build Identifier: n117:~> uname -srm NetBSD 4.99.1 i386 n117:~> pkg_info | grep panel xfce4-panel-4.3.99.1 Xfce panel (gdb) bt #0 0xbbacbe71 in gtk_widget_destroy () from /usr/pkg/lib/libgtk-x11-2.0.so.0 #1 0xbb35a034 in launcher_recreate_menu (launcher=0x80fd000) at launcher.c:614 #2 0xbb35b497 in launcher_construct (plugin=0x80dcaf8) at launcher.c:1043 #3 0xbbbe3aa1 in _plugin_setup (plugin=0x80dcaf8, construct=0xbb35af80 <launcher_construct>) at xfce-panel-internal-plugin.c:649 #4 0xbb54e4b2 in g_cclosure_marshal_VOID__VOID () from /usr/pkg/lib/libgobject-2.0.so.0 #5 0xbb542925 in g_closure_invoke () from /usr/pkg/lib/libgobject-2.0.so.0 #6 0xbb5514dd in g_signal_chain_from_overridden () from /usr/pkg/lib/libgobject-2.0.so.0 #7 0xbb55287e in g_signal_emit_valist () from /usr/pkg/lib/libgobject-2.0.so.0 #8 0xbb552a07 in g_signal_emit () from /usr/pkg/lib/libgobject-2.0.so.0 #9 0xbbacb4cd in gtk_widget_realize () from /usr/pkg/lib/libgtk-x11-2.0.so.0 #10 0xbbacb73d in gtk_widget_map () from /usr/pkg/lib/libgtk-x11-2.0.so.0 #11 0xbb97bc00 in gtk_container_child_type () from /usr/pkg/lib/libgtk-x11-2.0.so.0 #12 0xbbbe03ce in xfce_itembar_forall (container=0x80bc720, include_internals=1, callback=0xbb97bbdc <gtk_container_child_type+2276>, callback_data=0x0) at xfce-itembar.c:819 #13 0xbb9799c8 in gtk_container_forall () from /usr/pkg/lib/libgtk-x11-2.0.so.0 #14 0xbb97bbbb in gtk_container_child_type () from /usr/pkg/lib/libgtk-x11-2.0.so.0 Reproducible: Always Steps to Reproduce: 1. startx 2. see how the panel crashed
Apparently the struct is not initialized properly, I have no idea why :( What version of gtk was this build with, do you know?
Created attachment 780 protect destruction of menu widget I'm just guessing here, but if it is possible for you to test this patch, that would be very helpful.
(In reply to comment #1) > What version of gtk was this build with, do you know? I have version gtk 2.8.20.
(In reply to comment #2) > I'm just guessing here, but if it is possible for you to test this patch, that > would be very helpful. Still crashing...
I really have no idea what's going on :( It looks like a race condition with a signal handler. Apparently the menu widget is destroyed while it is no longer available, but the pointer isn't NULL. I don't understand how that can happen.
# gdb /usr/pkg/bin/xfce4-panel GNU gdb 5.3nb1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386--netbsdelf"... (gdb) run Starting program: /usr/pkg/bin/xfce4-panel Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 1] launcher_recreate_menu (launcher=0x80ff100) at launcher.c:672 672 mi = gtk_image_menu_item_new_with_label (entry->name ? (gdb) p entry $1 = (LauncherEntry *) 0x0 (gdb)
(gdb) bt #0 launcher_recreate_menu (launcher=0x80ff100) at launcher.c:672 #1 0xbb35b497 in launcher_construct (plugin=0x80ddaf8) at launcher.c:1043 #2 0xbbbe3aa1 in _plugin_setup (plugin=0x80ddaf8, construct=0xbb35af80 <launcher_construct>) at xfce-panel-internal-plugin.c:649 #3 0xbb54e4b2 in g_cclosure_marshal_VOID__VOID () from /usr/pkg/lib/libgobject-2.0.so.0 #4 0xbb542925 in g_closure_invoke () from /usr/pkg/lib/libgobject-2.0.so.0 #5 0xbb5514dd in g_signal_chain_from_overridden () from /usr/pkg/lib/libgobject-2.0.so.0 #6 0xbb55287e in g_signal_emit_valist () from /usr/pkg/lib/libgobject-2.0.so.0 #7 0xbb552a07 in g_signal_emit () from /usr/pkg/lib/libgobject-2.0.so.0 #8 0xbbacb4cd in IA__gtk_widget_realize (widget=0x80ddaf8) at gtkwidget.c:2339 #9 0xbbacb73d in IA__gtk_widget_map (widget=0x80ddaf8) at gtkwidget.c:2256 #10 0xbb97bc00 in gtk_container_map_child (child=0x80ddaf8, client_data=0x0) at gtkcontainer.c:2390 #11 0xbbbe03ce in xfce_itembar_forall (container=0x80bc720, include_internals=1, callback=0xbb97bbdc <gtk_container_map_child>, callback_data=0x0) at xfce-itembar.c:819
Created attachment 786 protect entire function Hmm, so your last backtraces seem to indicate there are other bugs as well. Could you try this one?
With your patch (after adding the missing ')' to it): (gdb) run Starting program: /usr/pkg/bin/xfce4-panel ** (xfce4-panel:20538): CRITICAL **: List of entries seems to be corrupt. Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 1] IA__gtk_widget_show (widget=0xe3) at gtkwidget.c:2060 2060 gtkwidget.c: No such file or directory. in gtkwidget.c (gdb) bt #0 IA__gtk_widget_show (widget=0xe3) at gtkwidget.c:2060 #1 0xbb35b4d7 in launcher_construct (plugin=0x80dcaf8) at launcher.c:1322 #2 0xbbbe3aa1 in _plugin_setup (plugin=0x80dcaf8, construct=0xbb35afa0 <launcher_construct>) at xfce-panel-internal-plugin.c:649 #3 0xbb54e4b2 in g_cclosure_marshal_VOID__VOID () from /usr/pkg/lib/libgobject-2.0.so.0 #4 0xbb542925 in g_closure_invoke () from /usr/pkg/lib/libgobject-2.0.so.0 #5 0xbb5514dd in g_signal_chain_from_overridden () from /usr/pkg/lib/libgobject-2.0.so.0 #6 0xbb55287e in g_signal_emit_valist () from /usr/pkg/lib/libgobject-2.0.so.0 #7 0xbb552a07 in g_signal_emit () from /usr/pkg/lib/libgobject-2.0.so.0 #8 0xbbacb4cd in IA__gtk_widget_realize (widget=0x80dcaf8) at gtkwidget.c:2339 #9 0xbbacb73d in IA__gtk_widget_map (widget=0x80dcaf8) at gtkwidget.c:2256 #10 0xbb97bc00 in gtk_container_map_child (child=0x80dcaf8, client_data=0x0) at gtkcontainer.c:2390 #11 0xbbbe03ce in xfce_itembar_forall (container=0x80bc720, include_internals=1, callback=0xbb97bbdc <gtk_container_map_child>, callback_data=0x0) at xfce-itembar.c:819 #12 0xbb9799c8 in IA__gtk_container_forall (container=0x80bc720, callback=0xbb97bbdc <gtk_container_map_child>, callback_data=0x0) at gtkcontainer.c:1265 #13 0xbb97bbbb in gtk_container_map (widget=0x80bc720) at gtkcontainer.c:2398 ---Type <return> to continue, or q <return> to quit--- #14 0xbbbe0ba3 in xfce_itembar_map (widget=0x80bc720) at xfce-itembar.c:694 #15 0xbb54e4b2 in g_cclosure_marshal_VOID__VOID () from /usr/pkg/lib/libgobject-2.0.so.0 #16 0xbb5412b1 in g_value_set_boxed () from /usr/pkg/lib/libgobject-2.0.so.0 #17 0xbb5429f0 in g_closure_invoke () from /usr/pkg/lib/libgobject-2.0.so.0 #18 0xbb551110 in g_signal_chain_from_overridden () from /usr/pkg/lib/libgobject-2.0.so.0 #19 0xbb55287e in g_signal_emit_valist () from /usr/pkg/lib/libgobject-2.0.so.0 #20 0xbb552a07 in g_signal_emit () from /usr/pkg/lib/libgobject-2.0.so.0 #21 0xbbacb6dd in IA__gtk_widget_map (widget=0x80bc720) at gtkwidget.c:2258 #22 0xbbad7a29 in gtk_window_map (widget=0x80b9140) at gtkwindow.c:3971 #23 0xbbbdee06 in xfce_panel_window_map (widget=0x80b9140) at xfce-panel-window.c:427 #24 0xbb54e4b2 in g_cclosure_marshal_VOID__VOID () from /usr/pkg/lib/libgobject-2.0.so.0 #25 0xbb5412b1 in g_value_set_boxed () from /usr/pkg/lib/libgobject-2.0.so.0 #26 0xbb542925 in g_closure_invoke () from /usr/pkg/lib/libgobject-2.0.so.0 #27 0xbb551110 in g_signal_chain_from_overridden () from /usr/pkg/lib/libgobject-2.0.so.0 #28 0xbb55287e in g_signal_emit_valist () from /usr/pkg/lib/libgobject-2.0.so.0 #29 0xbb552a07 in g_signal_emit () from /usr/pkg/lib/libgobject-2.0.so.0 #30 0xbbacb6dd in IA__gtk_widget_map (widget=0x80b9140) at gtkwidget.c:2258 #31 0xbbad7a7a in gtk_window_show (widget=0x80b9140) at gtkwindow.c:3936
Created attachment 787 Connect signals later. Alright, so the initialization is seriously messed up. Here's another patch that connects to certain signals later in the initialization process. Does that do something?
Created attachment 788 attach signals later (fixed version) Slightly better version. Both should prevent the crash, though.
Still no luck... # gdb /usr/pkg/bin/xfce4-panel (gdb) run Starting program: /usr/pkg/bin/xfce4-panel ** (xfce4-panel:18273): CRITICAL **: List of entries seems to be corrupt. Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 1] IA__gtk_widget_show (widget=0xe3) at gtkwidget.c:2060 2060 gtkwidget.c: No such file or directory. in gtkwidget.c (gdb) bt #0 IA__gtk_widget_show (widget=0xe3) at gtkwidget.c:2060 #1 0xbb35b37f in launcher_construct (plugin=0x80dcaf8) at launcher.c:1281 #2 0xbbbe3aa1 in _plugin_setup (plugin=0x80dcaf8, construct=0xbb35afa8 <launcher_construct>) at xfce-panel-internal-plugin.c:649 #3 0xbb54e4b2 in g_cclosure_marshal_VOID__VOID () from /usr/pkg/lib/libgobject-2.0.so.0 #4 0xbb542925 in g_closure_invoke () from /usr/pkg/lib/libgobject-2.0.so.0 #5 0xbb5514dd in g_signal_chain_from_overridden () from /usr/pkg/lib/libgobject-2.0.so.0 #6 0xbb55287e in g_signal_emit_valist () from /usr/pkg/lib/libgobject-2.0.so.0 #7 0xbb552a07 in g_signal_emit () from /usr/pkg/lib/libgobject-2.0.so.0 #8 0xbbacb4cd in IA__gtk_widget_realize (widget=0x80dcaf8) at gtkwidget.c:2339 #9 0xbbacb73d in IA__gtk_widget_map (widget=0x80dcaf8) at gtkwidget.c:2256 #10 0xbb97bc00 in gtk_container_map_child (child=0x80dcaf8, client_data=0x0) at gtkcontainer.c:2390 #11 0xbbbe03ce in xfce_itembar_forall (container=0x80bc720, include_internals=1, callback=0xbb97bbdc <gtk_container_map_child>, callback_data=0x0) at xfce-itembar.c:819 #12 0xbb9799c8 in IA__gtk_container_forall (container=0x80bc720, callback=0xbb97bbdc <gtk_container_map_child>, callback_data=0x0) at gtkcontainer.c:1265 #13 0xbb97bbbb in gtk_container_map (widget=0x80bc720) at gtkcontainer.c:2398
Created attachment 791 Recreate Idle If this is a race-condition, it could be solved by recreating the menu idle? Just another guess :-).
With the following patch -- plugins/launcher/launcher.c (revision 23133) +++ plugins/launcher/launcher.c (working copy) I get this # gdb ./panel/.libs/xfce4-panel (gdb) run Starting program: /usr/pkgsrc/wip/xfce4-panel/work/xfce4-panel-4.3.99.1/panel/.libs/xfce4-panel Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 1] IA__gtk_widget_show (widget=0xe3) at gtkwidget.c:2060 2060 gtkwidget.c: No such file or directory. in gtkwidget.c (gdb) bt #0 IA__gtk_widget_show (widget=0xe3) at gtkwidget.c:2060 #1 0xbb35b4e7 in launcher_construct (plugin=0x80deaf8) at launcher.c:1317 #2 0xbbbe3aa1 in _plugin_setup (plugin=0x80deaf8, construct=0xbb35afb0 <launcher_construct>) at xfce-panel-internal-plugin.c:649 #3 0xbb54e4b2 in g_cclosure_marshal_VOID__VOID () from /usr/pkg/lib/libgobject-2.0.so.0 #4 0xbb542925 in g_closure_invoke () from /usr/pkg/lib/libgobject-2.0.so.0 #5 0xbb5514dd in g_signal_chain_from_overridden () from /usr/pkg/lib/libgobject-2.0.so.0 #6 0xbb55287e in g_signal_emit_valist () from /usr/pkg/lib/libgobject-2.0.so.0 #7 0xbb552a07 in g_signal_emit () from /usr/pkg/lib/libgobject-2.0.so.0 #8 0xbbacb4cd in IA__gtk_widget_realize (widget=0x80deaf8) at gtkwidget.c:2339 #9 0xbbacb73d in IA__gtk_widget_map (widget=0x80deaf8) at gtkwidget.c:2256 #10 0xbb97bc00 in gtk_container_map_child (child=0x80deaf8, client_data=0x0) at gtkcontainer.c:2390 #11 0xbbbe03ce in xfce_itembar_forall (container=0x80be720, include_internals=1, callback=0xbb97bbdc <gtk_container_map_child>, callback_data=0x0) at xfce-itembar.c:819 #12 0xbb9799c8 in IA__gtk_container_forall (container=0x80be720, callback=0xbb97bbdc <gtk_container_map_child>, callback_data=0x0) at gtkcontainer.c:1265 #13 0xbb97bbbb in gtk_container_map (widget=0x80be720) at gtkcontainer.c:2398 With the following patch --- plugins/launcher/launcher.c (revision 23119) +++ plugins/launcher/launcher.c (working copy) I get this # gdb ./panel/.libs/xfce4-panel (gdb) run Starting program: /usr/pkgsrc/wip/xfce4-panel/work/xfce4-panel-4.3.99.1/panel/.libs/xfce4-panel Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 1] IA__gtk_widget_show (widget=0xe3) at gtkwidget.c:2060 2060 gtkwidget.c: No such file or directory. in gtkwidget.c (gdb) bt #0 IA__gtk_widget_show (widget=0xe3) at gtkwidget.c:2060 #1 0xbb35b4e7 in launcher_construct (plugin=0x80deaf8) at launcher.c:1317 #2 0xbbbe3aa1 in _plugin_setup (plugin=0x80deaf8, construct=0xbb35afb0 <launcher_construct>) at xfce-panel-internal-plugin.c:649 #3 0xbb54e4b2 in g_cclosure_marshal_VOID__VOID () from /usr/pkg/lib/libgobject-2.0.so.0 #4 0xbb542925 in g_closure_invoke () from /usr/pkg/lib/libgobject-2.0.so.0 #5 0xbb5514dd in g_signal_chain_from_overridden () from /usr/pkg/lib/libgobject-2.0.so.0 #6 0xbb55287e in g_signal_emit_valist () from /usr/pkg/lib/libgobject-2.0.so.0 #7 0xbb552a07 in g_signal_emit () from /usr/pkg/lib/libgobject-2.0.so.0 #8 0xbbacb4cd in IA__gtk_widget_realize (widget=0x80deaf8) at gtkwidget.c:2339 #9 0xbbacb73d in IA__gtk_widget_map (widget=0x80deaf8) at gtkwidget.c:2256 #10 0xbb97bc00 in gtk_container_map_child (child=0x80deaf8, client_data=0x0) at gtkcontainer.c:2390 #11 0xbbbe03ce in xfce_itembar_forall (container=0x80be720, include_internals=1, callback=0xbb97bbdc <gtk_container_map_child>, callback_data=0x0) at xfce-itembar.c:819 #12 0xbb9799c8 in IA__gtk_container_forall (container=0x80be720, callback=0xbb97bbdc <gtk_container_map_child>, callback_data=0x0) at gtkcontainer.c:1265 #13 0xbb97bbbb in gtk_container_map (widget=0x80be720) at gtkcontainer.c:2398
And finally my compiler details in case it makes any difference: gcc version 4.1.2 20060628 prerelease (NetBSD nb2 20060711)
I upgraded my system and now I have gtk2+-2.10.3 installed.
Thanks to a new tarball of xfce4-panel 4.3.99.2 provided by xerverius from IRC in #xfce channel @freenode. xfce4-panel won't dump core anymore on NetBSD 4.99.3 i386
Unlike the person in comment #17, I'm still having problems (NetBSD/i386 4.99.3).
Thanks to Joachim König-Baltes I have now a "solution" for this problem: make sure plugins/launcher/Makefile does not have any GCC optimization. In other words, use -O0 instead of -O2 in that Makefile and the panel no longer crashes. This must be some kind of optimization bug in GCC 4.1.x (I have gcc version 4.1.2 20060628 prerelease on NetBSD/i386 4.99.x).
(In reply to comment #19) > Thanks to Joachim König-Baltes I have now a "solution" for this problem: make > sure plugins/launcher/Makefile does not have any GCC optimization. In other > words, use -O0 instead of -O2 in that Makefile and the panel no longer crashes. > > This must be some kind of optimization bug in GCC 4.1.x (I have gcc version > 4.1.2 20060628 prerelease on NetBSD/i386 4.99.x). > Wow. Many, many thanks for being so persistent in locating the problem! I'd like to keep the bug report open a little longer, at least until you can compile normally again. That is, either when netbsd updates gcc, or when the launcher implementation changes such that it doesn't trigger the problem. Thanks again, I really appreciate your efforts debugging this problem.
After Martii committed the changes to _fix_ this problem, my xfce4-panel has started segfaulting on startup. It had been working properly before. I dont think the problem is fixed yet. I'm on NetBSD-3.1/i386 Here is a backtrace of the core dump $ gdb xfce4-panel xfce4-panel.core ... #0 0xbda86259 in gtk_widget_destroy () from /usr/pkg/lib/libgtk-x11-2.0.so.0 (gdb) bt #0 0xbda86259 in gtk_widget_destroy () from /usr/pkg/lib/libgtk-x11-2.0.so.0 #1 0xbd26eaaa in launcher_destroy_menu () from /usr/pkg/lib/xfce4/panel-plugins/liblauncher.so #2 0xbd26ec1b in launcher_recreate_menu () from /usr/pkg/lib/xfce4/panel-plugins/liblauncher.so (gdb) It seems to be the same old problem, but somehow my system appears to in the opposite way to Martii's. I'll try a few things and post an update if any useful information is uncovered.
Okay, I recompiled xfce4-panel. This time I removed Martti's fix, so I was building _with_ the normal -O optimizations. panel started working fine again. It seems that -O settings in the launcher definitely do make a difference, but they have the opposite effect on me that they do for Martti. Perhaps this is because I'm using an old P3 500MHz and Martti's 'puter is much faster (threading issue)? Perhaps this is because I'm using gcc v3.3.3 and not v4.x? I don't know , but at least we seem to know how to recreate and work around this bug... PS: sorry for misspelling your name before, Martti
Launcher in trunk doesn't has this problem anymore and since the compiler flag fixes the bug in the 4_4_branch, I close this bug... If you guys are against this, please reopen.