Bug 417432 - Crash when using backspace in Desktop Effects search
Summary: Crash when using backspace in Desktop Effects search
Status: RESOLVED WORKSFORME
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwineffects (show other bugs)
Version: 5.18.0
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-11 16:20 UTC by Eric Adams
Modified: 2021-07-17 04:33 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Demo of crash (536.45 KB, image/gif)
2020-02-11 16:20 UTC, Eric Adams
Details
kcrash.txt (12.54 KB, text/plain)
2020-02-11 17:45 UTC, Eric Adams
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Adams 2020-02-11 16:20:59 UTC
Created attachment 125852 [details]
Demo of crash

SUMMARY
The settings panel crashes when using backspace in the Desktop Effects search field.

STEPS TO REPRODUCE
1. Navigate to System Settings - Workspace Behavior - Desktop Effects
2. Search for something
3. Use backspace to remove search characters
4. When you get to 2 characters left the settings window will crash

OBSERVED RESULT
System Settings will crash when using backspace to clear the search term in Desktop Effects.

EXPECTED RESULT
Settings window doesn't crash

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 19.10
KDE Plasma Version: 5.18.0
KDE Frameworks Version: 5.67.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-29-generic
OS Type: 64-bit
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 15.4 GiB of RAM

ADDITIONAL INFORMATION
See attached screen recording for demonstration
Comment 1 Vlad Zahorodnii 2020-02-11 16:46:55 UTC
Could you please attach a backtrace to this bug report?
Comment 2 Vlad Zahorodnii 2020-02-11 16:47:14 UTC
Make sure that debug packages for kwin are installed.
Comment 3 Eric Adams 2020-02-11 17:45:34 UTC
Created attachment 125856 [details]
kcrash.txt

It's saying I don't have the necessary debug packages installed but I am having a difficult time figuring out what I need. I'm happy to install whatever you need to get a useful crash log.
Comment 4 Vlad Zahorodnii 2020-02-13 08:41:39 UTC
Hmm, so it looks like something goes wrong when we invalidate the filter.

For what it's worth, I can't reproduce this crash with Qt 5.14 or 5.15.
Comment 5 Méven Car 2020-02-14 09:59:25 UTC
I do reproduce.

Relevant Part of stack trace: 
Thread 1 (Thread 0x7f3042d2e800 (LWP 2738)):
[KCrash Handler]
#7  0x00007f3046173726 in QQmlDelegateModel::_q_itemsInserted (this=<optimized out>, index=2, count=1) at types/qqmldelegatemodel.cpp:1351
#8  0x00007f3046179225 in QQmlDelegateModel::qt_static_metacall (_o=_o@entry=0x55bbe54d23b0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=8, _a=_a@entry=0x7ffd063adf90) at .moc/moc_qqmldelegatemodel_p.cpp:198
#9  0x00007f3046179683 in QQmlDelegateModel::qt_metacall (this=0x55bbe54d23b0, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7ffd063adf90) at .moc/moc_qqmldelegatemodel_p.cpp:334
#10 0x00007f30470544bc in QMetaObject::activate (sender=0x55bbe672c450, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3819
#11 0x00007f3046fd4db2 in QAbstractItemModel::rowsInserted (this=this@entry=0x55bbe672c450, _t1=..., _t2=<optimized out>, _t3=<optimized out>, _t4=...) at .moc/moc_qabstractitemmodel.cpp:591
#12 0x00007f3046fdd878 in QAbstractItemModel::endInsertRows (this=0x55bbe672c450) at itemmodels/qabstractitemmodel.cpp:2752
#13 0x00007f3046fff65d in QSortFilterProxyModelPrivate::insert_source_items (this=<optimized out>, source_to_proxy=..., proxy_to_source=..., source_items=..., source_parent=..., orient=Qt::Vertical, emit_signal=true) at itemmodels/qsortfilterproxymodel.cpp:902
#14 0x00007f3047003dea in QSortFilterProxyModelPrivate::handle_filter_changed (this=0x55bbe54c6fb0, source_to_proxy=..., proxy_to_source=..., source_parent=..., orient=Qt::Vertical) at itemmodels/qsortfilterproxymodel.cpp:1328
#15 0x00007f30470041bd in QSortFilterProxyModelPrivate::filter_changed (this=0x55bbe54c6fb0, source_parent=...) at itemmodels/qsortfilterproxymodel.cpp:1257
#16 0x00007f304700512e in QSortFilterProxyModel::invalidateFilter (this=<optimized out>) at ../../include/QtCore/../../src/corelib/itemmodels/qabstractitemmodel.h:60
#17 0x00007f302c51e030 in KWin::EffectsFilterProxyModel::qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _c=<optimized out>, _o=<optimized out>) at /home/meven/kde/build/kwin/kcmkwin/kwineffects/kcm_kwin_effects_autogen/EWIEGA46WW/moc_effectsfilterproxymodel.cpp:152
#18 KWin::EffectsFilterProxyModel::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/meven/kde/build/kwin/kcmkwin/kwineffects/kcm_kwin_effects_autogen/EWIEGA46WW/moc_effectsfilterproxymodel.cpp:92
#19 0x00007f30460fe48f in QQmlPropertyData::writeProperty (flags=..., value=0x7ffd063ae2b8, target=<optimized out>, this=0x7f301c133128) at ../../include/QtQml/5.12.4/QtQml/private/../../../../../src/qml/qml/qqmlpropertycache_p.h:346
#20 GenericBinding<10>::doStore<QString> (flags=..., pd=0x7f301c133128, value=..., this=0x55bbe672c900) at qml/qqmlbinding.cpp:332
#21 GenericBinding<10>::write (this=0x55bbe672c900, result=..., isUndefined=<optimized out>, flags=...) at qml/qqmlbinding.cpp:313
#22 0x00007f30460fec5b in QQmlNonbindingBinding::doUpdate (this=0x55bbe672c900, watcher=..., flags=..., scope=...) at ../../include/QtQml/5.12.4/QtQml/private/../../../../../src/qml/jsruntime/qv4scopedvalue_p.h:239
#23 0x00007f30460fb45b in QQmlBinding::update (this=0x55bbe672c900, flags=...) at qml/qqmlbinding.cpp:185
#24 0x00007f30460d7053 in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=a@entry=0x0) at qml/qqmlnotifier.cpp:104
#25 0x00007f304607af62 in QQmlData::signalEmitted (object=0x55bbe69722e0, index=30, a=0x0) at qml/qqmlengine.cpp:883
#26 0x00007f3047053ce3 in QMetaObject::activate (sender=0x55bbe69722e0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:121
#27 0x00007f304653b04b in QQuickTextInputPrivate::finishChange (this=0x55bbe6729de0, validateFromState=<optimized out>, update=<optimized out>, edited=<optimized out>) at items/qquicktextinput.cpp:3610
#28 0x00007f304653febe in QQuickTextInputPrivate::processKeyEvent (this=this@entry=0x55bbe6729de0, event=event@entry=0x7ffd063b0dd0) at items/qquicktextinput.cpp:4559
#29 0x00007f304653ff1c in QQuickTextInput::keyPressEvent (this=0x55bbe69722e0, ev=0x7ffd063b0dd0) at items/qquicktextinput.cpp:1517
#30 0x00007f30464c7c2b in QQuickItemPrivate::deliverKeyEvent (this=0x55bbe6729de0, e=0x7ffd063b0dd0) at items/qquickitem.cpp:5150
#31 0x00007f30464c7ef5 in QQuickItem::event (this=0x55bbe69722e0, ev=0x7ffd063b0dd0) at items/qquickitem.cpp:8057
#32 0x00007f3047ad8a86 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007f3047ae1e00 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007f3047028a2a in QCoreApplication::notifyInternal2 (receiver=0x55bbe69722e0, event=0x7ffd063b0dd0) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:142
#35 0x00007f30464d568f in QQuickWindowPrivate::deliverKeyEvent (this=this@entry=0x55bbe55aa2c0, e=e@entry=0x7ffd063b0dd0) at items/qquickwindow.cpp:1713
#36 0x00007f30464da933 in QQuickWindow::keyPressEvent (this=<optimized out>, e=0x7ffd063b0dd0) at items/qquickwindow.cpp:1696
#37 0x00007f30474b7b3d in QWindow::event (this=this@entry=0x55bbe6af0790, ev=ev@entry=0x7ffd063b0dd0) at kernel/qwindow.cpp:2341
#38 0x00007f30464e567f in QQuickWindow::event (this=0x55bbe6af0790, e=0x7ffd063b0dd0) at items/qquickwindow.cpp:1687

The bug seems to be in KWin::EffectsFilterProxyModel, might be fixed in newer Qt version.

Operating System: Kubuntu 19.10
KDE Plasma Version: 5.18.80 (from sources)
KDE Frameworks Version: 5.67.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-29-generic%
Comment 6 David Edmundson 2020-02-16 17:41:32 UTC
I code reviewed the models, and couldn't immediately see anything wrong.


If it is the model, attaching QAbstractItemModelTester should find it.

I did it locally, it found nothing, but then mine didn't crash. @Meven could you do this ^
Comment 7 Méven Car 2020-02-17 10:03:58 UTC
I don't reproduce it on a newer Qt version.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1
Kernel Version: 5.3.0-28-generic
Graphics Processor: llvmpipe 

On Qt5.12, using QAbstractItemModelTester did not reveal anything or I missed some output. I added "qt.modeltest.*" to my kdebugsettings rules while reproducing the bug.
Comment 8 Nate Graham 2021-06-17 19:54:08 UTC
Is it still happening to you in a later version? Like Plasma 5.21 or 5.22?
Comment 9 Bug Janitor Service 2021-07-02 04:33:45 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Bug Janitor Service 2021-07-17 04:33:40 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!