Skip to content

AgentBase: Fix crash in setOnline

Ahmad Samir requested to merge work/ahmad/agentbase-crash into master

When setOnline tries to access the mSettings member after the latter has been deleted we get a crash; mSettings is deleted in quit() or cleanup(), therefore it looks like a race condition: the Agent is about to quit, but some other code calls setOnline leading to a crash. It looks like this can happen in more than one way, e.g. via a dbus call (from AgentInstance), or via a sub-class of AgentBase calling setOnline directly. Use a bool member var, modelled after how AgentInstance uses a similar logic.

BUG: 418844

Edited by Ahmad Samir

Merge request reports