! 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 !
Random xfce4-panel crashes on window unmap
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Olivier Fourdan editbugs 2011-01-11 09:51:05 CET
The panel dies and restarts randomly on window unmap, most of the time after a Firefox download terminates.

debug log gives:

    (xfce4-panel:9187): Wnck-CRITICAL **: wnck_window_get_name: assertion `WNCK_IS_WINDOW (window)' failed
    xfce4-panel(systray): unregistered manager
    [Thread 0x7fffeb7fe700 (LWP 12997) exited]
    [Thread 0x7ffff0e5e700 (LWP 12993) exited]
    [Thread 0x7fffebfff700 (LWP 12994) exited]
    [Thread 0x7fffeaffd700 (LWP 12999) exited]
    [Thread 0x7fffea7fc700 (LWP 13000) exited]

Program exited normally.

The session manager then restarts the panel.
Comment 1 Olivier Fourdan editbugs 2011-01-11 10:02:14 CET
it actualyl cores.

backtrace gives:

bt
#0  0x00000030ce14424d in __strcasecmp_l_ssse3 () from /lib64/libc.so.6
#1  0x00007fffef5aa243 in xfce_tasklist_button_compare (child_a=0x737c80, child_b=0x715000, user_data=0x71f2b0) at tasklist-widget.c:2211
#2  0x00000030d0c3d479 in g_list_sort_merge (list=<value optimized out>, compare_func=0x7fffef5aa050 <xfce_tasklist_button_compare>, user_data=0x71f2b0) at glist.c:1036
#3  g_list_sort_real (list=<value optimized out>, compare_func=0x7fffef5aa050 <xfce_tasklist_button_compare>, user_data=0x71f2b0) at glist.c:1082
#4  0x00000030d0c3d41d in g_list_sort_real (list=0x76fd40 = {...}, compare_func=0x7fffef5aa050 <xfce_tasklist_button_compare>, user_data=0x71f2b0) at glist.c:1082
#5  0x00000030d0c3d41d in g_list_sort_real (list=0x76fc60 = {...}, compare_func=0x7fffef5aa050 <xfce_tasklist_button_compare>, user_data=0x71f2b0) at glist.c:1082
#6  0x00007fffef5ac7a6 in xfce_tasklist_sort (tasklist=0x71f2b0 [XfceTasklist]) at tasklist-widget.c:1736
#7  0x00000030d1c0e03e in g_closure_invoke (closure=0x762d80, return_value=0x0, n_param_values=1, param_values=0x826960, invocation_hint=0x7fffffffd910) at gclosure.c:766
#8  0x00000030d1c1ee87 in signal_emit_unlocked_R (node=<value optimized out>, detail=0, instance=0x763680, emission_return=0x0, instance_and_params=0x826960) at gsignal.c:3252
#9  0x00000030d1c287b5 in g_signal_emit_valist (instance=<value optimized out>, signal_id=<value optimized out>, detail=<value optimized out>, var_args=<value optimized out>) at gsignal.c:2983
#10 0x00000030d1c28983 in g_signal_emit (instance=<value optimized out>, signal_id=<value optimized out>, detail=<value optimized out>) at gsignal.c:3040
#11 0x0000003a5ae105ec in ?? () from /usr/lib64/libwnck-1.so.22
#12 0x0000003a5ae1790b in ?? () from /usr/lib64/libwnck-1.so.22
#13 0x0000003a5ae182e4 in ?? () from /usr/lib64/libwnck-1.so.22
#14 0x00000030d0c41e33 in g_main_dispatch (context=0x680320) at gmain.c:2149
#15 g_main_context_dispatch (context=0x680320) at gmain.c:2702
#16 0x00000030d0c42610 in g_main_context_iterate (context=0x680320, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2780
#17 0x00000030d0c42c82 in g_main_loop_run (loop=0x6fe8c0) at gmain.c:2988
#18 0x0000003a59b4b0b7 in IA__gtk_main () at gtkmain.c:1237
#19 0x000000000040f081 in main (argc=1, argv=0x7fffffffe008) at main.c:349

Rough guess, wnck_window_get_name() fails and returns NULL, yet the tasklist sorts on the name and calls strcasecmp() with a NULL string, thus the crash.
Comment 2 Olivier Fourdan editbugs 2011-01-11 10:04:29 CET
(gdb) f 1
#1  0x00007fffef5aa243 in xfce_tasklist_button_compare (child_a=0x737c80, child_b=0x715000, user_data=0x71f2b0) at tasklist-widget.c:2211
2211	          retval = strcasecmp (name_a, name_b);
(gdb) p name_a
$2 = (const gchar *) 0x6de500 "virt-manager"
(gdb) p name_b
$3 = (const gchar *) 0x0
Comment 3 Olivier Fourdan editbugs 2011-01-11 10:13:25 CET
Created attachment 3337 
Proposed fix

Make sure the value passed to strcasecmp() are not NULL in any case to avoid the crash.
Comment 4 Olivier Fourdan editbugs 2011-01-11 10:21:55 CET
Created attachment 3338 
Proposed fix

Same, without git suckage.
Comment 5 Nick Schermer editbugs 2011-01-11 15:24:53 CET
Applied in 90d3a52 with some more protections. Thanks for looking into this.

Bug #7076

Reported by:
Olivier Fourdan
Reported on: 2011-01-11
Last modified on: 2011-01-11

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Version:
4.7 (master)

Attachments

Proposed fix (1.58 KB, patch)
2011-01-11 10:13 CET , Olivier Fourdan
no flags
Proposed fix (1.34 KB, patch)
2011-01-11 10:21 CET , Olivier Fourdan
no flags

Additional information