Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emacs crashes with window__rgba-visual.patch #66

Open
jpcima opened this issue Feb 3, 2022 · 5 comments
Open

Emacs crashes with window__rgba-visual.patch #66

jpcima opened this issue Feb 3, 2022 · 5 comments
Labels
help wanted Any C programmers out there? needs investigating More details required on what needs to be done patch bug A problem as a result of one of the patches patch needs work Existing patch can be enhanced

Comments

@jpcima
Copy link

jpcima commented Feb 3, 2022

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 jpcima added help wanted Any C programmers out there? patch bug A problem as a result of one of the patches labels Feb 3, 2022
@lah7 lah7 removed the help wanted Any C programmers out there? label Feb 3, 2022
@lah7
Copy link
Owner

lah7 commented Feb 3, 2022

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
Copy link
Contributor

eviltak commented Feb 3, 2022

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
Copy link
Owner

lah7 commented Feb 3, 2022

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 lah7 changed the title Emacs is broken Emacs is broken with window__rgba-visual.patch Feb 3, 2022
@lah7 lah7 changed the title Emacs is broken with window__rgba-visual.patch Emacs crashes with window__rgba-visual.patch Feb 3, 2022
lah7 added a commit that referenced this issue Feb 3, 2022
The patch caused 'emacs' to crash. As a precaution, make the
patch opt-in so users must activate this feature through this
environment variable.

Addresses #66
@lah7 lah7 added the help wanted Any C programmers out there? label Feb 3, 2022
@lah7
Copy link
Owner

lah7 commented Feb 3, 2022

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 lah7 added the patch needs work Existing patch can be enhanced label Feb 3, 2022
@jpcima
Copy link
Author

jpcima commented Feb 3, 2022

It's fixed after the update 3.24.31-2.

@lah7 lah7 added the needs investigating More details required on what needs to be done label Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Any C programmers out there? needs investigating More details required on what needs to be done patch bug A problem as a result of one of the patches patch needs work Existing patch can be enhanced
Projects
None yet
Development

No branches or pull requests

3 participants