From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 63589@debbugs.gnu.org, Thiago Melo <tmdmelo@gmail.com>
Subject: bug#63589: [PATCH] 29.0.91; crash after creating graphical frames via emacsclient when compiled with cairo-xcb
Date: Mon, 22 May 2023 10:48:43 +0800 [thread overview]
Message-ID: <87edn9ytbo.fsf@yahoo.com> (raw)
In-Reply-To: <87wn11yyi4.fsf@yahoo.com> (Po Lu's message of "Mon, 22 May 2023 08:56:51 +0800")
Po Lu <luangruo@yahoo.com> writes:
> The situation in which this crash occurs is sufficiently uncommon. It's
> the result of another bug in Emacs, hopefully one that should be safe to
> fix.
Unfortunately, both this crash and its cause (actually, a
RenderBadPicture from a glyph compositing request somewhere within
cairo) are bugs in cairo-xcb itself. Emacs never allows the display
connection to be closed without dereferencing all Cairo resources
created for that display connection, but Cairo keeps its own references
around.
The only reasonable solution is to disable the use of XCB surfaces by
default. Is this OK for the release branch?
diff --git a/configure.ac b/configure.ac
index 95167329c28..d7296168ff9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -459,6 +459,7 @@ AC_DEFUN
OPTION_DEFAULT_ON([lcms2],[don't compile with Little CMS support])
OPTION_DEFAULT_ON([libsystemd],[don't compile with libsystemd support])
OPTION_DEFAULT_ON([cairo],[don't compile with Cairo drawing])
+OPTION_DEFAULT_OFF([cairo-xcb], [use XCB surfaces for Cairo support])
OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support])
OPTION_DEFAULT_ON([native-image-api], [don't use native image APIs (GDI+ on Windows)])
@@ -3571,14 +3572,19 @@ AC_DEFUN
CAIRO_MODULE="cairo >= $CAIRO_REQUIRED"
EMACS_CHECK_MODULES([CAIRO], [$CAIRO_MODULE])
if test $HAVE_CAIRO = yes; then
- CAIRO_XCB_MODULE="cairo-xcb >= $CAIRO_REQUIRED"
- EMACS_CHECK_MODULES([CAIRO_XCB], [$CAIRO_XCB_MODULE])
- if test $HAVE_CAIRO_XCB = yes; then
- CAIRO_CFLAGS="$CAIRO_CFLAGS $CAIRO_XCB_CFLAGS"
- CAIRO_LIBS="$CAIRO_LIBS $CAIRO_XCB_LIBS"
- AC_DEFINE([USE_CAIRO_XCB], [1],
- [Define to 1 if cairo XCB surfaces are available.])
- fi
+ dnl Cairo XCB support is disabled by default, as the Cairo XCB
+ dnl backend itself seems to be buggy: multiple Cairo devices can
+ dnl be created for the same visual on the same connection, and
+ dnl the devices are never destroyed, even when all references go
+ dnl away.
+ AS_IF([test "x$with_cairo_xcb" = "xyes"], [
+ CAIRO_XCB_MODULE="cairo-xcb >= $CAIRO_REQUIRED"
+ EMACS_CHECK_MODULES([CAIRO_XCB], [$CAIRO_XCB_MODULE])
+ AS_IF([test "x$HAVE_CAIRO_XCB" = "xyes"], [
+ CAIRO_CFLAGS="$CAIRO_CFLAGS $CAIRO_XCB_CFLAGS"
+ CAIRO_LIBS="$CAIRO_LIBS $CAIRO_XCB_LIBS"
+ AC_DEFINE([USE_CAIRO_XCB], [1],
+ [Define to 1 if cairo XCB surfaces are available.])])])
AC_DEFINE([USE_CAIRO], [1], [Define to 1 if using cairo.])
CFLAGS="$CFLAGS $CAIRO_CFLAGS"
LIBS="$LIBS $CAIRO_LIBS"
next prev parent reply other threads:[~2023-05-22 2:48 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 11:17 bug#63589: 29.0.91; crash after creating graphical frames via emacsclient when compiled with cairo-xcb Thiago Melo
2023-05-20 1:46 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-20 11:47 ` Thiago Melo
2023-05-21 0:42 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-21 18:25 ` Thiago Melo
2023-05-20 22:47 ` bug#63589: [PATCH] " Thiago Melo
2023-05-21 13:40 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-21 14:30 ` Eli Zaretskii
2023-05-21 16:10 ` Thiago Melo
2023-05-21 17:42 ` Eli Zaretskii
2023-05-22 0:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-22 2:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-05-22 10:59 ` Eli Zaretskii
2023-05-22 11:17 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-22 11:40 ` Eli Zaretskii
2023-05-22 12:07 ` Thiago Melo
2023-05-22 13:12 ` Thiago Melo
2023-05-22 19:21 ` Thiago Melo
2023-05-23 0:30 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-23 11:37 ` Eli Zaretskii
2023-05-23 12:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-23 13:01 ` Eli Zaretskii
2023-05-23 13:18 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-23 14:20 ` Eli Zaretskii
2023-05-24 0:22 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-24 2:30 ` Eli Zaretskii
2023-05-24 3:13 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-24 5:15 ` Thiago Melo
2023-05-24 11:07 ` Eli Zaretskii
2023-05-24 11:54 ` Thiago Melo
2023-05-24 12:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-24 14:16 ` Thiago Melo
2023-05-24 15:44 ` Eli Zaretskii
2023-05-25 0:18 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-25 3:38 ` Eli Zaretskii
2023-05-25 6:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-25 7:12 ` Eli Zaretskii
2023-05-25 10:24 ` Thiago Melo
2023-05-25 10:32 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-25 14:06 ` Thiago Melo
2023-05-25 18:17 ` Thiago Melo
2023-05-26 0:59 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-26 5:06 ` Thiago Melo
2023-05-26 6:14 ` Eli Zaretskii
2023-05-25 10:34 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-25 11:33 ` Eli Zaretskii
2023-05-26 0:23 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-26 6:10 ` Eli Zaretskii
2023-05-26 8:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-26 8:34 ` Eli Zaretskii
2023-05-24 11:01 ` Eli Zaretskii
2023-05-21 16:09 ` Thiago Melo
2023-05-22 1:05 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-22 5:23 ` Thiago Melo
2023-05-28 3:10 ` bug#63589: " Andrés Ramírez
2023-05-28 3:34 ` Andrés Ramírez
2023-05-28 5:55 ` Eli Zaretskii
2023-05-29 14:51 ` andrés ramírez
2023-05-28 21:23 ` Thiago Melo
2023-05-29 14:58 ` andrés ramírez
2023-05-29 15:21 ` Thiago Melo
2023-05-29 15:37 ` andrés ramírez
2023-05-29 16:10 ` Thiago Melo
2023-05-29 16:21 ` andrés ramírez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edn9ytbo.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=63589@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=luangruo@yahoo.com \
--cc=tmdmelo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.