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 740151 - xrandr: Our DBus API registration races with remaining initialization
xrandr: Our DBus API registration races with remaining initialization
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: xrandr
unspecified
Other All
: Normal normal
: ---
Assigned To: Debarshi Ray
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2014-11-14 22:37 UTC by Rui Matos
Modified: 2014-11-19 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xrandr: Free GnomeRRConfigs on stop (2.15 KB, patch)
2014-11-14 22:37 UTC, Rui Matos
committed Details | Review
xrandr: Register our DBus API only after all other initialization (2.62 KB, patch)
2014-11-14 22:37 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2014-11-14 22:37:43 UTC
I believe this is the cause of crashes such as
https://bugzilla.redhat.com/show_bug.cgi?id=1156279

In particular note that bug report's log:

Oct 17 12:33:24 yoga gnome-session[971]: (gnome-settings-daemon:1025):
GnomeDesktop-CRITICAL **: gnome_rr_screen_list_outputs: assertion
'GNOME_IS_RR_SCREEN (screen)' failed
Comment 1 Rui Matos 2014-11-14 22:37:46 UTC
Created attachment 290742 [details] [review]
xrandr: Free GnomeRRConfigs on stop

They won't leak if the plugin is stopped and started again but they do
if we reach finalize() which isn't really a problem but there's no
reason to keep them around anyway.
Comment 2 Rui Matos 2014-11-14 22:37:50 UTC
Created attachment 290743 [details] [review]
xrandr: Register our DBus API only after all other initialization

Otherwise we risk being called and not have all out internal state
ready (e.g. priv->rw_screen being NULL) leading to crashes.

We also need to disown our well known name on stop() since we'll
reaquire it if start() gets called again.
Comment 3 Bastien Nocera 2014-11-18 21:01:51 UTC
Review of attachment 290742 [details] [review]:

Sure.
Comment 4 Bastien Nocera 2014-11-18 21:02:32 UTC
Review of attachment 290743 [details] [review]:

Sure thing.
Comment 5 Rui Matos 2014-11-19 16:13:37 UTC
54b8f0f..e4b1d27  gnome-3-14 -> gnome-3-14
   1baf510..26f984f  master -> master

Attachment 290742 [details] pushed as 6152d02 - xrandr: Free GnomeRRConfigs on stop
Attachment 290743 [details] pushed as 26f984f - xrandr: Register our DBus API only after all other initialization