Workaround to prevent recursive handling of wakeup
Needs ReviewPublic

Authored by akreuzkamp on Feb 9 2019, 6:20 PM.

Details

Reviewers
None
Group Reviewers
Plasma
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.

Diff Detail

Repository
R122 Powerdevil
Lint
Lint Skipped
Unit
Unit Tests Skipped
akreuzkamp created this revision.Feb 9 2019, 6:20 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 9 2019, 6:20 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
akreuzkamp requested review of this revision.Feb 9 2019, 6:20 PM