daemon: Don't leave dangling Action pointers in idle-time containers
daemon: Don't leave dangling Action pointers in idle-time containers
If we delete the Action but don't clean up related map/set elements,
the powerdevil daemon can crash e.g. in Core::onResumingFromIdle()
and Core::onKIdleTimeoutReached()
.
This has been an issue since commit 584cfdf0 (or d91bc62f on 6.1) which made it possible for already-created actions to get deleted again at a later time.
CC @zamundaaa, author of MR !391 (merged)
Background: I encountered a seemingly random powerdevil crash and the backtrace strongly suggests that the Action
was invalid. Which made me think of !391 (merged). Fix not verified, but makes sense to me personally. See the linked bug for an equivalent backtrace.
Edited by Jakob Petsovits