Open elboulangero opened 6 years ago
@elboulangero are you still experiencing this issue?
@icarter09 Sorry I found that out only while doing some testing in a Cinnamon VM, after user reported a crash with Goodvibes on Cinnamon. I don't run Cinnamon myself so I can't say.
This being said I thing you can try the "Steps to reproduce" above to see if it's still an issue
cheers
@icarter09 Yes it's still an issue here, fedora uses @itzexor WIP to fix it
https://github.com/itzexor/Cinnamon/commit/d56f1cca19867dfa44b79e654f729d2f27319e1f
Issue
The notification daemon doesn't support icon names.
On the application side, I use GApplication to send notifications. I set an icon using this kind code:
This code will basically crash my application. The crash is due to a bug in glib, which is triggered because the send_notification() times out. It times out because the Cinnamon notification daemon doesn't reply anymore, and probably crashed as well.
I tracked that as much as I could. On the caller side first (ie. glib), we can see that support for GThemedIcon was discussed in Bug 745634, and added in glib ec1edef3.
Now if you look into this file you can see that the implementation will ultimately save the icon in the
image-path
hint. Which leads us to the steps to reproduce...Steps to reproduce
So we can re-create the dbus call that is send by
g_application_send_notification()
. As for the image, we can either use a full path (that's what you get if the caller used GFileIcon), or simply the filename without the extension (that's what you get if the caller used GThemedIcon).Setting a full path works:
Setting an icon name doesn't, there is no notification displayed:
Other information
It's up to you to decide if you want to support Themed Icon or not in your notification daemon, but at least the notification daemon should handle gracefully any junk input that is send by applications in the
image-path
hint.I added some logs in the Cinnamon Javascript, and I ended up here in the file
js/ui/notificationDaemon.js
:This call never returns because
GLib.filename_to_uri
raises an exception that is not handled. I noticed that there's a few of this call in the file, where exceptions are not handled.I added a
try
catch
statement, however the notification is still not displayed. I didn't go further.Hope this helps, feel free to ping me for more details. Cheers,
Arnaud