gtk3-classic icon indicating copy to clipboard operation
gtk3-classic copied to clipboard

Emacs crashes with window__rgba-visual.patch

Open jpcima opened this issue 3 years ago • 5 comments

Bug Description

Emacs crashes shortly after displaying the window. It does not happen with regular Gtk3. Same problem as described here: https://bugs.archlinux.org/task/51245

X protocol error: BadMatch (invalid parameter attributes) on protocol request 139
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: IOT trap

A wokaround is to launch with XLIB_SKIP_ARGB_VISUALS=1 emacs. Reference: https://elementaryos.stackexchange.com/questions/797/how-to-get-gnu-emacs-work-on-elementary-os

The patch window__rgba-visual.patch might have to do with this problem.

Environment

  • OS: Arch Linux
  • Desktop Environment: Xfce 4.16
  • gtk3-classic Version: 3.24.31

jpcima avatar Feb 03 '22 10:02 jpcima

Thanks for the report. I can confirm window__rgba-visual.patch is the problem (by commenting out # the patch in series and rebuilding PKGBUILD), this was on KDE/X11.

@eviltak, any thoughts on this? (#45) I'm thinking that this RGBA feature patch would be safer as an "opt in" environment variable instead?

lah7 avatar Feb 03 '22 12:02 lah7

I can't really find too much relevant information to figure out if there's a better way to fix the problem, but I agree that gating the RGBA visual patch with an environment variable is a good workaround in the meantime. I can take a look at fixing it when I have the time, but feel free to take care of this earlier yourself if you wish.

eviltak avatar Feb 03 '22 15:02 eviltak

Thanks, I'll look into adding an environment variable ASAP (GTK_RELAX_RGBA=1) and publish a new package revision to avoid any further potential crashes when users update this package (which was just pushed out yesterday)

lah7 avatar Feb 03 '22 15:02 lah7

An update has been released, requiring GTK_RELAX_RGBA to be present for the RGBA patch to activate. I think that's a good solution since it can be turned on/off as needed if it turns out more software is temperamental with this patch. At least emacs will no longer crash. 👍🏼

I'll leave this issue open to track the actual fix.

lah7 avatar Feb 03 '22 16:02 lah7

It's fixed after the update 3.24.31-2.

jpcima avatar Feb 03 '22 18:02 jpcima