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

Segfault when hovering, subsurface not mapped. #3542

Open
esiefker opened this issue Aug 22, 2024 · 7 comments
Open

Segfault when hovering, subsurface not mapped. #3542

esiefker opened this issue Aug 22, 2024 · 7 comments
Labels
bug Something isn't working sway

Comments

@esiefker
Copy link

I have a fresh install of Waybar on a fresh install of Sway on a fresh install of Debian Sid. That's Waybar v0.10.4, sway version 1.9, and fonts-font-awesome is installed.

Waybar reliably crashes when I hover over icons. I imagine there's a tool tip that's supposed to be displayed?

Here is the output when crashing, I'll post the full debug in an attached file.

(waybar:21744): Gdk-WARNING **: 12:45:06.914: Couldn't map window 0x557b78639550 as subsurface because its parent is not mapped.

(waybar:21744): Gdk-WARNING **: 12:45:06.914: Couldn't map window 0x557b78639550 as subsurface because its parent is not mapped.
Segmentation fault

waybar-debug.txt

@github-actions github-actions bot added bug Something isn't working sway labels Aug 22, 2024
@rtripault
Copy link

Confirmed here as well, setting "tooltip": false in each module configuration appears to prevent the crash

@Vladimir-csp
Copy link

Vladimir-csp commented Aug 23, 2024

This also happens when trying to open menus of tray icons, not only tooltips. Also happens on Hyprland on Debian sid. Sadly, I didn't catch what upgrade started it.

@mntmn
Copy link

mntmn commented Aug 23, 2024

Our users (on MNT Reform/Pocket Reform) also started experiencing this, and we tracked it down to a recent change in libgtk-3, rolling back a certain patch for libgtk-3 fixed it for us, but idk if the root cause needs to be addressed in waybar: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1079292

@josch
Copy link

josch commented Aug 23, 2024

Issue reported for gtk here: https://gitlab.gnome.org/GNOME/gtk/-/issues/6958

@esiefker
Copy link
Author

Oh Debian...
Thanks for tracking that down.

@jbicha
Copy link

jbicha commented Aug 23, 2024

GTK has closed the bug saying that it needs to be fixed in waybar.

Note that the change that triggered this issue hasn't yet made it into a stable gtk3 3.24 release but it's expected to happen eventually.

I'll revert this change in Debian for now since Debian was only cherry-picking the change early. (This only affected Debian Unstable and distros based on that; it didn't reach Debian Testing or Ubuntu or Debian Stable.)

@alebastr
Copy link
Contributor

I'll revert this change in Debian for now since Debian was only cherry-picking the change early. (This only affected Debian Unstable and distros based on that; it didn't reach Debian Testing or Ubuntu or Debian Stable.)

Thanks for reverting the patch. I'm afraid that you'll have to wait for the next GTK release to get that functionality in Debian, and then ensure that gtk-layer-shell is updated or patched to support it.

Two things worth knowing here:

  • gtk-layer-shell for GTK3 is sensitive to the modification of gdk-wayland internal structs. A change in any of the tracked structs may break all dependent apps.
    That's what happened here, the xdg-foreign-v2 patch has changed offsets of several fields in struct _GdkWindowImplWayland and private data accessor in gtk-layer-shell now gets a wrong pointer.
  • The necessary offsets are detected based on the runtime check of GTK version. I.e. even after gtk-layer-shell gets updated for all the changes in GTK 3.24.44 it will attempt to use the previous struct layout for 3.24.43.

I filed wmww/gtk-layer-shell#187 to notify the maintainer about the future breakage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sway
Projects
None yet
Development

No branches or pull requests

7 participants