After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670000 - gnome_bg SIGSEGV if g_settings_get_string (settings, BG_KEY_PICTURE_URI) returns NULL
gnome_bg SIGSEGV if g_settings_get_string (settings, BG_KEY_PICTURE_URI) retu...
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-13 17:10 UTC by Gordon Allott
Modified: 2012-02-13 18:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes described bug by checking for null (496 bytes, patch)
2012-02-13 17:10 UTC, Gordon Allott
committed Details | Review

Description Gordon Allott 2012-02-13 17:10:08 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 1 Vincent Untz 2012-02-13 18:17:11 UTC
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...
Comment 2 Gordon Allott 2012-02-13 18:35:14 UTC
(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.
Comment 3 Christian Persch 2012-02-13 18:46:44 UTC
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).