! 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 !
xfdesktop crashes on wm_delete_window event
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Olivier Fourdan editbugs 2006-03-10 16:59:03 CET
Now that xfdesktop can receive focus, it's possible for the user to press Alt+F4
(default to close).

While xfdesktop should not quit, the thing is it crashes when sent a
wm_delete_window window manager event.

It shows a bunch of warnings like the ones and then dies with a SEGFAULT:

(xfdesktop:12089): Gtk-CRITICAL **: gtk_widget_event: assertion `GTK_IS_WIDGET
(widget)' failed

(xfdesktop:12089): Gtk-CRITICAL **: gtk_widget_get_toplevel: assertion
`GTK_IS_WIDGET (widget)' failed

And gdb backtrace follows:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47212934918864 (LWP 12089)]
0x00002af09c6ec280 in g_type_check_instance_is_a ()
   from /usr/lib/libgobject-2.0.so.0
(gdb) bt
#0  0x00002af09c6ec280 in g_type_check_instance_is_a ()
   from /usr/lib/libgobject-2.0.so.0
#1  0x00002af09b167cce in gtk_widget_event () from /usr/lib/libgtk-x11-2.0.so.0
#2  0x00002af09b087f90 in gtk_main_do_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#3  0x00002af09b3d3f4c in _gdk_events_queue ()
   from /usr/lib/libgdk-x11-2.0.so.0
#4  0x00002af09ca344bd in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#5  0x00002af09ca3765f in g_main_context_check ()
   from /usr/lib/libglib-2.0.so.0
#6  0x00002af09ca3790a in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#7  0x00002af09b087360 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x000000000040e6f7 in main (argc=1, argv=0x7fffffa0d108) at main.c:354
(gdb)


Reproducible: Always
Steps to Reproduce:
1. Focus the desktop
2. Press Alt+F4


Actual Results:  
xfdesktop dies
Comment 1 Olivier Fourdan editbugs 2006-03-10 17:15:35 CET
Created attachment 472 
Proposed fix

The following patch fixes the problem.
Comment 2 Brian J. Tarricone (not reading bugmail) 2006-03-10 23:03:24 CET
Hehe, that's actually kinda funny.  I like this fix better though:

widget_class->delete_event = (gboolean (*)(GtkWidget *, GdkEventAny *))gtk_true;

^_^
Comment 3 Olivier Fourdan editbugs 2006-03-11 12:56:23 CET
Another point would be why xfdesktop cores when exited properly.
Comment 4 Brian J. Tarricone (not reading bugmail) 2006-03-11 20:38:34 CET
It doesn't, at least not for me.  If you have a stacktrace, you could file
another bug though ^_^
Comment 5 Olivier Fourdan editbugs 2006-03-11 20:45:55 CET
hehehe, there was a backtrace in original the bug report.
Comment 6 Brian J. Tarricone (not reading bugmail) 2006-03-11 20:53:07 CET
Oh, didn't realise that's what you were talking about, because xfdesktop isn't
exiting at all that point.  Just the main window got destroyed.  Anyway, I'll
look into it later, but it's really not all that important to me.

Bug #1563

Reported by:
Olivier Fourdan
Reported on: 2006-03-10
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
0 users

Version

Attachments

Proposed fix (871 bytes, patch)
2006-03-10 17:15 CET , Olivier Fourdan
no flags

Additional information