Bug 472283 - plasmashell crashes when attempting to configure unknown applet
Summary: plasmashell crashes when attempting to configure unknown applet
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-07-15 15:03 UTC by Nicolas Fella
Modified: 2023-11-28 16:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2023-07-15 15:03:58 UTC
1. Have a broken applet on the panel. It shows up as "Unknown" with "Error loading the widget. Package does not exist"
2. Right click on it
3. Configure "Unknown"

#0  0x00007f182098b401 in Plasma::Corona::kPackage() const (this=0x0) at /home/nico/kde6/src/plasma-framework/src/plasma/corona.cpp:58
#1  0x00007f1820cb11dc in PlasmaQuick::ConfigView::init() (this=0x3545580) at /home/nico/kde6/src/plasma-framework/src/plasmaquick/configview.cpp:333
#2  0x000000000044056c in PanelView::showConfigurationInterface(Plasma::Applet*) (this=0x7f17fc004940, applet=<optimized out>) at /home/nico/kde6/src/plasma-workspace/shell/panelview.cpp:770
#3  0x00007f181d1ddcd4 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffe3f7148b0, r=0x7f17fc004940, this=0x22ffe40)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qobjectdefs_impl.h:363
#4  doActivate<false>(QObject*, int, void**) (sender=0x12cd760, signal_index=36, argv=0x7ffe3f7148b0) at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:3992
#5  0x00007f181d1d4757 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=<optimized out>, m=m@entry=0x7f18209ee200, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffe3f7148b0)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:4052
#6  0x00007f182097c752 in Plasma::Containment::configureRequested(Plasma::Applet*) (this=<optimized out>, _t1=<optimized out>)
    at /home/nico/kde6/build/plasma-framework/src/plasma/KF6Plasma_autogen/include/moc_containment.cpp:1002
#7  0x00007f181d1ddcd4 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffe3f7149c0, r=0x14953d0, this=0x149f1b0)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qobjectdefs_impl.h:363
#8  doActivate<false>(QObject*, int, void**) (sender=0x14953d0, signal_index=36, argv=0x7ffe3f7149c0) at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:3992
#9  0x00007f181d1d4757 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=<optimized out>, m=m@entry=0x7f18209ee200, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffe3f7149c0)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:4052
#10 0x00007f182097c752 in Plasma::Containment::configureRequested(Plasma::Applet*) (this=<optimized out>, _t1=<optimized out>)
    at /home/nico/kde6/build/plasma-framework/src/plasma/KF6Plasma_autogen/include/moc_containment.cpp:1002
#11 0x00007f181d1de248 in doActivate<false>(QObject*, int, void**) (sender=0x151ce20, signal_index=7, argv=0x7ffe3f714ad0) at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:4004
#12 0x00007f181d1d4757 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=sender@entry=0x151ce20, m=m@entry=0x7f181e10c5c0, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x7ffe3f714ad0)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:4052
#13 0x00007f181de195a4 in QAction::triggered(bool) (this=this@entry=0x151ce20, _t1=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/redhat-linux-build/src/gui/Gui_autogen/include/moc_qaction.cpp:638
#14 0x00007f181de1c6eb in QAction::activate(QAction::ActionEvent) (this=0x151ce20, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/gui/kernel/qaction.cpp:1104
#15 0x00007f181eba2324 in QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool)
    (this=0x4e68730, causedStack=..., action=0x151ce20, action_e=QAction::Trigger, self=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/widgets/qmenu.cpp:1396
#16 0x00007f181ebaa720 in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) (this=0x4e68730, action=0x151ce20, action_e=QAction::Trigger, self=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/widgets/qmenu.cpp:1478
#17 0x00007f181ea1d8e0 in QWidget::event(QEvent*) (this=0x35a9670, event=0x7ffe3f7151e0) at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/kernel/qwidget.cpp:9317
#18 0x00007f181e9c0b08 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0xd23330, receiver=receiver@entry=0x35a9670, e=e@entry=0x7ffe3f7151e0)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:3287
#19 0x00007f181e9cab66 in QApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x35a9670, e=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:2774
#20 0x00007f181d17c308 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x35a9670, event=0x7ffe3f7151e0)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1115
#21 0x00007f181d17c51d in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1547
#22 0x00007f181e9c956e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool)
    (receiver=0x35a9670, event=event@entry=0x7ffe3f7151e0, alienWidget=0x0, nativeWidget=0x35a9670, buttonDown=buttonDown@entry=0x7f181efb8830 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:2358
#23 0x00007f181ea31673 in QWidgetWindow::handleMouseEvent(QMouseEvent*) (this=0x3607c50, event=event@entry=0x7ffe3f7154a0)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/kernel/qwidgetwindow.cpp:519
#24 0x00007f181ea33ab0 in QWidgetWindow::event(QEvent*) (this=0x3607c50, event=0x7ffe3f7154a0) at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/kernel/qwidgetwindow.cpp:241
#25 0x00007f181e9c0b08 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x3607c50, e=0x7ffe3f7154a0)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:3287
#26 0x00007f181d17c308 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x3607c50, event=0x7ffe3f7154a0)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1115
#27 0x00007f181d17c51d in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1547
#28 0x00007f181da09017 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (e=0x7f1800003e20)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/gui/kernel/qguiapplication.cpp:2285
--Type <RET> for more, q to quit, c to continue without paging--c
#29 0x00007f181da6339c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=...)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/gui/kernel/qwindowsysteminterface.cpp:1094
#30 0x00007f181df43964 in userEventSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/gui/platform/unix/qeventdispatcher_glib.cpp:38
#31 0x00007f181c4eb48c in g_main_dispatch (context=0x7f1804000f10) at ../glib/gmain.c:3460
#32 g_main_context_dispatch (context=0x7f1804000f10) at ../glib/gmain.c:4200
#33 0x00007f181c549638 in g_main_context_iterate.isra.0 (context=0x7f1804000f10, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4276
#34 0x00007f181c4e8b13 in g_main_context_iteration (context=0x7f1804000f10, may_block=1) at ../glib/gmain.c:4343
#35 0x00007f181d41ff7f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0xd53810, flags=...)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#36 0x00007f181d188e93 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffe3f7158c0, flags=..., flags@entry=...)
    at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/global/qflags.h:34
#37 0x00007f181d184b3d in QCoreApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/corelib/global/qflags.h:74
#38 0x00007f181d9f85cd in QGuiApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/gui/kernel/qguiapplication.cpp:1894
#39 0x00007f181e9c0a79 in QApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.1-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:2566
#40 0x0000000000424fc0 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/nico/kde6/src/plasma-workspace/shell/main.cpp:242

KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: 6.5.1
Comment 1 Marco Martin 2023-11-28 13:31:18 UTC
can reproduce, looking into that
Comment 2 Bug Janitor Service 2023-11-28 13:53:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/994
Comment 3 Bug Janitor Service 2023-11-28 14:09:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/995
Comment 4 Marco Martin 2023-11-28 14:10:24 UTC
Git commit 27007f4a9f7be1c9053029b410f8838c5baca1f4 by Marco Martin.
Committed on 28/11/2023 at 14:45.
Pushed by mart into branch 'master'.

Don't crash on invalid applets or coronas

configview assumes everywhere corona will be valid, so always have it
assigned when possible. it will cause a "broken" config dialog, but
should
not crash under any circumstance.

Another part of the fix will be to actually not show the config button
anywhere so that broken dialog can't even be triggered

M  +6    -2    src/plasmaquick/configview.cpp

https://invent.kde.org/plasma/libplasma/-/commit/27007f4a9f7be1c9053029b410f8838c5baca1f4
Comment 5 Bug Janitor Service 2023-11-28 14:22:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1884
Comment 6 Marco Martin 2023-11-28 16:01:11 UTC
Git commit 7b58e8eb44507374d0d3d35c92c6beb688404641 by Marco Martin.
Committed on 28/11/2023 at 17:01.
Pushed by mart into branch 'master'.

expose hasConfigurationInterface to QML

this will be needed to not show the config button to applets that don't
have any, especially invalid applets

M  +1    -0    src/plasma/applet.cpp
M  +12   -0    src/plasma/applet.h
M  +1    -0    src/plasmaquick/appletquickitem.cpp

https://invent.kde.org/plasma/libplasma/-/commit/7b58e8eb44507374d0d3d35c92c6beb688404641
Comment 7 Marco Martin 2023-11-28 16:01:22 UTC
Git commit c9b09c41406fb201661463a8ad6f04f637e8dd83 by Marco Martin.
Committed on 28/11/2023 at 17:01.
Pushed by mart into branch 'master'.

Don't show config buttons if the applet doesn't want

Respect Plasmoid.hasConfigurationInterface

M  +1    -1    containments/desktop/package/contents/ui/ConfigOverlay.qml
M  +1    -0    containments/panel/contents/ui/ConfigOverlay.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/c9b09c41406fb201661463a8ad6f04f637e8dd83