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 719974 - Handle failures fetching the GnomeRRScreen
Handle failures fetching the GnomeRRScreen
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-06 14:09 UTC by Carlos Garnacho
Modified: 2013-12-10 15:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: bail out early if the GnomeRRScreen could not be created (1.46 KB, patch)
2013-12-06 14:10 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2013-12-06 14:09:31 UTC
If gnome-shell is not available (or randomly deadlocks as it's my case, investigating that :) when gnome-settings-daemon is (re)starting, the async call to get a GnomeRRScreen on the power plugin will fail, causing crashes soon after when priv->rr_screen is assumed to exist. I'm attaching a patch to fix that
Comment 1 Carlos Garnacho 2013-12-06 14:10:11 UTC
Created attachment 263670 [details] [review]
power: bail out early if the GnomeRRScreen could not be created

This may happen in the case gnome-shell is not running when g-s-d starts
up. This fixes a crash in such situation, as priv->rr_screen was assumed
to exist soon after.
Comment 2 Matthias Clasen 2013-12-08 05:10:50 UTC
Review of attachment 263670 [details] [review]:

looks good to me
Comment 3 Matthias Clasen 2013-12-08 05:11:12 UTC
Review of attachment 263670 [details] [review]:

looks good to me
Comment 4 Bastien Nocera 2013-12-10 10:54:04 UTC
Review of attachment 263670 [details] [review]:

That shouldn't happen when gnome-shell isn't running (unless it simply won't start) as we watch for the gnome-shell interface in gnome-desktop.

What's the case you're trying to fix?
Comment 5 Carlos Garnacho 2013-12-10 12:35:17 UTC
This crash is admittedly unlikely, I hit it from time to time when doing gnome-settings-daemon -r in other shell for devel purposes, the g-s-d restart makes gnome-shell trip into some deadlock, so it fails to reply to that request on the new g-s-d instance, making it crash too.

The most glaring bug here is obviously gnome-shell's, but I still haven't caught it in a situation where I could debug it, making g-s-d a bit more robust can't hurt though.
Comment 6 Bastien Nocera 2013-12-10 13:08:59 UTC
Review of attachment 263670 [details] [review]:

Fine then.
Comment 7 Carlos Garnacho 2013-12-10 15:25:22 UTC
Attachment 263670 [details] pushed as 229ed65 - power: bail out early if the GnomeRRScreen could not be created