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 721380 - gsm-system: add a null backend
gsm-system: add a null backend
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-03 06:59 UTC by Allison Karlitskaya (desrt)
Modified: 2014-01-03 14:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsm-system: add a null backend (3.02 KB, patch)
2014-01-03 06:59 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2014-01-03 06:59:03 UTC
Add a 'null' backend for gsm-system to deal with the case where we don't
have systemd and our version of upower is too new.

Without this fallback case, gnome-session segfaults on startup.
Comment 1 Allison Karlitskaya (desrt) 2014-01-03 06:59:04 UTC
Created attachment 265204 [details] [review]
gsm-system: add a null backend
Comment 2 Allison Karlitskaya (desrt) 2014-01-03 07:01:07 UTC
This is fallout from bug 710383 (which allowed the build to proceed, but produced a gnome-session that crashed on startup in case systemd wasn't present, or wasn't running at gnome-session startup).
Comment 3 Colin Walters 2014-01-03 13:43:22 UTC
Review of attachment 265204 [details] [review]:

The _get_property implementation seems likely to be a source of crashes if someone introduces a non-boolean property.  But I don't really care that much, so fine by me.

::: gnome-session/gsm-system.c
@@ +268,3 @@
+        if (system == NULL) {
+                system = g_object_new (gsm_system_null_get_type (), NULL);
+                g_debug ("Using null backend for session tracking");

Maybe a g_warning()?
Comment 4 Allison Karlitskaya (desrt) 2014-01-03 14:35:41 UTC
Attachment 265204 [details] pushed as bf3f892 - gsm-system: add a null backend