Skip to content

containmentlayoutmanager: Guard m_contentItem in setEditMode

Kai Uwe Broulik requested to merge work/kbroulik/random-itemcontainer-crash into master

Got a crash there when deleting an applet from a panel.

#4  0x00007f9e06a42520 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007f9e093e1f1b in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::get() const (this=0x8, this=<optimized out>)
    at /usr/include/x86_64-linux-gnu/qt6/QtCore/qscopedpointer.h:112
#6  qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > >(QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >&)
    (ptr=..., ptr=<optimized out>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qtclasshelpermacros.h:79
#7  QQuickItem::d_func() (this=0x0) at ./src/quick/items/qquickitem.h:477
#8  QQuickItem::setEnabled(bool) (this=0x0, e=false) at ./src/quick/items/qquickitem.cpp:6475
#9  0x00007f9dd4806584 in  () at /usr/lib/x86_64-linux-gnu/qt6/qml/org/kde/plasma/private/containmentlayoutmanager/libcontainmentlayoutmanagerplugin.so
#10 0x00007f9e093ebb95 in QQuickItem::event(QEvent*) (this=0x5558c7a63290, ev=0x7ffc261e3b40) at ./src/quick/items/qquickitem.cpp:8853
#11 0x00007f9e08589596 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x5558c7a63290, e=0x7ffc261e3b40)
    at ./src/widgets/kernel/qapplication.cpp:3287
#12 0x00007f9e0735a128 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5558c7a63290, event=0x7ffc261e3b40) at ./src/corelib/kernel/qcoreapplication.cpp:1118
#13 0x00007f9e0953d19e in QQuickDeliveryAgentPrivate::sendHoverEvent(QEvent::Type, QQuickItem*, QPointF const&, QPointF const&, QFlags<Qt::KeyboardModifier>, unsigned long)
    (this=this@entry=0x5558c3aa77b0, type=type@entry=QEvent::HoverEnter, item=item@entry=0x5558c7a63290, scenePos=..., lastScenePos=..., modifiers=..., 
    modifiers@entry=..., timestamp=30721929) at ./src/quick/util/qquickdeliveryagent.cpp:975

Couldn’t get the matching debug symbols for containmentlayoutmanager but it’s the only place where setEnabled is called from this plug-in that isn’t guarded.

Merge request reports