GNOME Bugzilla – Bug 129402
gnome-session hangs on logout with X11 Window system error
Last modified: 2005-08-15 01:37:10 UTC
With Glib 2.3.1, gnome-session 2.5.x crashes with an X11 error when logging out. A few lines before the crash, it also warns about a g_object thing that can only be executed at constructor time, a thing that has changed in glib 2.3.1 according to gobject/Changelog from glib: Sat Nov 29 14:57:20 2003 Tim Janik <timj@gtk.org> * gobject.c: fix g_object_set() within _init() implementations not working for construct-only properties. (g_object_init): make the object enter a construct_objects list. (g_object_newv): remove object from construct_objects after creation. (g_object_set_valist): (g_object_set_property): allow construct-only properties for objects which are in construct_objects. on line 407 of gnome-session/logout.c, there's a g_object_set which fails as far as I can see: g_object_set (G_OBJECT (box), "type", GTK_WINDOW_POPUP, NULL); A few lines later, line 482, it calls XSetInputFocus on the same object, which causes the X11 error and hangs gnome-session. It seems the window that is put focus on isn't in Input mode. I think the g_object_set needs a look at it and needs to be reprogrammed, or the change in glib should be reverted back.
Since epiphany 1.1.2 needs glib 2.3.1, I had to put glib 2.3.1 in my repo today, so I looked after this bug. As I don't want to crash X when loggin out, I got rid of the g_object_set_valist warning: I simply wrecked the check out of glib/gobject/glib.c. After recompiling glib, the warning message and the X crash is gone. Though above solution isn't the neatest, but only the quickest, I think we need to remake the logout dialog. What happens now: - we make a dialog - we put stuff on it - we force it to be a popup (which isn't allowed in glib 2.3.1 anymore) - we put focus on it This is very dirty IMHO and needs some work.
*** Bug 128985 has been marked as a duplicate of this bug. ***
*** Bug 129610 has been marked as a duplicate of this bug. ***
From one of the dups: using gnome-session from CVS HEAD 08 Dec 2003 -log into a session(disable accessibility gconf key prior) -go to actions -> log out .the desktop freezes and cant be saved without killing the session The following is stack output from gnome-session when frozen:
+ Trace 42952
Interestingly this does _not_ occur with accessibility gconf key set to true..
Created attachment 22874 [details] [review] hacked on it til it worked
*** Bug 130053 has been marked as a duplicate of this bug. ***
Adding the PATCH keyword to make sure that this patch gets in.
*** Bug 129194 has been marked as a duplicate of this bug. ***
The above patch applies cleanly to my garnome GNOME-2.5.2 install and stops the logout hang. Although, it takes ~40 seconds for the logout confirmation dialog to come up.
The logout delay I mentioned in my above comment has nothing to do with this bug though, that is probably bug 95834
*** Bug 121384 has been marked as a duplicate of this bug. ***
Carlos: I couldn't use your patch because you hadn't narrowed the problem down to the root cause and you had several changes which had nothing to do with the problem. I turns out the problem is caused by gtk+ 2.3 making GtkWindow's "type" property CONSTRUCT_ONLY, making the logout window not override_redirect anymore. Because the Xserver is grabbed the WM never maps the window. I've just committed a patch to fix this on HEAD: 2004-01-14 Mark McLoughlin <mark@skynet.ie> Fix logout freezing reported in bug #129402. Also, make the logout window WM managed if a11y is enabled, see bug #122737. * logout.c: (force_pango_cache_init): kill, we're not using the pangox backend anymore. (display_gui): Don't grab the keyboard or mouse if a11y is enabled. Also, only create a override_redirect window if a11y is disabled. Don't try and set the GtkWindow's "type" property after construction as gtk+ 2.3 doesn't allow this anymore. Delay grabbing the Xserver as long as possible. Don't leak the invisible window.
Btw, Jan I realize now that your analysis that the glib change caused the problem was correct. Good call ..
*** Bug 131539 has been marked as a duplicate of this bug. ***
*** Bug 128864 has been marked as a duplicate of this bug. ***