D18884: Workaround to prevent recursive handling of wakeup

Anton Kreuzkamp noreply at phabricator.kde.org
Sat Feb 9 18:20:09 GMT 2019


akreuzkamp created this revision.
akreuzkamp added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
akreuzkamp requested review of this revision.

REVISION SUMMARY
  Under certain circumstances, Core::onResumingFromIdle triggers an action, which causes Core::resumingFromIdle to be emitted. This triggers a crash, because the inner Core::onResumingFromIdle function will clear the m_pendingResumeFromIdleActions vector, causing the outer onResumingFromIdle to access a cleared vector through invalidated iterators.
  
        
  
  This change works around this by adding a flag m_isHandlingWakeup which is set during the execution of the function, with an early exit, if it already set.

REPOSITORY
  R122 Powerdevil

REVISION DETAIL
  https://phabricator.kde.org/D18884

AFFECTED FILES
  daemon/powerdevilcore.cpp
  daemon/powerdevilcore.h

To: akreuzkamp, #plasma
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190209/973ac954/attachment.html>


More information about the Plasma-devel mailing list