Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

Segfault when hovering, subsurface not mapped.

Open esiefker opened this issue 1 year ago • 7 comments

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

esiefker avatar Aug 22 '24 17:08 esiefker

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

rtripault avatar Aug 23 '24 07:08 rtripault

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.

Vladimir-csp avatar Aug 23 '24 09:08 Vladimir-csp

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

mntmn avatar Aug 23 '24 10:08 mntmn

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

josch avatar Aug 23 '24 12:08 josch

Oh Debian... Thanks for tracking that down.

esiefker avatar Aug 23 '24 14:08 esiefker

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.)

jbicha avatar Aug 23 '24 15:08 jbicha

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 https://github.com/wmww/gtk-layer-shell/issues/187 to notify the maintainer about the future breakage.

alebastr avatar Aug 26 '24 02:08 alebastr

Just ran into this, I had updated gtk from 3.24.43 to 3.24.48 and when I hovered over time (to trigger cal) it would segfault with the couldn't map window message. Updated many packages, cairo, pango, gtk-layer-shell, etc and nothing worked for stopping the segfault until I rolled back to 3.24.43, no more problems. Not sure what's going on with latest gtk "stable"

droc12345 avatar Feb 16 '25 23:02 droc12345

I filed https://github.com/wmww/gtk-layer-shell/issues/187 to notify the maintainer about the future breakage

gtk-layer-shell devs fixed the bug and released the new version.

ildar avatar Mar 12 '25 22:03 ildar