SwayNotificationCenter
SwayNotificationCenter copied to clipboard
[Bug] Crash when a new notification is sent
Describe the bug Segfaults when a notification is sent.
To Reproduce Steps to reproduce the behavior:
- Run swaync
- Send a notification (I did it by running spotify and going to the next song)
I also managed to reproduce it by simply running notify-send hello, but the below logs and backtraces are created with a spotify notification.
Expected behavior It shows the notification without crashing.
Please provide logs if you're experiencing notification errors / bugs
gdb backtrace when built from source with G_MESSAGES_DEBUG=all: https://gist.github.com/zjeffer/45bc48dd7c7e5550655f18b2e9d82f84,
Desktop (please complete the following information):
- OS:
Arch Linux(Kernel6.9.5-arch1-1) - WM: Hyprland (
4168b8c17b12b90873fab1ca73c2981b53f48bf5) - glib2
2.80.3-2 - libnotify
0.8.3-1
It happens with both the swaync-git AUR package and building from source.
Seems like a GTK 3 issue? I'm running a later version on my machine, and it runs just fine. Try rebuilding?
Still happening after recompiling latest git commit.
My installed versions of GTK (all installed through pacman)
gtk2 2.24.33gtk3 3.24.43gtk4 4.14.4
Which GTK3 version are you using?
Hmm, the same versions… It segfaults when constructing the notification for some reason...
Yeah, seems to happen somewhere in the HdyCarousel object deep in GTK, where at some point the widget is a nullptr. I'm not familiar with Vala or GTK so I haven't really been able to figure out where exactly it goes wrong.
When you run swaync with G_MESSAGES_DEBUG=all, what do you get as output when a new notification is sent? This is mine when I execute notify-send hello:
** (swaync:953129): DEBUG: 17:05:15.898: notiDaemon.vala:171: Notification:
category: (null)
image_data: false
expire_timeout: -1
replaces_id: 0
desktop_entry: (null)
body:
app_icon:
action_icons: false
time: 1722179115
hints:
sender-pid: int64 953250
urgency: byte 0x01
applied_id: 1
image_path: (null)
inline-reply: (null)
app_name: notify-send
summary: hello
icon_data: false
resident: false
default_action: (null)
actions:
urgency: Normal
[1] 953129 segmentation fault (core dumped) G_MESSAGES_DEBUG=all ./build/src/swaync
This is still happening btw :cry:
I notice it doesn't happen on my work laptop, which is also running Hyprland (on Ubuntu). I'll investigate what's different about my personal laptop to see why it's happening.
Found it: I had an older version of gtk installed in /usr/local/lib/. Deleting all libgtk*.so* and libgdk*.so* files fixed the issue.
I found it by running swaync through gdb, making the segfault happen by sending a notification, and then checking info sharedlibrary. It found:
0x00007ffff6a90fb0 0x00007ffff6ff1088 Yes /usr/local/lib/libgtk-3.so.0
0x00007ffff68f3130 0x00007ffff69a80af Yes /usr/local/lib/libgdk-3.so.0