lah7 / gtk3-classic

Patches to bring back a traditional experience for GTK+3
Other
333 stars 26 forks source link

Emacs crashes with window__rgba-visual.patch #66

Open jpcima opened 2 years ago

jpcima commented 2 years ago

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

lah7 commented 2 years ago

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?

eviltak commented 2 years ago

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.

lah7 commented 2 years ago

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 commented 2 years ago

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.

jpcima commented 2 years ago

It's fixed after the update 3.24.31-2.