Bug 451155 - recursion in AppletQuickItemPrivate
Summary: recursion in AppletQuickItemPrivate
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-05 08:04 UTC by Oleg Solovyov
Modified: 2022-03-11 01:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.93
Sentry Crash Report:


Attachments
kicker widget (409.34 KB, image/png)
2022-03-05 08:04 UTC, Oleg Solovyov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Solovyov 2022-03-05 08:04:44 UTC
Created attachment 147288 [details]
kicker widget

After creating a kicker widget on desktop, it behaves as expanded when it's not (see screenshot).
Restarting plasmashell fixes this until new kicker is created.

Log upon creating widget:
kf.plasma.quick: 0x7facdcbed9c0 trap 5 QRectF(14,14 68x68) QRectF(14,14 -28x-28)
kf.plasma.quick: 0x7facdcbed9c0 trap 2 336
kf.plasma.quick: 0x7facdcbed9c0 setExpanded (check) 0x5572f20141e0 true
kf.plasma.quick: 0x7facdcbed9c0 trap 3 352
kf.plasma.quick: Width: 68 336
kf.plasma.quick: Height: 68 352
kf.plasma.quick: 0x7facdcbed9c0 setExpanded (check) 0x5572f20141e0 false
kf.plasma.quick: 0x7facdcbed9c0 setExpanded (check) 0x5572f20141e0 true

debug patch:
https://pastebin.com/DeDkf0s4
Comment 1 Oleg Solovyov 2022-03-05 08:05:22 UTC
I am using plasma 5.23.5 + kf 5.91
Comment 2 Oleg Solovyov 2022-03-05 08:29:45 UTC
Made a little investigation:

First, compactRepresentationCheck() is called from geometryChanged()
it suspends somewhere between "if (full)" and "if (item)"

then, compactRepresentationCheck() is called from setSwitchWidth()
then, compactRepresentationCheck() is called from setSwitchHeight()

after, compactRepresentationCheck() from geometryChanged() continues execution
Comment 3 Oleg Solovyov 2022-03-05 11:02:20 UTC
Made an intentional segfault:

#6  QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator-> (this=0x8) at /usr/include/qt5/QtCore/qscopedpointer.h:116
#7  qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > > (ptr=...) at /usr/include/qt5/QtCore/qglobal.h:1143
#8  QQuickItem::d_func (this=0x0) at items/qquickitem.h:468
#9  QQuickItem::setVisible (this=0x0, v=true) at items/qquickitem.cpp:5990
#10 0x00007f16b69104b4 in PlasmaQuick::AppletQuickItemPrivate::compactRepresentationCheck (this=0x5558ccc6ab30) at /usr/src/debug/plasma-framework-5.91.0/src/plasmaquick/appletquickitem.cpp:420
#11 0x00007f16b6910ac7 in PlasmaQuick::AppletQuickItem::setSwitchHeight (this=0x5558ccd082b0, height=352) at /usr/src/debug/plasma-framework-5.91.0/src/plasmaquick/appletquickitem.cpp:804
#12 0x00007f16b5c9a2be in QQmlPropertyData::writeProperty (flags=..., value=0x7fff5a18a8bc, target=<optimized out>, this=<optimized out>) at ../../include/QtQml/5.15.2/QtQml/private/../../../../../src/qml/qml/qqmlpropertydata_p.h:375
#13 GenericBinding<2>::doStore<int> (flags=..., pd=<optimized out>, value=<optimized out>, this=0x5558ccc4f460) at qml/qqmlbinding.cpp:342
#14 GenericBinding<2>::write (this=0x5558ccc4f460, result=..., isUndefined=<optimized out>, flags=...) at qml/qqmlbinding.cpp:310
#15 0x00007f16b5c9aea7 in QQmlNonbindingBinding::doUpdate (this=0x5558ccc4f460, watcher=..., flags=..., scope=...) at qml/qqmlbinding.cpp:258
#16 0x00007f16b5c98ac4 in QQmlBinding::update (this=0x5558ccc4f460, flags=...) at qml/qqmlbinding.cpp:194
#17 0x00007f16b5c75c95 in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=0x7fff5a18c400) at qml/qqmlnotifier.cpp:104
#18 0x00007f16b46e2468 in doActivate<false> (sender=0x5558ccd082b0, signal_index=38, argv=0x7fff5a18c400) at kernel/qobject.cpp:3778
#19 0x00007f16b46dbdcf in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f16b69425c0 <PlasmaQuick::AppletQuickItem::staticMetaObject>, local_signal_index=local_signal_index@entry=8, argv=argv@entry=0x7fff5a18c400) at kernel/qobject.cpp:3946
#20 0x00007f16b690b512 in PlasmaQuick::AppletQuickItem::fullRepresentationItemChanged (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/plasma-framework-5.91.0/BUILD/src/plasmaquick/KF5PlasmaQuick_autogen/include/moc_appletquickitem.cpp:456
#21 0x00007f16b690db4e in PlasmaQuick::AppletQuickItemPrivate::createFullRepresentationItem (this=0x5558ccc6ab30) at /usr/src/debug/plasma-framework-5.91.0/src/plasmaquick/appletquickitem.cpp:265
#22 0x00007f16b690f926 in PlasmaQuick::AppletQuickItemPrivate::compactRepresentationCheck (this=0x5558ccc6ab30) at /usr/src/debug/plasma-framework-5.91.0/src/plasmaquick/appletquickitem.cpp:382
#23 0x00007f16b6141d3b in QQuickItem::setSize (this=0x5558ccd082b0, size=...) at items/qquickitem.cpp:7045
#24 0x00007f1671b1cd44 in ItemContainer::syncChildItemsGeometry (this=this@entry=0x5558cd757620, size=...) at /usr/src/debug/plasma-workspace-5.23.5/components/containmentlayoutmanager/itemcontainer.cpp:224
#25 0x00007f1671b1e96f in ItemContainer::geometryChanged (this=0x5558cd757620, newGeometry=..., oldGeometry=...) at /usr/src/debug/plasma-workspace-5.23.5/components/containmentlayoutmanager/itemcontainer.cpp:381
Comment 4 Bug Janitor Service 2022-03-05 11:33:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/463
Comment 5 Nate Graham 2022-03-11 01:40:58 UTC
Fixed by Oleg Solovyov with https://invent.kde.org/frameworks/plasma-framework/-/commit/740f0858fbceae580366e6014b6acb8c52c10d62in Frameworks 5.93!