SUMMARY Last message in terminal: Must construct a QGuiApplication first. [1] 159783 segmentation fault (core dumped) plasmoidviewer -a org.kde.plasma.clipboard Traceback: #0 0x00007f3a6286aa88 in QInputMethodPrivate::platformInputContext (this=<error reading variable: Cannot access memory at address 0x8>) at ../../include/QtGui/5.15.4/QtGui/private/../../../../../src/gui/kernel/qinputmethod_p.h:74 #1 QInputMethod::commit (this=0x0) at kernel/qinputmethod.cpp:364 #2 0x00007f3a6463a0c7 in QQuickWindowPrivate::clearFocusInScope (this=0x561e49477a90, scope=0x561e49f95ab0, item=0x561e49fb41f0, reason=Qt::OtherFocusReason, options=...) at /usr/src/debug/qtdeclarative/src/quick/items/qquickwindow.cpp:1242 #3 0x00007f3a6461e508 in QQuickItemPrivate::setEffectiveEnableRecur (this=0x561e49c32140, scope=0x561e49f95ab0, newEffectiveEnable=<optimized out>) at /usr/src/debug/qtdeclarative/src/quick/items/qquickitem.cpp:6130 #4 0x00007f3a6461e413 in QQuickItemPrivate::setEffectiveEnableRecur (this=0x561e49cf9a00, scope=0x561e49f95ab0, newEffectiveEnable=<optimized out>) at /usr/src/debug/qtdeclarative/src/quick/items/qquickitem.cpp:6136 #5 0x00007f3a64168e82 in QQmlPropertyData::writeProperty (this=<optimized out>, target=<optimized out>, value=<optimized out>, flags=...) at ../../include/QtQml/5.15.4/QtQml/private/../../../../../../qtdeclarative/src/qml/qml/qqmlpropertydata_p.h:375 #6 0x00007f3a641be6d5 in GenericBinding<1>::doStore<bool> (flags=..., pd=<optimized out>, value=<optimized out>, this=<optimized out>) at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlbinding.cpp:342 #7 GenericBinding<1>::write (this=0x561e49fa9fe0, result=..., isUndefined=<optimized out>, flags=...) at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlbinding.cpp:305 #8 0x00007f3a641c5d2e in QQmlNonbindingBinding::doUpdate (this=0x561e49fa9fe0, watcher=..., flags=..., scope=...) at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlbinding.cpp:258 #9 0x00007f3a641c5813 in QQmlBinding::update (this=0x561e49fa9fe0, flags=...) at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlbinding.cpp:194 #10 0x00007f3a641a356f in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=0x0) at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlnotifier.cpp:104 #11 0x00007f3a624ac2bd in doActivate<false> (sender=0x561e49f57e30, signal_index=34, argv=0x0) at kernel/qobject.cpp:3778 #12 0x00007f3a54c4deb7 in Plasma::SortFilterModel::countChanged (this=0x561e49f57e30) at /home/ratijas/kde/build/frameworks/plasma-framework/src/declarativeimports/core/corebindingsplugin_autogen/EWIEGA46WW/moc_datamodel.cpp:355 #13 0x00007f3a54c75dc4 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Plasma::SortFilterModel::*)()>::call(void (Plasma::SortFilterModel::*)(), Plasma::SortFilterModel*, void**) ( f=(void (Plasma::SortFilterModel::*)(Plasma::SortFilterModel * const)) 0x7f3a54c4de8e <Plasma::SortFilterModel::countChanged()>, o=0x561e49f57e30, arg=0x7ffc64719dc0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:152 #14 0x00007f3a54c74f5c in QtPrivate::FunctionPointer<void (Plasma::SortFilterModel::*)()>::call<QtPrivate::List<>, void>(void (Plasma::SortFilterModel::*)(), Plasma::SortFilterModel*, void**) ( f=(void (Plasma::SortFilterModel::*)(Plasma::SortFilterModel * const)) 0x7f3a54c4de8e <Plasma::SortFilterModel::countChanged()>, o=0x561e49f57e30, arg=0x7ffc64719dc0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:185 #15 0x00007f3a54c73791 in QtPrivate::QSlotObject<void (Plasma::SortFilterModel::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x561e49f57140, r=0x561e49f57e30, a=0x7ffc64719dc0, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:418 #16 0x00007f3a624ac791 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #17 doActivate<false> (sender=0x561e49f57e30, signal_index=21, argv=0x7ffc64719dc0) at kernel/qobject.cpp:3886 #18 0x00007f3a62436252 in QAbstractItemModel::modelReset (this=<optimized out>, _t1=...) at .moc/moc_qabstractitemmodel.cpp:648 #19 0x00007f3a6245dbbd in QSortFilterProxyModelPrivate::_q_sourceReset (this=0x561e49f57f00) at itemmodels/qsortfilterproxymodel.cpp:1607 #20 QSortFilterProxyModel::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/moc_qsortfilterproxymodel.cpp:278 #21 0x00007f3a624ac7c8 in doActivate<false> (sender=0x561e498d2f90, signal_index=21, argv=0x7ffc64719f90) at kernel/qobject.cpp:3898 #22 0x00007f3a62436252 in QAbstractItemModel::modelReset (this=<optimized out>, _t1=...) at .moc/moc_qabstractitemmodel.cpp:648 #23 0x00007f3a4d7785ac in HistoryModel::clear (this=0x561e498d2f90) at /home/ratijas/kde/src/kde/workspace/plasma-workspace/klipper/historymodel.cpp:29 #24 0x00007f3a4d7784f6 in HistoryModel::~HistoryModel (this=0x561e498d2f90, __in_chrg=<optimized out>) at /home/ratijas/kde/src/kde/workspace/plasma-workspace/klipper/historymodel.cpp:21 #25 0x00007f3a4d77853e in HistoryModel::~HistoryModel (this=0x561e498d2f90, __in_chrg=<optimized out>) at /home/ratijas/kde/src/kde/workspace/plasma-workspace/klipper/historymodel.cpp:22 #26 0x00007f3a624a2905 in QObjectPrivate::deleteChildren (this=this@entry=0x561e49da0600) at kernel/qobject.cpp:2104 #27 0x00007f3a624a3099 in QObject::~QObject (this=<optimized out>, this=<optimized out>) at kernel/qobject.cpp:1082 #28 0x00007f3a6499d356 in Plasma::DataContainer::~DataContainer (this=0x561e49d8e390, __in_chrg=<optimized out>) at /home/ratijas/kde/src/frameworks/plasma-framework/src/plasma/datacontainer.cpp:28 #29 0x00007f3a6499d372 in Plasma::DataContainer::~DataContainer (this=0x561e49d8e390, __in_chrg=<optimized out>) at /home/ratijas/kde/src/frameworks/plasma-framework/src/plasma/datacontainer.cpp:28 #30 0x00007f3a624a2905 in QObjectPrivate::deleteChildren (this=this@entry=0x561e49cc7e60) at kernel/qobject.cpp:2104 #31 0x00007f3a624a3099 in QObject::~QObject (this=<optimized out>, this=<optimized out>) at kernel/qobject.cpp:1082 #32 0x00007f3a649a1e61 in Plasma::DataEngine::~DataEngine (this=0x561e4966dee0, __in_chrg=<optimized out>) at /home/ratijas/kde/src/frameworks/plasma-framework/src/plasma/dataengine.cpp:73 #33 0x00007f3a4d74b7ba in ClipboardEngine::~ClipboardEngine (this=0x561e4966dee0, __in_chrg=<optimized out>) at /home/ratijas/kde/src/kde/workspace/plasma-workspace/klipper/clipboardengine.cpp:39 #34 0x00007f3a4d74b7d6 in ClipboardEngine::~ClipboardEngine (this=0x561e4966dee0, __in_chrg=<optimized out>) at /home/ratijas/kde/src/kde/workspace/plasma-workspace/klipper/clipboardengine.cpp:39 #35 0x00007f3a649abc96 in Plasma::DataEngineManagerPrivate::~DataEngineManagerPrivate (this=0x561e49868480, __in_chrg=<optimized out>) at /home/ratijas/kde/src/frameworks/plasma-framework/src/plasma/private/dataenginemanager.cpp:49 #36 0x00007f3a649aad47 in Plasma::DataEngineManager::~DataEngineManager (this=0x7f3a64a56830 <Plasma::(anonymous namespace)::Q_QGS_privateDataEngineManagerSelf::innerFunction()::holder>, __in_chrg=<optimized out>) at /home/ratijas/kde/src/frameworks/plasma-framework/src/plasma/private/dataenginemanager.cpp:89 #37 0x00007f3a649abd82 in Plasma::DataEngineManagerSingleton::~DataEngineManagerSingleton (this=0x7f3a64a56830 <Plasma::(anonymous namespace)::Q_QGS_privateDataEngineManagerSelf::innerFunction()::holder>, __in_chrg=<optimized out>) at /home/ratijas/kde/src/frameworks/plasma-framework/src/plasma/private/dataenginemanager.cpp:68 #38 0x00007f3a649aac24 in Holder::~Holder (this=0x7f3a64a56830 <Plasma::(anonymous namespace)::Q_QGS_privateDataEngineManagerSelf::innerFunction()::holder>, __in_chrg=<optimized out>) at /home/ratijas/kde/src/frameworks/plasma-framework/src/plasma/private/dataenginemanager.cpp:74 #39 0x00007f3a61ce3ef5 in __run_exit_handlers (status=0, listp=0x7f3a61ea1778 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:113 #40 0x00007f3a61ce4070 in __GI_exit (status=<optimized out>) at exit.c:143 #41 0x00007f3a61ccc297 in __libc_start_call_main (main=main@entry=0x561e47804a41 <main(int, char**)>, argc=argc@entry=3, argv=argv@entry=0x7ffc6471a4a8) at ../sysdeps/nptl/libc_start_call_main.h:74 #42 0x00007f3a61ccc34a in __libc_start_main_impl (main=0x561e47804a41 <main(int, char**)>, argc=3, argv=0x7ffc6471a4a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc6471a498) at ../csu/libc-start.c:392 #43 0x0000561e47803b85 in _start () at ../sysdeps/x86_64/start.S:115 STEPS TO REPRODUCE 1. Run `plasmoidviewer -a org.kde.plasma.clipboard` 2. Close plasmoid viewer OBSERVED RESULT Crashes EXPECTED RESULT Welp, it shouldn't SOFTWARE/OS VERSIONS git master KDE Operating System: Arch Linux KDE Plasma Version: 5.25.80 KDE Frameworks Version: 5.95.0 Qt Version: 5.15.4 Kernel Version: 5.18.1-arch1-1 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 15.6 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kglobalaccel/-/merge_requests/106
Git commit 8e8ef50b9faa3c2365dcf60f9d8dac71c55c0440 by ivan tkachenko. Committed on 23/04/2024 at 18:18. Pushed by ratijas into branch 'master'. Fix connection lifetime issue The lack of receiver may cause undefined behavior / segmentation fault crash if, for example, a KActionCollection is stored as a Q_GLOBAL_STATIC too and coincidentally gets destructed after the KGlobalAccel singleton instance. Note that all other connections in this file use this `q->connect` style and already have a context object set to `q`. Test case: Run `plasmoidviewer -a org.kde.plasma.clipboard`. With this patch is still crashes on exit, but now in a different place. Related: bug 485386 M +1 -1 src/kglobalaccel.cpp https://invent.kde.org/frameworks/kglobalaccel/-/commit/8e8ef50b9faa3c2365dcf60f9d8dac71c55c0440
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma5support/-/merge_requests/25
Could not reproduce anymore. Probably was fixed recently by one of the Fushan's refactorings. Somewhat related: the lifetime management was wrong in plasmoidviewer, though reverting its patch doesn't break things. https://invent.kde.org/plasma/plasma-sdk/-/merge_requests/131