! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-panel crash
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Martti Kuparinen 2006-09-04 09:46:56 CEST
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
Comment 1 Jasper Huijsmans editbugs 2006-09-09 17:09:08 CEST
Apparently the struct is not initialized properly, I have no idea why :(

What version of gtk was this build with, do you know?
Comment 2 Jasper Huijsmans editbugs 2006-09-09 17:40:58 CEST
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.
Comment 3 Martti Kuparinen 2006-09-10 09:19:09 CEST
(In reply to comment #1)

> What version of gtk was this build with, do you know?

I have version gtk 2.8.20.
Comment 4 Martti Kuparinen 2006-09-10 09:27:15 CEST
(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...
Comment 5 Jasper Huijsmans editbugs 2006-09-10 09:46:29 CEST
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.

Comment 6 Martti Kuparinen 2006-09-10 13:33:36 CEST
# 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)
Comment 7 Martti Kuparinen 2006-09-10 13:38:17 CEST
(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
Comment 8 Jasper Huijsmans editbugs 2006-09-10 14:04:27 CEST
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?
Comment 9 Martti Kuparinen 2006-09-10 14:39:43 CEST
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
Comment 10 Jasper Huijsmans editbugs 2006-09-10 14:58:32 CEST
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?
Comment 11 Jasper Huijsmans editbugs 2006-09-10 16:01:08 CEST
Created attachment 788 
attach signals later (fixed version)

Slightly better version. Both should prevent the crash, though.
Comment 12 Martti Kuparinen 2006-09-11 05:51:08 CEST
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
Comment 13 Nick Schermer editbugs 2006-09-12 19:11:19 CEST
Created attachment 791 
Recreate Idle

If this is a race-condition, it could be solved by recreating the menu idle? Just another guess :-).
Comment 14 Martti Kuparinen 2006-09-14 10:15:21 CEST
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
Comment 15 Martti Kuparinen 2006-09-14 10:15:58 CEST
And finally my compiler details in case it makes any difference:

gcc version 4.1.2 20060628 prerelease (NetBSD nb2 20060711)

Comment 16 Martti Kuparinen 2006-09-18 09:29:52 CEST
I upgraded my system and now I have gtk2+-2.10.3 installed.
Comment 17 domg 2006-10-29 12:25:21 CET
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
Comment 18 Martti Kuparinen 2006-11-06 11:27:46 CET
Unlike the person in comment #17, I'm still having problems (NetBSD/i386 4.99.3).
Comment 19 Martti Kuparinen 2006-11-09 13:00:55 CET
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).
Comment 20 Jasper Huijsmans editbugs 2006-11-09 18:35:38 CET
(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.
Comment 21 dhowland 2006-11-29 05:09:30 CET
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.
Comment 22 dhowland 2006-11-29 19:01:55 CET
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
Comment 23 Nick Schermer editbugs 2007-03-03 19:41:53 CET
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.

Bug #2262

Reported by:
Martti Kuparinen
Reported on: 2006-09-04
Last modified on: 2010-11-20

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Attachments

protect destruction of menu widget (586 bytes, text/x-patch)
2006-09-09 17:40 CEST , Jasper Huijsmans
no flags
protect entire function (938 bytes, patch)
2006-09-10 14:04 CEST , Jasper Huijsmans
no flags
Connect signals later. (2.52 KB, patch)
2006-09-10 14:58 CEST , Jasper Huijsmans
no flags
attach signals later (fixed version) (2.66 KB, patch)
2006-09-10 16:01 CEST , Jasper Huijsmans
no flags
Recreate Idle (954 bytes, patch)
2006-09-12 19:11 CEST , Nick Schermer
no flags

Additional information