Comment # 11 on bug 1186341 from
FTR, references for the original bug:

https://github.com/emacs-mirror/emacs/blob/master/etc/PROBLEMS

This file lists several Gtk issues:

** When Emacs is compiled with Gtk+, closing a display kills Emacs.

There is a long-standing bug in GTK that prevents it from recovering
from disconnects: https://gitlab.gnome.org/GNOME/gtk/issues/221

Thus, for instance, when Emacs is run as a server on a text terminal,
and an X frame is created, and the X server for that frame crashes or
exits unexpectedly, Emacs must exit to prevent a GTK error that would
result in an endless loop.

** Emacs compiled with GTK+ 3 crashes when run under some X servers.

This happens when the X server does not provide certain display
features that the underlying GTK+ 3 toolkit assumes.  For example, this
issue has been seen with remote X servers like X2Go.  The symptoms
are an Emacs crash, possibly triggered by the mouse entering the Emacs
window, or an attempt to resize the Emacs window.  The crash backtrace
contains a call to XQueryPointer.

This issue was fixed in the GTK+ 3 toolkit in commit 4b1c0256 in February 2018.

If your GTK+ 3 is still affected, you can avoid the issue by recompiling
Emacs with a different X toolkit, eg --with-toolkit=gtk2.

References:
https://gitlab.gnome.org/GNOME/gtk/commit/4b1c02560f0d8097bf5a11932e52fb72f3e9e94b
https://debbugs.gnu.org/24280
https://bugs.debian.org/901038
https://bugzilla.redhat.com/1483942
https://access.redhat.com/solutions/3410101
https://bugzilla.gnome.org/show_bug.cgi?id=85715 
https://gitlab.gnome.org/GNOME/gtk/-/issues/221


** Emacs compiled with GTK crashes at startup due to X protocol error.

This is known to happen on elementary OS GNU/Linux systems.

The error message is:

  X protocol error: BadMatch (invalid parameter attributes) on protocol request
140
  When compiled with GTK, Emacs cannot recover from X disconnects.
  This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221
  For details, see etc/PROBLEMS.
  Fatal error 6: Aborted

followed by a C backtrace.  (Sometimes the offending protocol request
number is 139.)

The relevant bug report is here:

  https://bugs.launchpad.net/elementaryos/+bug/1355274

A workaround is to set XLIB_SKIP_ARGB_VISUALS=1 in the environment
before starting Emacs, or run Emacs as root.

So it'd seem that XLIB_SKIP_ARGB_VISUALS=1 was introduced because of the 3rd
issue, where the error message printed by emacs refers to the 1st issue. This
alone is confusing.

So, is the problem that was the reason for setting this environment variable
solved for good? I don't quite think so. So, if we hit another crash now when
we do set this variable, we're in a dilemma...


You are receiving this mail because: