Summary: | Crash in Plasma::Applet::configChanged on Applet destruction | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Alexey Min <alexey.min> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | Chain, davidshen84, plasma-bugs |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.16.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/plasma-framework/5f746ce1c2c2d5a8c1be4f62347e18534d95e29d | Version Fixed In: | |
Sentry Crash Report: |
Description
Alexey Min
2019-08-23 22:07:42 UTC
cannot reproduce anymore :( Better trace: Thread 1 (Thread 0x7f4e26bcf140 (LWP 13395)): [KCrash Handler] #6 0x00007f4e23c83b08 in typeinfo for QMetaCallEvent () at /opt/qt5/lib/libQt5Core.so.5 #7 0x00007f4e26af64a8 in Plasma::Applet::configChanged() (this=0x5627a6b37310) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/applet.cpp:736 #8 0x00007f4e26b173ed in Plasma::AppletPrivate::propagateConfigChanged() (this=0x5627a6adb8d0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/private/applet_p.cpp:442 #9 0x00007f4e26af6f30 in Plasma::Applet::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x5627a6b37310, _c=QMetaObject::InvokeMetaMethod, _id=27, _a=0x7ffd81e50550) at src/plasma/KF5Plasma_autogen/include/moc_applet.cpp:245 #10 0x00007f4e2392b86d in QMetaObject::activate(QObject*, int, int, void**) (sender=0x5627a6b351b0, signalOffset=3, local_signal_index=0, argv=0x7ffd81e50550) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:3809 #11 0x00007f4e2392b08a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0x5627a6b351b0, m=0x7f4e24610028 <KCoreConfigSkeleton::staticMetaObject>, local_signal_index=0, argv=0x0) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:3660 #12 0x00007f4e245a6992 in KCoreConfigSkeleton::configChanged() (this=0x5627a6b351b0) at src/core/KF5ConfigCore_autogen/EWIEGA46WW/moc_kcoreconfigskeleton.cpp:144 #13 0x00007f4e245d96ff in KCoreConfigSkeleton::save() (this=0x5627a6b351b0) at /home/david/projects/kde5/src/frameworks/kconfig/src/core/kcoreconfigskeleton.cpp:1109 #14 0x00007f4e26a925a9 in KDeclarative::ConfigPropertyMapPrivate::writeConfig() (this=0x5627a6b34e50) at /home/david/projects/kde5/src/frameworks/kdeclarative/src/kdeclarative/configpropertymap.cpp:121 #15 0x00007f4e26a9243e in KDeclarative::ConfigPropertyMap::~ConfigPropertyMap() (this=0x5627a6b34e30) at /home/david/projects/kde5/src/frameworks/kdeclarative/src/kdeclarative/configpropertymap.cpp:71 #16 0x00007f4e26a92609 in KDeclarative::ConfigPropertyMap::~ConfigPropertyMap() (this=0x5627a6b34e30) at /home/david/projects/kde5/src/frameworks/kdeclarative/src/kdeclarative/configpropertymap.cpp:70 #17 0x00007f4e2392620f in QObjectPrivate::deleteChildren() (this=0x5627a6b33e30) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:2019 #18 0x00007f4e23924775 in QObject::~QObject() (this=0x5627a6b33220, __in_chrg=<optimized out>) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:1032 #19 0x00007f4e2664512b in QQuickItem::~QQuickItem() (this=0x5627a6b33220, __in_chrg=<optimized out>) at /home/david/projects/qt5/qtdeclarative/src/quick/items/qquickitem.cpp:2383 #20 0x00007f4e271c6aca in PlasmaQuick::AppletQuickItem::~AppletQuickItem() (this=0x5627a6b33220) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasmaquick/appletquickitem.cpp:525 #21 0x00007f4e1c8cfabb in AppletInterface::~AppletInterface() (this=0x5627a6b33220) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/scriptengines/qml/plasmoid/appletinterface.cpp:152 #22 0x00007f4e1c8cfb09 in AppletInterface::~AppletInterface() (this=0x5627a6b33220) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/scriptengines/qml/plasmoid/appletinterface.cpp:151 #23 0x00007f4e2392620f in QObjectPrivate::deleteChildren() (this=0x5627a6b0e6c0) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:2019 #24 0x00007f4e23924775 in QObject::~QObject() (this=0x5627a6b32fc0, __in_chrg=<optimized out>) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:1032 #25 0x00007f4e26b7cec5 in Plasma::ScriptEngine::~ScriptEngine() (this=0x5627a6b32fc0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/scripting/scriptengine.cpp:61 #26 0x00007f4e26b7bb2c in Plasma::AppletScript::~AppletScript() (this=0x5627a6b32fc0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/scripting/appletscript.cpp:47 #27 0x00007f4e1c8c93ed in DeclarativeAppletScript::~DeclarativeAppletScript() (this=0x5627a6b32fc0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp:71 #28 0x00007f4e1c8c9419 in DeclarativeAppletScript::~DeclarativeAppletScript() (this=0x5627a6b32fc0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp:70 #29 0x00007f4e26b13c4a in Plasma::AppletPrivate::~AppletPrivate() (this=0x5627a6adb8d0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/private/applet_p.cpp:107 #30 0x00007f4e26b13d89 in Plasma::AppletPrivate::~AppletPrivate() (this=0x5627a6adb8d0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/private/applet_p.cpp:97 #31 0x00007f4e26af3178 in Plasma::Applet::~Applet() (this=0x5627a6b37310) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/applet.cpp:144 #32 0x00007f4e26af3229 in Plasma::Applet::~Applet() (this=0x5627a6b37310) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/applet.cpp:137 #33 0x00007f4e2392620f in QObjectPrivate::deleteChildren() (this=0x5627a4d17480) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:2019 #34 0x00007f4e23924775 in QObject::~QObject() (this=0x5627a4d18da0, __in_chrg=<optimized out>) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:1032 #35 0x00007f4e26af3184 in Plasma::Applet::~Applet() (this=0x5627a4d18da0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/applet.cpp:145 #36 0x00007f4e26af9fd6 in Plasma::Containment::~Containment() (this=0x5627a4d18da0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/containment.cpp:88 #37 0x00007f4e1c062c7d in SystemTray::~SystemTray() (this=0x5627a4d18da0) at /home/david/projects/kde5/src/kde/workspace/plasma-workspace/applets/systemtray/systemtray.cpp:70 #38 0x00007f4e1c062ca9 in SystemTray::~SystemTray() (this=0x5627a4d18da0) at /home/david/projects/kde5/src/kde/workspace/plasma-workspace/applets/systemtray/systemtray.cpp:69 #39 0x00007f4e2392620f in QObjectPrivate::deleteChildren() (this=0x5627a4cda350) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:2019 #40 0x00007f4e23924775 in QObject::~QObject() (this=0x5627a4cda310, __in_chrg=<optimized out>) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:1032 #41 0x00007f4e26af3184 in Plasma::Applet::~Applet() (this=0x5627a4cda310) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/applet.cpp:145 #42 0x00007f4e1c0a4b2e in SystemTrayContainer::~SystemTrayContainer() (this=0x5627a4cda310) at /home/david/projects/kde5/src/kde/workspace/plasma-workspace/applets/systemtray/container/systemtraycontainer.cpp:39 #43 0x00007f4e1c0a4b59 in SystemTrayContainer::~SystemTrayContainer() (this=0x5627a4cda310) at /home/david/projects/kde5/src/kde/workspace/plasma-workspace/applets/systemtray/container/systemtraycontainer.cpp:35 #44 0x00007f4e2392620f in QObjectPrivate::deleteChildren() (this=0x5627a4ca1dc0) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:2019 #45 0x00007f4e23924775 in QObject::~QObject() (this=0x5627a4ca2470, __in_chrg=<optimized out>) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:1032 #46 0x00007f4e26af3184 in Plasma::Applet::~Applet() (this=0x5627a4ca2470) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/applet.cpp:145 #47 0x00007f4e26af9fd6 in Plasma::Containment::~Containment() (this=0x5627a4ca2470) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/containment.cpp:88 #48 0x00007f4e26af9ff9 in Plasma::Containment::~Containment() (this=0x5627a4ca2470) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/plasma/containment.cpp:85 #49 0x00005627a2c1913d in ShellCorona::~ShellCorona() (this=0x5627a49847f0) at /home/david/projects/kde5/src/kde/workspace/plasma-workspace/shell/shellcorona.cpp:225 #50 0x00005627a2c192c9 in ShellCorona::~ShellCorona() (this=0x5627a49847f0) at /home/david/projects/kde5/src/kde/workspace/plasma-workspace/shell/shellcorona.cpp:222 #51 0x00007f4e2392d4a3 in qDeleteInEventHandler(QObject*) (o=0x5627a49847f0) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:4661 #52 0x00007f4e23924aa2 in QObject::event(QEvent*) (this=0x5627a49847f0, e=0x5627a6d2f4c0) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:1251 #53 0x00007f4e247e92c2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=0x5627a490ed90, receiver=0x5627a49847f0, e=0x5627a6d2f4c0) at /home/david/projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3703 #54 0x00007f4e247e6689 in QApplication::notify(QObject*, QEvent*) (this=0x7ffd81e51f18, receiver=0x5627a49847f0, e=0x5627a6d2f4c0) at /home/david/projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3059 #55 0x00007f4e238dee85 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5627a49847f0, event=0x5627a6d2f4c0) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1095 #56 0x00007f4e238df892 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=0x5627a49847f0, event=0x5627a6d2f4c0) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1490 #57 0x00007f4e238e049f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=52, data=0x5627a4904670) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1840 #58 0x00007f4e238dfe00 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=0x0, event_type=52) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1694 #59 0x00007f4e238df7c3 in QCoreApplicationPrivate::execCleanup() (this=0x5627a490ed90) at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1425 #60 0x00007f4e238df718 in QCoreApplication::exec() () at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1407 #61 0x00007f4e23dca630 in QGuiApplication::exec() () at /home/david/projects/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:1788 #62 0x00007f4e247e5ebf in QApplication::exec() () at /home/david/projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2859 #63 0x00005627a2be92f2 in main(int, char**) (argc=2, argv=0x7ffd81e52068) at /home/david/projects/kde5/src/kde/workspace/plasma-workspace/shell/main.cpp:219 [Inferior 1 (process 13395) detached] Cause is quite interesting. Crash is inside Applet destructor after "delete d" but before Applet goes up to it's own superclass destructor QObject::~QObject which disconnects everything we get a signal on the config changing (which is legit) we then get to a signal on our applet that uses Q_PRIVATE_SLOT, the context (the applet) is alive, the d-pointer is gone. Git commit 5f746ce1c2c2d5a8c1be4f62347e18534d95e29d by David Edmundson. Committed on 07/09/2019 at 21:19. Pushed by davidedmundson into branch 'master'. Fix crash on teardown with Applet's ConfigLoader 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. Test Plan: kquitapp5 plasmashell, no longer crashes Reviewers: #plasma, alexeymin Reviewed By: alexeymin Subscribers: alexeymin, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D23707 M +4 -0 src/plasma/applet.cpp https://commits.kde.org/plasma-framework/5f746ce1c2c2d5a8c1be4f62347e18534d95e29d *** Bug 413903 has been marked as a duplicate of this bug. *** *** Bug 413937 has been marked as a duplicate of this bug. *** |