emacs 29.4-1: Connection lost to X server

Charles Henkel csh@henktech.com
Sun Jan 19 22:23:36 GMT 2025


Ken, Thanks for response. I jumped the gun a bit. I can't get it to happen on Win 10 again, and my other Win 11 machine works fine. Also, my 1st Win 11 machine is losing connection even with emacs 23. So it's something specific to my one desktop. I'll continue to investigate on my end, but I am doubting it's a generic issue.




-----Original Message-----
From: Ken Brown <kbrown@cornell.edu> 
Sent: Sunday, January 19, 2025 2:41 PM
To: Charles Henkel <csh@henktech.com>; cygwin@cygwin.com
Subject: Re: emacs 29.4-1: Connection lost to X server

On 1/18/2025 11:52 AM, Charles Henkel via Cygwin wrote:
> Context:
>                Both Win 10 (10.0.19044) and Win 11 (24H2)
>                Latest versions you get installing as of 15jan2025:
>                              cygwin 3.5.5-1
>                              emacs 29.4-1
>                              xorg-server 21.1.12-1
> 
> Problem:
>                After a few minutes idle, emacs crashes with message "Connection lost to X server" in the invoking shell (either xterm or xfce4-terminal) window.
> 
> Workaround:
>                Revert to emacs 29.3-1
You didn't say which emacs binary you were using, but I assume it's emacs-gtk.  Is that right?

I can't reproduce the problem.  Here's what I tried:

  - Start the X server using the Start Menu shortcut created by the xinit postinstall script.

  - Start UXterm via the xwin-xdg-menu (click on the Cygwin-X icon in the lower right corner and select UXterm under System Tools).

- Start Emacs 29.4-1 by issuing the command

     /usr/bin/emacs-gtk &

in the Xterm window.

  - Let Emacs sit idle for a half hour.

Emacs didn't crash or lose its connection with the X server.

By the way, when Emacs is built with Gtk+, the configure script issues the following warning:

        WARNING: Your version of Gtk+ will have problems with
        closing open displays.  This is no problem if you just use
        one display, but if you use more than one and close one of them
        Emacs may crash.
        See https://gitlab.gnome.org/GNOME/gtk/issues/221

Could this be your issue?  Do you use more than one display?

Ken (Cygwin's Emacs maintainer)


More information about the Cygwin mailing list