Workaround to prevent recursive handling of wakeup
Needs RevisionPublic

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

Details

Reviewers
davidedmundson
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
davidedmundson requested changes to this revision.May 17 2019, 12:08 AM
davidedmundson added a subscriber: davidedmundson.

Under certain circumstances, Core::onResumingFromIdle triggers an action, which causes Core::resumingFromIdle to be emitted.

Can you expand on what action causes resumingFromIdle to be emitted

This revision now requires changes to proceed.May 17 2019, 12:08 AM