Fix crash in application shutdown (alternate fix)
Summary: We have a SourceModel that inherits from AbastractModel AbastractModel inherits from both QObject and Ref. When we call the destructor of Ref, that kills the Pulseaudio::context that emits that the default source has changed during it's teardown. Because the QObject destructor hasn't run yet, our signals are still attached; however they refer to data from SourceModel which we've already run the destructor on - hence crash. This patch does the ref counting in an alternate way, destroying the PA Context after our model has disconnected all the signals, like it would be if the context was a child of the model. Test Plan: ran kquitapp5 plasmashell a lot, everything still seems fine. I couldn't recreate the original crash, it requires multiple outputs being deleted in the wrong order, which I don't happen to have. BUG: 363291 Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D3124
parent
548fb76f
Please register or sign in to comment