Review Request 123648: Guard access to kscreen configuration

Sebastian Kügler sebas at kde.org
Wed May 6 00:04:59 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123648/
-----------------------------------------------------------

(Updated May 6, 2015, 12:04 a.m.)


Status
------

This change has been marked as submitted.


Review request for Plasma.


Changes
-------

Submitted with commit 8e12bd4bdee86fabc3e2985922aae73916cef700 by Sebastian Kügler to branch Plasma/5.3.


Bugs: 346590
    https://bugs.kde.org/show_bug.cgi?id=346590


Repository: plasma-workspace


Description
-------

Guard access to kscreen configuration

reconsiderOutputs() may be called before the async config fetching
operation (KScreen::GetConfigOperation) has finished, so the pointer is
still null at that point. This can happen if qApp::screenRemoved fires
before kscreen was able to start the backend loader and pass back a
ConfigPtr.

The bug is rooted by in the dual-use of libkscreen and qApp's QScreen
handling. The timings here produce this race condition. This patch
should be quite safe, though, since it doesn't change the logic, but
rather makes sure this race condition bails out nicely by falling back
to just waiting until a kscreen config has arrived (which will happen
right after).

BUG:346590
REVIEW:
FIXED-IN:5.3.1


Diffs
-----

  shell/shellcorona.cpp 558788daad66f8be7cc35955a5600ddab655cde6 

Diff: https://git.reviewboard.kde.org/r/123648/diff/


Testing
-------

I can't reproduce this crash myself.


Thanks,

Sebastian Kügler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150506/6d6b3f59/attachment.html>


More information about the Plasma-devel mailing list