GNU bug report logs - #63589
29.0.91; crash after creating graphical frames via emacsclient when compiled with cairo-xcb

Previous Next

Package: emacs;

Reported by: Thiago Melo <tmdmelo <at> gmail.com>

Date: Fri, 19 May 2023 15:22:03 UTC

Severity: normal

Found in version 29.0.91

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thiago Melo <tmdmelo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.91; crash after creating graphical frames via emacsclient when
 compiled with cairo-xcb
Date: Fri, 19 May 2023 11:17:36 +0000
[Message part 1 (text/plain, inline)]
With emacs 29 compiled with cairo-xcb, after starting emacs-daemon,
repeatedly closing the last graphical frame and creating a new one via
emacsclient will eventually crash emacs (it takes a few seconds for
me). During the process, some frames might fail to be created (they
briefly appear and close themselves).

After the crash, I get the following error messages from the tty where
I started the daemon:

```
emacs: ../../../../src/cairo-xcb-screen.c:219: _get_screen_index:
Assertion `!"reached"' failed.

Fatal error 6: Aborted
```

Affects starting emacs with `emacs -Q --daemon`.

Issue happens since commit de614ec9 ("Use Cairo XCB surfaces when XCB
is available").

Compiling emacs with only cairo is enough to trigger the bug.
 'configure --without-all --with-x-toolkit=no --with-cairo'

Attached are a gdb session log with backtraces and system information.

Looking up the cairo-xcb error message above, I found a related
discussion at the cairo mailing list:

https://lists.cairographics.org/archives/cairo/2017-December/028491.html

Where someone had the same issue with a different software in a
similar scenario. One developer gives insight about the behavior and
suggests how to better manage cairo-xcb surfaces.

My workaround for now is patching emacs' configure.ac to disable cairo-xcb.
[system-information.txt (text/plain, attachment)]
[emacs-29-cairo-xcb-gdb-backtrace.org (application/vnd.lotus-organizer, attachment)]

This bug report was last modified 2 years and 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.