Skip to content

shell: disconnect rectNotify before deleting PanelView

Fushan Wen requested to merge work/fuf/actionchains into master

This fixes a use-after-free caught by AddressSanitizer.

    #0 0x7ff8378c07de in QWeakPointer<QObject>::internalData() const /usr/include/qt6/QtCore/qsharedpointer_impl.h:704
    #1 0x7ff8379456b9 in QPointer<Plasma::Containment>::data() const /usr/include/qt6/QtCore/qpointer.h:64
    #2 0x7ff837945747 in QPointer<Plasma::Containment>::operator Plasma::Containment*() const /usr/include/qt6/QtCore/qpointer.h:72
    #3 0x7ff837942c40 in PlasmaQuick::ContainmentView::containment() const /builds/plasma/plasma-framework/src/plasmaquick/containmentview.cpp:239
    #4 0x5b8aa5 in operator() /builds/plasma/plasma-workspace/shell/shellcorona.cpp:1480
    #5 0x5f53b7 in call /usr/include/qt6/QtCore/qobjectdefs_impl.h:137
    #6 0x5f3006 in call<QtPrivate::List<>, void> /usr/include/qt6/QtCore/qobjectdefs_impl.h:339
    #7 0x5f0e02 in impl /usr/include/qt6/QtCore/qobjectdefs_impl.h:522
    #8 0x7ff824ae4e12  (/lib64/libQt6Core.so.6+0x1dae12) (BuildId: 85850a361dcca189b9da51825a1598acf81b0dcb)
    #9 0x7ff8251a5031 in QWindow::visibleChanged(bool) (/lib64/libQt6Gui.so.6+0x231031) (BuildId: ccc53eabda9c9fd1e1927c9d0a376f2278950d3f)
    #10 0x7ff8251abc12 in QWindowPrivate::setVisible(bool) (/lib64/libQt6Gui.so.6+0x237c12) (BuildId: ccc53eabda9c9fd1e1927c9d0a376f2278950d3f)
    #11 0x7ff8251ab1b6 in QWindowPrivate::destroy() (/lib64/libQt6Gui.so.6+0x2371b6) (BuildId: ccc53eabda9c9fd1e1927c9d0a376f2278950d3f)
    #12 0x7ff8251ab411 in QWindow::~QWindow() (/lib64/libQt6Gui.so.6+0x237411) (BuildId: ccc53eabda9c9fd1e1927c9d0a376f2278950d3f)
    #13 0x7ff8379a3ef5 in PlasmaQuick::QuickViewSharedEngine::~QuickViewSharedEngine() /builds/plasma/plasma-framework/src/plasmaquick/quickviewsharedengine.cpp:126
    #14 0x7ff8379422bb in PlasmaQuick::ContainmentView::~ContainmentView() /builds/plasma/plasma-framework/src/plasmaquick/containmentview.cpp:205
    #15 0x4f7fee in PanelView::~PanelView() /builds/plasma/plasma-workspace/shell/panelview.cpp:128
    #16 0x4f802d in PanelView::~PanelView() /builds/plasma/plasma-workspace/shell/panelview.cpp:128
    #17 0x5b9e6b in ShellCorona::panelContainmentDestroyed(QObject*) /builds/plasma/plasma-workspace/shell/shellcorona.cpp:1507
    #18 0x67d8ae in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QObject*>, void, void (ShellCorona::*)(QObject*)>::call(void (ShellCorona::*)(QObject*), ShellCorona*, void**) /usr/include/qt6/QtCore/qobjectdefs_impl.h:145
    #19 0x669de5 in void QtPrivate::FunctionPointer<void (ShellCorona::*)(QObject*)>::call<QtPrivate::List<QObject*>, void>(void (ShellCorona::*)(QObject*), ShellCorona*, void**) /usr/include/qt6/QtCore/qobjectdefs_impl.h:182
    #20 0x652d77 in QtPrivate::QCallableObject<void (ShellCorona::*)(QObject*), QtPrivate::List<QObject*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt6/QtCore/qobjectdefs_impl.h:520
    #21 0x7ff824ae4e12  (/lib64/libQt6Core.so.6+0x1dae12) (BuildId: 85850a361dcca189b9da51825a1598acf81b0dcb)
    #22 0x7ff824ae53fe in QObject::destroyed(QObject*) (/lib64/libQt6Core.so.6+0x1db3fe) (BuildId: 85850a361dcca189b9da51825a1598acf81b0dcb)
    #23 0x7ff824ada0d7 in QObject::~QObject() (/lib64/libQt6Core.so.6+0x1d00d7) (BuildId: 85850a361dcca189b9da51825a1598acf81b0dcb)
    #24 0x7ff82cb1e413 in Plasma::Applet::~Applet() /builds/plasma/plasma-framework/src/plasma/applet.cpp:90
    #25 0x7ff82cb65f63 in Plasma::Containment::~Containment() /builds/plasma/plasma-framework/src/plasma/containment.cpp:66
    #26 0x7ff82cb65fa7 in Plasma::Containment::~Containment() /builds/plasma/plasma-framework/src/plasma/containment.cpp:66
    #27 0x5922a1 in ShellCorona::~ShellCorona() /builds/plasma/plasma-workspace/shell/shellcorona.cpp:314
    #28 0x5927ef in ShellCorona::~ShellCorona() /builds/plasma/plasma-workspace/shell/shellcorona.cpp:316
    #29 0x7ff824ad4f06 in QObject::event(QEvent*) (/lib64/libQt6Core.so.6+0x1caf06) (BuildId: 85850a361dcca189b9da51825a1598acf81b0dcb)
    #30 0x7ff82aa8889d in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/lib64/libQt6Widgets.so.6+0x1c089d) (BuildId: db7ca40e8f270b70c84741225000eea542abedfa)
    #31 0x7ff824a926c7 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/lib64/libQt6Core.so.6+0x1886c7) (BuildId: 85850a361dcca189b9da51825a1598acf81b0dcb)
    #32 0x7ff824a92a26 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/lib64/libQt6Core.so.6+0x188a26) (BuildId: 85850a361dcca189b9da51825a1598acf81b0dcb)
    #33 0x7ff824a95f12 in QCoreApplication::exec() (/lib64/libQt6Core.so.6+0x18bf12) (BuildId: 85850a361dcca189b9da51825a1598acf81b0dcb)
    #34 0x4932bd in main /builds/plasma/plasma-workspace/shell/main.cpp:230
    #35 0x7ff8243901af in __libc_start_call_main (/lib64/libc.so.6+0x281af) (BuildId: bbeee08e5f56966e641c4f3ba4ea1da9d730d0ab)
    #36 0x7ff824390278 in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x28278) (BuildId: bbeee08e5f56966e641c4f3ba4ea1da9d730d0ab)
    #37 0x428ef4 in _start ../sysdeps/x86_64/start.S:115

Merge request reports

Loading