Fix crash on teardown with Applet's ConfigLoader
ClosedPublic

Authored by davidedmundson on Sep 3 2019, 3:51 PM.

Details

Summary

Deleting AppletPrivate will delete the ConfigLoader which will cause a
save, which can trigger a configSaved signal.

I think it is correct that the config might emit a signal just before
closing, and not at fault.

AppletPrivate is deleted by this point, but Applet is not so the
connection is still alive.

When we handle the signal, it goes into a Q_PRIVATE_SLOT that crashes.

This disconnect pattern is already used for guarding self config
changes.

BUG: 411221

Test Plan

kquitapp5 plasmashell, no longer crashes

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Sep 3 2019, 3:51 PM
Restricted Application added a project: Frameworks. Β· View Herald TranscriptSep 3 2019, 3:51 PM
Restricted Application added a subscriber: kde-frameworks-devel. Β· View Herald Transcript
davidedmundson requested review of this revision.Sep 3 2019, 3:51 PM
alexeymin accepted this revision.Sep 3 2019, 6:17 PM
alexeymin added a subscriber: alexeymin.

Indeed, I could reproduce the crash again with kquitapp5 plasmashell.

I've applied this patch on top of plasma-framework-5.16.4, built, installed, kquitapp5 plasmashell no longer causes crash πŸ‘πŸ»

This revision is now accepted and ready to land.Sep 3 2019, 6:17 PM
This revision was automatically updated to reflect the committed changes.