GNOME Bugzilla – Bug 670000
gnome_bg SIGSEGV if g_settings_get_string (settings, BG_KEY_PICTURE_URI) returns NULL
Last modified: 2012-02-13 18:46:44 UTC
Created attachment 207466 [details] [review] fixes described bug by checking for null http://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-bg.c?id=3.3.5#n308 will SIGSEGV if the return value from g_settings_get_string (settings, BG_KEY_PICTURE_URI) is NULL, seems to happen when the schemas aren't quite correct through upgrades and such. Downstream bug: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/873761 Patch attached to fix
Comment on attachment 207466 [details] [review] fixes described bug by checking for null Thanks, committed since it can't harm, but: (In reply to comment #0) > will SIGSEGV if the return value from g_settings_get_string (settings, > BG_KEY_PICTURE_URI) is NULL, seems to happen when the schemas aren't quite > correct through upgrades and such. Just wondering: how can this happen? It should really never happen...
(In reply to comment #1) > (From update of attachment 207466 [details] [review]) > Thanks, committed since it can't harm, but: > > (In reply to comment #0) > > will SIGSEGV if the return value from g_settings_get_string (settings, > > BG_KEY_PICTURE_URI) is NULL, seems to happen when the schemas aren't quite > > correct through upgrades and such. > > Just wondering: how can this happen? It should really never happen... Not entirely sure myself, the bug originated from someone upgrading from ubuntu 11.04 to 11.10, which would of hit upon the following key being changed http://git.gnome.org/browse/gnome-desktop/commit/libgnome-desktop/gnome-bg.c?id=7f3e3d5200618d66ebba0654517affc012cef875 It could of been a mis-configured gsettings install or something - it was an extremely rare occurrence, could only find one bug filed for it.
This patch is wrong; g_settings_get_string() *never* returns NULL (except in a g_return_val_if_fail() situation, which is a programming error).