GNU bug report logs -
#26458
25.1; abort on X close window
Previous Next
Reported by: Kevin Ryde <user42_kevin <at> yahoo.com.au>
Date: Wed, 12 Apr 2017 05:07:02 UTC
Severity: normal
Found in version 25.1
Done: Kevin Ryde <user42_kevin <at> yahoo.com.au>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 26458 <at> debbugs.gnu.org (full text, mbox):
> From: Kevin Ryde <user42_kevin <at> yahoo.com.au>
> Date: Wed, 12 Apr 2017 15:02:52 +1000
>
> Under X and motif mwm window manager, closing emacs using the window
> manager does not save modified buffers, and sometimes aborts. Eg.
>
> emacs -Q /tmp/x
> Ret # so modified
> mwm Alt-f4 "close"
> =>
> Connection lost to X server ':0.0'
> file /tmp/x not saved
>
> where I hoped to get the usual query save before exit as by C-x C-c or
> menu File/Quit.
>
> (Generally X clients can treat WM_DELETE_WINDOW message the same as
> other user keyboard or menu input asking for an orderly shutdown -- so
> interaction and display continuing as normal for however long.)
Emacs does do this, so the problem is not on that high level, the
problem is in the details. I'm guessing that Emacs does attempt to
display the dialog you wanted to see, but it cannot do that without an
X connection.
> Sometimes WM_DELETE_WINDOW can make emacs abort, depending what the kill
> hooks do. For example foo.el containing
>
> (add-hook 'kill-emacs-hook
> (lambda ()
> (sit-for 5)))
>
> then
>
> emacs -Q -l foo.el
> mwm Alt-f4 "close"
> =>
> Connection lost to X server ':0.0'
> Fatal error 6: Aborted
> Backtrace:
> emacs[0x8144f1c]
> ...
> /usr/lib/i386-linux-gnu/libX11.so.6(_XIOError+0x5d)[0xb7345c2d]
> /usr/lib/i386-linux-gnu/libX11.so.6(_XEventsQueued+0x96)[0xb7343266]
> /usr/lib/i386-linux-gnu/libX11.so.6(XPending+0x62)[0xb7334752]
> ...
Please show a full backtrace under a debugger, so we see where it
aborts. It is best to run Emacs with -xrm "emacs.synchronous: true"
on the command line for this experiment, so that X errors are noted
right where they happen.
Thanks.
This bug report was last modified 8 years and 40 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.