Bug 446764

Summary: System settings crashes on startup
Product: [Applications] systemsettings Reporter: Fushan Wen <qydwhotmail>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: me
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Fushan Wen 2021-12-10 02:19:48 UTC
Application: systemsettings (5.23.80)

Qt Version: 5.15.2
Frameworks Version: 5.89.0
Operating System: Linux 5.15.5-1-default x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.23.80 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
After updating to the latest version, launch systemsettings, and the crash handler appears.

The crash can be reproduced every time.

-- Backtrace:
Application: System Settings (systemsettings), signal: Aborted
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#7  0x00007f438c0f0323 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#8  0x00007f438c0a0366 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#9  0x00007f438c0897d3 in __GI_abort () at abort.c:79
#10 0x00007f438c54cfe7 in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#11 QMessageLogger::fatal(char const*, ...) const (this=this@entry=0x7fff9f26a280, msg=msg@entry=0x7f438c039be8 "Failed to initialize KCModuleQML") at global/qlogging.cpp:893
#12 0x00007f438c01027e in KCModuleQml::KCModuleQml(std::unique_ptr<KQuickAddons::ConfigModule, std::default_delete<KQuickAddons::ConfigModule> >, QWidget*, QList<QVariant> const&) (this=<optimized out>, configModule=std::unique_ptr<class KQuickAddons::ConfigModule> = {...}, parent=<optimized out>, args=<optimized out>, this=<optimized out>, configModule=std::unique_ptr<class KQuickAddons::ConfigModule> = {...}, parent=<optimized out>, args=<optimized out>) at /usr/src/debug/kcmutils-5.89.0git.20211204T165638~d82e565-ku.9.2.x86_64/src/kcmoduleqml.cpp:174
#13 0x00007f438c015fe8 in KCModuleLoader::loadModule(KPluginMetaData const&, QWidget*, QList<QVariant> const&) (metaData=..., parent=0x5646afd80d30, args=...) at /usr/src/debug/kcmutils-5.89.0git.20211204T165638~d82e565-ku.9.2.x86_64/src/kcmoduleloader.cpp:87
#14 0x00007f438c018d1e in KCModuleProxyPrivate::loadModule() (this=this@entry=0x5646afd80e70) at /usr/src/debug/kcmutils-5.89.0git.20211204T165638~d82e565-ku.9.2.x86_64/src/kcmoduleproxy.cpp:115
#15 0x00007f438c0192f8 in KCModuleProxy::realModule() const (this=this@entry=0x5646afd80d30) at /usr/src/debug/kcmutils-5.89.0git.20211204T165638~d82e565-ku.9.2.x86_64/src/kcmoduleproxy.cpp:59
#16 0x00007f438ddeb782 in ModuleView::updatePageIconHeader(KPageWidgetItem*, bool) (this=this@entry=0x5646af1ed050, page=page@entry=0x5646afd80cd0, light=light@entry=true) at /usr/src/debug/systemsettings5-5.23.80git.20211204T210925~2a64b6d8-ku.47.2.x86_64/core/ModuleView.cpp:283
#17 0x00007f438dded662 in ModuleView::addModule(MenuItem*, QStringList const&) (this=this@entry=0x5646af1ed050, item=<optimized out>, args=...) at /usr/src/debug/systemsettings5-5.23.80git.20211204T210925~2a64b6d8-ku.47.2.x86_64/core/ModuleView.cpp:260
#18 0x00007f438ddedee0 in ModuleView::loadModule(QModelIndex const&, QStringList const&) (args=..., menuItem=..., this=0x5646af1ed050) at /usr/src/debug/systemsettings5-5.23.80git.20211204T210925~2a64b6d8-ku.47.2.x86_64/core/ModuleView.cpp:218
#19 0x00007f43504a4a1b in SidebarMode::initWidget() (this=this@entry=0x5646af149eb0) at /usr/src/debug/systemsettings5-5.23.80git.20211204T210925~2a64b6d8-ku.47.2.x86_64/sidebar/SidebarMode.cpp:861
#20 0x00007f43504a5f59 in SidebarMode::mainWidget() (this=0x5646af149eb0) at /usr/src/debug/systemsettings5-5.23.80git.20211204T210925~2a64b6d8-ku.47.2.x86_64/sidebar/SidebarMode.cpp:316
#21 0x00005646acd24bc8 in SettingsBase::changePlugin() (this=0x5646aeddf150) at /usr/src/debug/systemsettings5-5.23.80git.20211204T210925~2a64b6d8-ku.47.2.x86_64/app/SettingsBase.cpp:336
#22 0x00005646acd28762 in SettingsBase::initApplication() (this=0x5646aeddf150) at /usr/src/debug/systemsettings5-5.23.80git.20211204T210925~2a64b6d8-ku.47.2.x86_64/app/SettingsBase.cpp:139
#23 0x00007f438c798fee in QObject::event(QEvent*) (this=0x5646aeddf150, e=0x5646af317590) at kernel/qobject.cpp:1314
#24 0x00007f438dd9a149 in KXmlGuiWindow::event(QEvent*) (this=0x5646aeddf150, ev=0x5646af317590) at /usr/src/debug/kxmlgui-5.89.0git.20211204T170535~11c9cc80-ku.4.2.x86_64/src/kxmlguiwindow.cpp:219
#25 0x00007f438d41ea7f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x5646aeddf150, e=0x5646af317590) at kernel/qapplication.cpp:3632
#26 0x00007f438c76c9fa in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5646aeddf150, event=0x5646af317590) at kernel/qcoreapplication.cpp:1064
#27 0x00007f438c76fa47 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x5646aec68480) at kernel/qcoreapplication.cpp:1821
#28 0x00007f438c7c4853 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=s@entry=0x5646aed76ef0) at kernel/qeventdispatcher_glib.cpp:277
#29 0x00007f438a24dd4f in g_main_dispatch (context=0x7f4380005000) at ../glib/gmain.c:3381
#30 g_main_context_dispatch (context=0x7f4380005000) at ../glib/gmain.c:4099
#31 0x00007f438a24e0d8 in g_main_context_iterate (context=context@entry=0x7f4380005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#32 0x00007f438a24e18f in g_main_context_iteration (context=0x7f4380005000, may_block=1) at ../glib/gmain.c:4240
#33 0x00007f438c7c3ed4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5646aed836f0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#34 0x00007f438c76b3fb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff9f26af70, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#35 0x00007f438c7736e0 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#36 0x00007f438ccc018c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1867
#37 0x00007f438d41e9f5 in QApplication::exec() () at kernel/qapplication.cpp:2824
#38 0x00005646acd1fe94 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/systemsettings5-5.23.80git.20211204T210925~2a64b6d8-ku.47.2.x86_64/app/main.cpp:183
[Inferior 1 (process 2170) detached]

Possible duplicates by query: bug 444232, bug 444102, bug 443389, bug 443186, bug 442689.

Reported using DrKonqi
Comment 1 ratijas 2021-12-10 11:59:44 UTC
Sorry, this was caused by my change in Kirigami's global toolbar code. Apparently, a property declared deep in private components is re-exported as a public API, which is why it remained of type `var` instead of either bool or an int (enum). Other half of the reason was inline QML component's data in kcmutils module which was never updated to use newer enum values.

KCM code is fixed in frameworks/kcmutils!71 [1], and the var-to-int change was almost immediately reverted in 176615d5 [2], and a TODO KF6 commend was added in follow-up merge request frameworks/kirigami!438 [3]. Until KF6 we can't change the property type (the comment should help preventing it), but we can clean up all and any instances of old behavior.

[1]: https://invent.kde.org/frameworks/kcmutils/-/merge_requests/71
[2]: https://invent.kde.org/frameworks/kirigami/-/commit/176615d5d771f9003e3e88a0e1378667fa9ca5e4
[3]: https://invent.kde.org/frameworks/kirigami/-/merge_requests/438