After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 348803 - gnome-panel doesn't exit if X connection is killed.
gnome-panel doesn't exit if X connection is killed.
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-26 16:16 UTC by Ray Strode [halfline]
Modified: 2006-07-28 17:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't try to pop up the dialog if the connection is dead. (1.83 KB, patch)
2006-07-26 16:18 UTC, Ray Strode [halfline]
none Details | Review
better patch, doesn't recurse (1.74 KB, patch)
2006-07-28 15:01 UTC, Frederic Crozat
reviewed Details | Review

Description Ray Strode [halfline] 2006-07-26 16:16:49 UTC
Recently, if a user presses ctrl-alt-backspace the panel doesn't die.

This is because ORBit sets up an atexit handler to flush its buffers.  This results in panel-applet-frame's connection broken handler getting called.

The handler tries to pop up a dialog (asking if the user wants to reload the applet) and in the process gtk now asks for the server time, which results in a round trip.

It just spins at this point because the fd is closed.

The downstream report is here:
 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200149
Comment 1 Ray Strode [halfline] 2006-07-26 16:18:31 UTC
Created attachment 69674 [details] [review]
Don't try to pop up the dialog if the connection is dead.
Comment 2 Frederic Crozat 2006-07-28 14:23:51 UTC
confirming, I'm seeing this on Mandriva cooker.

but patch doesn't seem to fix it here, it is looping in frame_applet_frame_xio_error_handler
Comment 3 Frederic Crozat 2006-07-28 14:45:32 UTC
I forgot to specify I've tested the patch on 2.15.90.
Comment 4 Ray Strode [halfline] 2006-07-28 14:47:22 UTC
do you have a backtrace? of when it's looping? (or is it recursing?)

Comment 5 Frederic Crozat 2006-07-28 15:01:45 UTC
Created attachment 69833 [details] [review]
better patch, doesn't recurse

the issue with the initial patch was when panel was running several applets : each applet would call panel_applet_frame_activated, causing panel_applet_frame_old_xio_error_handler to be panel_applet_frame_xio_error_handler instead of the original X io error handler.

the attached patch fixes this issue.
Comment 6 Ray Strode [halfline] 2006-07-28 15:15:45 UTC
Good catch!  I wonder why I don't hit the problem on my setup...
Comment 7 Vincent Untz 2006-07-28 17:15:49 UTC
Thanks. I committed a modified version.

2006-07-28  Vincent Untz  <vuntz@gnome.org>

	* panel-applet-frame.c: (panel_applet_frame_cnx_broken): check whether
	our X connection is still alive before displaying the dialog. (See bug
	#34803 for rationale)
	* xstuff.[ch]: (xstuff_xio_error_handler): new
	(xstuff_is_display_dead): new
	(xstuff_init): new, installs the xio error handler
	* main.c: (main): call xstuff_init()
	Based on patch by Ray Strode <rstrode@redhat.com> and
	Frédéric Crozat <fcrozat@mandriva.com>
	Fix bug #348803