emacs 29.4-1: Connection lost to X server

Ken Brown kbrown@cornell.edu
Sun Jan 19 21:40:46 GMT 2025


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