Bug 452258 - Plasma crashes in PlasmaAppletItem::matches() when opening plasma widgets with the system language set to something other than English
Summary: Plasma crashes in PlasmaAppletItem::matches() when opening plasma widgets wit...
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Widget Explorer (show other bugs)
Version: 5.24.3
Platform: openSUSE Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: drkonqi
: 453667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-04 12:27 UTC by Johannes Carraro
Modified: 2022-10-25 14:51 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Carraro 2022-04-04 12:27:58 UTC
Application: plasmashell (5.24.3)

Qt Version: 5.15.2
Frameworks Version: 5.90.0
Operating System: Linux 5.14.21-150400.11-default x86_64
Windowing System: Wayland
Distribution: "openSUSE Leap 15.4 Beta"
DrKonqi: 5.24.3 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
klick on adding plasma-widgets
search for plasma-witdget
happens on wayland session

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault

[KCrash Handler]
#4  ucstricmp (be=0x8bd4e0a, b=0x8bd4e08, ae=0x454545454d869157, a=0x454545454d869155) at text/qstring.cpp:843
#5  qt_compare_strings (lhs=..., rhs=..., cs=<optimized out>) at text/qstring.cpp:1188
#6  0x00007fea854faa4f in qt_starts_with_impl<QStringView, QStringView> (cs=Qt::CaseInsensitive, needle=..., haystack=...) at text/qstring.cpp:11969
#7  qt_starts_with (cs=Qt::CaseInsensitive, needle=..., haystack=...) at text/qstring.cpp:11974
#8  QStringRef::startsWith (this=this@entry=0xa292918, str=..., cs=cs@entry=Qt::CaseInsensitive) at text/qstring.cpp:11748
#9  0x00007fea12ad5c62 in PlasmaAppletItem::matches (this=0x98fcc60, pattern=...) at /usr/src/debug/plasma5-workspace-5.24.3-bp154.1.1.x86_64/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp:137
#10 0x00007fea12ad09fe in KCategorizedItemsViewModels::DefaultItemFilterProxyModel::filterAcceptsRow (this=0x83f4e20, sourceRow=12, sourceParent=...) at /usr/src/debug/plasma5-workspace-5.24.3-bp154.1.1.x86_64/components/shellprivate/widgetexplorer/kcategorizeditemsviewmodels.cpp:163
#11 0x00007fea856333b8 in QSortFilterProxyModelPrivate::handle_filter_changed (orient=Qt::Vertical, source_parent=..., proxy_to_source=..., source_to_proxy=..., this=0x9a13e10) at itemmodels/qsortfilterproxymodel.cpp:1351
#12 QSortFilterProxyModelPrivate::filter_changed (this=0x9a13e10, source_parent=...) at itemmodels/qsortfilterproxymodel.cpp:1305
#13 0x00007fea856344da in QSortFilterProxyModel::invalidateFilter (this=<optimized out>) at itemmodels/qsortfilterproxymodel.cpp:3059
#14 0x00007fea12ad0b5e in KCategorizedItemsViewModels::DefaultItemFilterProxyModel::setSearchTerm (this=this@entry=0x83f4e20, pattern=...) at /usr/src/debug/plasma5-workspace-5.24.3-bp154.1.1.x86_64/components/shellprivate/widgetexplorer/kcategorizeditemsviewmodels.cpp:187
#15 0x00007fea12acf46e in KCategorizedItemsViewModels::DefaultItemFilterProxyModel::qt_static_metacall (_o=_o@entry=0x83f4e20, _c=_c@entry=QMetaObject::WriteProperty, _id=_id@entry=0, _a=_a@entry=0x7fffc13fc6e0) at /usr/src/debug/plasma5-workspace-5.24.3-bp154.1.1.x86_64/build/components/shellprivate/plasmashellprivateplugin_autogen/KWVQMABLMH/moc_kcategorizeditemsviewmodels_p.cpp:310
#16 0x00007fea12acfb3b in KCategorizedItemsViewModels::DefaultItemFilterProxyModel::qt_metacall (this=0x83f4e20, _c=QMetaObject::WriteProperty, _id=0, _a=0x7fffc13fc6e0) at /usr/src/debug/plasma5-workspace-5.24.3-bp154.1.1.x86_64/build/components/shellprivate/plasmashellprivateplugin_autogen/KWVQMABLMH/moc_kcategorizeditemsviewmodels_p.cpp:360
#17 0x00007fea87f701dd in QV4::QObjectWrapper::setProperty (engine=engine@entry=0x1e87000, object=object@entry=0x83f4e20, property=0x542c248, value=...) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/jsruntime/qv4qobjectwrapper.cpp:542
#18 0x00007fea87f704ce in QV4::QObjectWrapper::setQmlProperty (engine=0x1e87000, qmlContext=<optimized out>, object=0x83f4e20, name=<optimized out>, revisionMode=QV4::QObjectWrapper::IgnoreRevision, value=...) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/jsruntime/qv4qobjectwrapper.cpp:435
#19 0x00007fea87f7061b in QV4::QObjectWrapper::virtualPut (m=0x7fea603a2538, id=..., value=..., receiver=0x7fea603a2538) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/jsruntime/qv4qobjectwrapper.cpp:722
#20 0x00007fea87f34f89 in QV4::Object::put (receiver=0x7fea603a2538, v=..., id=..., this=0x7fea603a2538) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/jsruntime/qv4object_p.h:324
#21 QV4::Object::virtualResolveLookupSetter (object=0x7fea603a2538, engine=0x1e87000, lookup=0x9a70da0, value=...) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/jsruntime/qv4object.cpp:804
#22 0x00007fea87f8a358 in QV4::Moth::VME::interpret (frame=0x7fffc13fca80, engine=0x1e87000, code=0x7fea52caeaed "\016\002") at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/jsruntime/qv4vme_moth.cpp:653
#23 0x00007fea87f8f066 in QV4::Moth::VME::exec (frame=frame@entry=0x7fffc13fca80, engine=engine@entry=0x1e87000) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/jsruntime/qv4vme_moth.cpp:463
#24 0x00007fea87f1eb3a in QV4::Function::call (this=this@entry=0x9705680, thisObject=thisObject@entry=0x7fea603a24e8, argv=argv@entry=0x7fea603a2500, argc=<optimized out>, context=<optimized out>) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/jsruntime/qv4function.cpp:69
#25 0x00007fea880b07a7 in QQmlJavaScriptExpression::evaluate (this=this@entry=0x8296a10, callData=callData@entry=0x7fea603a24d0, isUndefined=isUndefined@entry=0x0) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/qml/qqmljavascriptexpression.cpp:212
#26 0x00007fea88057d39 in QQmlBoundSignalExpression::evaluate (this=this@entry=0x8296a10, a=a@entry=0x0) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/qml/qqmlboundsignal.cpp:224
#27 0x00007fea88058f8b in QQmlBoundSignal_callback (e=0x8742ad0, a=0x0) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/qml/qqmlboundsignal.cpp:361
#28 0x00007fea8808f0c3 in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=a@entry=0x0) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/qml/qqmlnotifier.cpp:104
#29 0x00007fea8803a593 in QQmlData::signalEmitted (object=0x9b5c780, index=<optimized out>, a=0x0) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/qml/qml/qqmlengine.cpp:834
#30 0x00007fea856a1e54 in doActivate<false> (sender=0x9b5c780, signal_index=30, argv=0x0) at kernel/qobject.cpp:3778
#31 0x00007fea8569b6c2 in QMetaObject::activate (sender=sender@entry=0x9b5c780, m=m@entry=0x7fea89065640 <QQuickTextInput::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3946
#32 0x00007fea88bcdc40 in QQuickTextInput::textChanged (this=this@entry=0x9b5c780) at .moc/moc_qquicktextinput_p.cpp:1319
#33 0x00007fea88bd6a53 in QQuickTextInputPrivate::finishChange (this=this@entry=0x91164f0, validateFromState=<optimized out>, update=update@entry=false, edited=edited@entry=true) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/quick/items/qquicktextinput.cpp:3608
#34 0x00007fea88bd8481 in QQuickTextInputPrivate::insert (this=this@entry=0x91164f0, newText=...) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/quick/items/qquicktextinput.cpp:3248
#35 0x00007fea88bdab17 in QQuickTextInputPrivate::processKeyEvent (this=this@entry=0x91164f0, event=event@entry=0x7fffc13ff100) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/quick/items/qquicktextinput.cpp:4580
#36 0x00007fea88bdab98 in QQuickTextInput::keyPressEvent (this=0x9b5c780, ev=0x7fffc13ff100) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/quick/items/qquicktextinput.cpp:1516
#37 0x00007fea88b967e7 in QQuickItemPrivate::deliverKeyEvent (this=this@entry=0x91164f0, e=0x7fffc13ff100) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/quick/items/qquickitem.cpp:5207
#38 0x00007fea88b99e00 in QQuickItem::event (this=0x9b5c780, ev=0x7fffc13ff100) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/quick/items/qquickitem.cpp:8182
#39 0x00007fea8721a3ac in QApplicationPrivate::notify_helper (this=this@entry=0x1a9bf90, receiver=receiver@entry=0x9b5c780, e=e@entry=0x7fffc13ff100) at kernel/qapplication.cpp:3632
#40 0x00007fea872211a0 in QApplication::notify (this=0x7fffc13ff520, receiver=0x9b5c780, e=0x7fffc13ff100) at kernel/qapplication.cpp:3156
#41 0x00007fea85664ac3 in QCoreApplication::notifyInternal2 (receiver=0x9b5c780, event=0x7fffc13ff100) at kernel/qcoreapplication.cpp:1064
#42 0x00007fea85664c9e in QCoreApplication::sendEvent (receiver=receiver@entry=0x9b5c780, event=event@entry=0x7fffc13ff100) at kernel/qcoreapplication.cpp:1462
#43 0x00007fea88ba4a4f in QQuickWindowPrivate::deliverKeyEvent (this=this@entry=0x20ea3a0, e=e@entry=0x7fffc13ff100) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/quick/items/qquickwindow.cpp:1934
#44 0x00007fea88ba9ecf in QQuickWindow::keyPressEvent (this=<optimized out>, e=0x7fffc13ff100) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/quick/items/qquickwindow.cpp:1910
#45 0x00007fea85cc9b45 in QWindow::event (this=this@entry=0x219b900, ev=ev@entry=0x7fffc13ff100) at kernel/qwindow.cpp:2438
#46 0x00007fea88bb5b99 in QQuickWindow::event (this=this@entry=0x219b900, e=e@entry=0x7fffc13ff100) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde43-150400.1.1.x86_64/src/quick/items/qquickwindow.cpp:1901
#47 0x00007fea8b405c2b in PlasmaQuick::Dialog::event (this=0x219b900, event=0x7fffc13ff100) at /usr/src/debug/plasma-framework-5.90.0-bp154.1.1.x86_64/src/plasmaquick/dialog.cpp:1387
#48 0x00007fea8721a3ac in QApplicationPrivate::notify_helper (this=this@entry=0x1a9bf90, receiver=receiver@entry=0x219b900, e=e@entry=0x7fffc13ff100) at kernel/qapplication.cpp:3632
#49 0x00007fea872211a0 in QApplication::notify (this=0x7fffc13ff520, receiver=0x219b900, e=0x7fffc13ff100) at kernel/qapplication.cpp:3156
#50 0x00007fea85664ac3 in QCoreApplication::notifyInternal2 (receiver=0x219b900, event=0x7fffc13ff100) at kernel/qcoreapplication.cpp:1064
#51 0x00007fea85664cae in QCoreApplication::sendSpontaneousEvent (receiver=receiver@entry=0x219b900, event=event@entry=0x7fffc13ff100) at kernel/qcoreapplication.cpp:1474
#52 0x00007fea85cbacfb in QGuiApplicationPrivate::processKeyEvent (e=0xa8eee60) at kernel/qguiapplication.cpp:2414
#53 0x00007fea85cbf5e5 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0xa8eee60) at kernel/qguiapplication.cpp:2008
#54 0x00007fea85c9748b in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#55 0x00007fea7cd390d0 in userEventSourceDispatch (source=<optimized out>) at qeventdispatcher_glib.cpp:74
#56 0x00007fea7e2e47fb in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#57 0x00007fea7e2e4ba0 in ?? () from /usr/lib64/libglib-2.0.so.0
#58 0x00007fea7e2e4c2c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#59 0x00007fea856c70dc in QEventDispatcherGlib::processEvents (this=0x1aa11d0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#60 0x00007fea8566333a in QEventLoop::exec (this=this@entry=0x7fffc13ff400, flags=..., flags@entry=...) at kernel/qeventloop.cpp:232
#61 0x00007fea8566cb37 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1375
#62 0x00007fea85cb2f9c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#63 0x00007fea8721a305 in QApplication::exec () at kernel/qapplication.cpp:2824
#64 0x0000000000420740 in main (argc=<optimized out>, argv=0x7fffc13ff530) at /usr/src/debug/plasma5-workspace-5.24.3-bp154.1.1.x86_64/shell/main.cpp:238
[Inferior 1 (process 2431) detached]

Possible duplicates by query: bug 437355, bug 422072.

Reported using DrKonqi
Comment 1 Nate Graham 2022-04-04 20:54:13 UTC
#7  qt_starts_with (cs=Qt::CaseInsensitive, needle=..., haystack=...) at text/qstring.cpp:11974
#8  QStringRef::startsWith (this=this@entry=0xa292918, str=..., cs=cs@entry=Qt::CaseInsensitive) at text/qstring.cpp:11748
#9  0x00007fea12ad5c62 in PlasmaAppletItem::matches (this=0x98fcc60, pattern=...) at /usr/src/debug/plasma5-workspace-5.24.3-bp154.1.1.x86_64/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp:137

Code is:

    // Add English name and keywords so users in other languages won't have to switch IME when searching.
    if (!QLocale().name().startsWith(QLatin1String("en_"))) {
        const QString name(rawData[QStringLiteral("KPlugin")][QStringLiteral("Name")].toString());
        keywords << &name << m_info.value(QStringLiteral("Keywords"), QString()).splitRef(QLatin1Char(';'), Qt::SkipEmptyParts);
    }

    for (const auto &keyword : keywords) {
        if (keyword.startsWith(pattern, Qt::CaseInsensitive)) {
            return true;
        }
    }

Seems like maybe keywords is empty, as right now we are assuming it's not.

1. Does literally any text you type into the search field cause it to crash, or only some text?
2. Are you using your system in a language that's not English? If so, does the crashing stop if you switch to English?
Comment 2 Bug Janitor Service 2022-04-19 04:35:05 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 3 Bug Janitor Service 2022-05-04 04:35:28 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!
Comment 4 Nate Graham 2022-05-12 16:23:15 UTC
*** Bug 453667 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2022-05-12 16:24:59 UTC
Got another report with the same backtrace from someone also using Plasma with a non-English language; re-opening.

Vasua, does the crash go away if you temporarily switch the system language to English?
Comment 6 Kishore Gopalakrishnan 2022-06-19 05:11:44 UTC
(In reply to Nate Graham from comment #5)
> Got another report with the same backtrace from someone also using Plasma
> with a non-English language; re-opening.
> 
> Vasua, does the crash go away if you temporarily switch the system language
> to English?

Not the original reporter, but I cannot reproduce this with my System language set to Tamil or Ukrainian, so I guess something else might also be needed to reproduce this. I tried typing both Tamil and Latin text.

Operating System: KDE neon Unstable Edition
KDE Plasma version: 5.25.80
Kde frameworks version: 5.96.0
Qt version: 5.15.4
Kernel: 5.13.0-51-generic (64-bit)
Graphics: X11
Comment 7 Bharadwaj Raju 2022-10-25 14:51:47 UTC
    for (const auto &keyword : keywords) {
        if (keyword.startsWith(pattern, Qt::CaseInsensitive)) {
            return true;
        }
    }

> Seems like maybe keywords is empty, as right now we are assuming it's not.

That can't be it. If keywords was empty none of the loop body would have run. And since from the trace it got into QString code means there was some QString there which it operated on. The crash is somehow happening in Qt's string comparison code itself. Maybe some invalid Unicode somewhere. It would be nice to have the actual values of the strings being compared, if someone can use GDB to get that.