GNOME Bugzilla – Bug 608010
Crashes in egg_set_desktop_file() if autostart desktop file is not present
Last modified: 2010-02-07 20:57:58 UTC
If the autostart file is not present, seahorse-daemon crashes on startup: ** (seahorse-daemon:29213): WARNING **: Could not load desktop file '/usr/local/etc/xdg/autostart/seahorse-daemon.desktop': No such file or directory Program received signal SIGSEGV, Segmentation fault. 0x000000000048591a in egg_set_desktop_file ( desktop_file_path=0x485da0 "/usr/local/etc/xdg/autostart/seahorse-daemon.desktop") at eggdesktopfile.c:1444 1444 if (egg_desktop_file->name) (gdb) bt
+ Trace 220246
1439 desktop_file_path, error->message); 1440 g_error_free (error); 1441 } 1442 1443 /* Set localized application name and default window icon */ 1444 if (egg_desktop_file->name) 1445 g_set_application_name (egg_desktop_file->name); 1446 if (egg_desktop_file->icon) 1447 { 1448 if (g_path_is_absolute (egg_desktop_file->icon)) (gdb) p egg_desktop_file $1 = (EggDesktopFile *) 0x0 The problem is that egg_desktop_file_new() returns NULL, but doesn't set error. I. e. g_key_file_load_from_file() does not set error properly. Context: seahorse-daemon should not have an autostart .desktop file, since it costs quite a lot of startup time and is not even needed for the ssh and GPG agents; only for the nautilus plugin and the key manager application. I'll file a separate bug for this, though.
> The problem is that egg_desktop_file_new() returns NULL, but doesn't set error. > I. e. g_key_file_load_from_file() does not set error properly. Sorry, I was misled at first sight. Of course it does set error, but it forgets to return before accessing the NULL egg_desktop_file.
Created attachment 152208 [details] [review] git formatted patch Trivial git formatted patch for "git am" love. Is it ok for me to commit? Thanks!
Comment on attachment 152208 [details] [review] git formatted patch This patch is buggy (the early return leaves the egg_desktop_file lock locked). Plus, this is already fixed in the smclient master copy in libegg; just update from there.
Comment on attachment 152208 [details] [review] git formatted patch ah, thanks for pointing out. This patch is obsolete then.
Thanks. Updated from libegg.