0

I encountered a situation where Emacs was unexpectedly unresponsive and could reduce it to the following minimal reproducible example. This is on Emacs 30.2 on Linux in KDE and happens with X11 as well as Wayland:

Make sure your initialization file contains only these two lines:

(setopt server-stop-automatically 'delete-frame) (setopt use-dialog-box nil) 

Kill all running Emacs processes (just in case) and start emacsclient with some irrelevant file like so:

emacsclient /tmp/foo.txt --alternate-editor= --create-frame 

Type some characters, don't save the buffer, then click on the close box (the cross in the upper right corner of the window). Now Emacs doesn't respond anymore and has to be killed from the command line.

Apart from the proverbial "So don't do that" advice - is this expected behavior that is documented somewhere or is it a bug?

3
  • 1
    I get the following message when I start emacsclient: Warning: due to a long standing Gtk+ bug https://gitlab.gnome.org/GNOME/gtk/issues/221 Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost. Using an Emacs configured with --with-x-toolkit=lucid does not have this problem. . That's exactly the situation you are describing I believe. Is you Emacs built with Gtk+? Commented Sep 18 at 3:08
  • @NickD Yes, I saw this message as well. But the X connection is not "unexpectedly lost". The problem only comes up if dialog boxes are disabled. If they are enabled, they are shown, which means that the connection is still there. Commented Sep 18 at 9:11
  • 1
    I must admit that I'm not sure that this is the problem (although it can be tested if one builds an Emacs with something other than Gtk+). But I thought I would point it out just in case. I would suggest a bug report (M-x report-emacs-bug) with as much detail as you can muster on all the cases you have tested. Commented Sep 18 at 13:08

1 Answer 1

0

I have now found the time to build Emacs with the --with-x-toolkit=lucid configuration option and can confirm that this version doesn't show the symptoms described in the question. So, this seems to be a GTK+ problem as suggested by @NickD. I checked the etc/PROBLEMS file that comes with the Emacs source code and could find some reports about crashes with GTK+, but no description of this particular situation (which is not really a crash).

1
  • I suggest that you M-x report-emacs-bug Commented Sep 24 at 8:58

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.