Skip to content

daemon: Don't crash in PowerDevil::Core::unloadAllActiveActions()

Jakob Petsovits requested to merge work/jpetso/fix-active-actions-crash into master

Not sure why CI tests are failing, but I'll submit anyway, the finding is important enough and maybe someone has an idea how to fix CI.


Commit 584cfdf0 introduced the daemon's ability to remove actions from Core::m_actionPool if they become unsupported at runtime. Commit 7a929fa0 fixed some resulting crashes by also cleaning up related map/set elements that contained this action. That was not enough, we got lots of crashes coming in since then.

The (many) remaining crashes happened in unloadAllActiveActions(), which cycles through Core::m_activeActions and accesses the corresponding action pointer in m_actionPool. The implication is that m_activeActions contains action IDs that are not present in m_actionPool. And indeed, commit 7a929fa0 missed cleaning up the action ID corresponding to the now-unsupported action.

With the dangling ID removed, PowerDevil should finally stop crashing.

SENTRY: FALLTHROUGH-30F BUG: 492349

Merge request reports

Loading