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 673551 - gnome-settings-daemon crash when system date is earlier than starttime from "background.xml"
gnome-settings-daemon crash when system date is earlier than starttime from "...
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
3.3.x
Other Linux
: Normal critical
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
: 673640 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-04-05 05:44 UTC by Martin Langhoff
Modified: 2012-04-16 15:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (1.23 KB, patch)
2012-04-11 20:09 UTC, Daniel Drake
committed Details | Review

Description Martin Langhoff 2012-04-05 05:44:16 UTC
On Fedora 17, a system date in earlier than 2012-01-29 will cause gnome-settings-daemon to crash in gnome-bg.c get_current_slide(). This is because /usr/share/backgronuds/beefy-miracle/default/beefy-miracle.xml has a starttime of 2012-01-29 , any earlier date means the get_current_slide() cannot find a current slide, and hits g_assert_not_reached().

Fedora is using this "background.xml" only to set a static background image that auto-selects between various background image sizes depending on desktop/monitor size. There is clearly no intention of using it as slides -- both timestart and duration are not relevant to this use case.

 * gnome-desktop must not crash when timestart > system date
 * testing indicates that "timestart" tokens are optional. I'll file a bug with Fedora's backgrounds to remove timestart. 
 * duration should similarly be optional -- testing shows removal causes a crash

More testing/debugging notes at https://bugzilla.redhat.com/show_bug.cgi?id=809707
Comment 1 Olav Vitters 2012-04-06 13:36:44 UTC
*** Bug 673640 has been marked as a duplicate of this bug. ***
Comment 2 Daniel Drake 2012-04-11 20:09:41 UTC
Created attachment 211878 [details] [review]
fix

Here's a fix for the crash. The get_current_slide() code already explicitly considers for a system clock in the past, but the following calculations were confused because of show->total_duration being out of sync with slide->duration for a one-slide slideshow. Please let me know if its OK to commit.
Comment 3 Martin Langhoff 2012-04-11 20:56:08 UTC
With this patch, will a multi-slide background still crash if the clock is off?
Comment 4 Daniel Drake 2012-04-11 20:59:04 UTC
Was there ever a crash with a multi-slide background? I doubt it - this was a quirk limited to a one-slide case. But there may be similar issues in the same code for other situations.

(the F17 background has only a single slide)
Comment 5 Vincent Untz 2012-04-16 15:27:35 UTC
Comment on attachment 211878 [details] [review]
fix

Thanks!