Bug 468791 - Apps crash in KCoreConfigSkeleton::load() after KConfigWatcher::configChanged()
Summary: Apps crash in KCoreConfigSkeleton::load() after KConfigWatcher::configChanged()
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kconfig
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.105.0
Platform: unspecified Linux
: VHI crash
Target Milestone: ---
Assignee: Matthew Dawson
URL:
Keywords: drkonqi
: 470956 471042 471550 472362 473796 474600 474622 476145 476162 477250 477396 485355 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-04-22 06:12 UTC by 2956661656
Modified: 2024-04-11 18:16 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.9


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 2956661656 2023-04-22 06:12:47 UTC
Application: latte-dock (0.10.77)

Qt Version: 5.15.9
Frameworks Version: 5.105.0
Operating System: Linux 6.2.12-arch1-1 x86_64
Windowing System: X11
Distribution: XeroLinux
DrKonqi: 5.27.4 [KCrashBackend]

-- Information about the crash:
it crashed when I click a switch light/dark mode in widget named control centre.

The crash can be reproduced every time.

-- Backtrace:
Application: Latte Dock (latte-dock), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f7709b2d03c in KCoreConfigSkeleton::load() () at /usr/lib/libKF5ConfigCore.so.5
#5  0x00007f77090beb41 in  () at /usr/lib/libQt5Core.so.5
#6  0x00007f7709b064ec in KConfigWatcher::configChanged(KConfigGroup const&, QList<QByteArray> const&) () at /usr/lib/libKF5ConfigCore.so.5
#7  0x00007f7709b10aa5 in  () at /usr/lib/libKF5ConfigCore.so.5
#8  0x00007f7709b10bd3 in KConfigWatcher::qt_metacall(QMetaObject::Call, int, void**) () at /usr/lib/libKF5ConfigCore.so.5
#9  0x00007f7709acd45f in  () at /usr/lib/libQt5DBus.so.5
#10 0x00007f77090b1c80 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#11 0x00007f7709d78b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#12 0x00007f770908e028 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#13 0x00007f770908eb33 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#14 0x00007f77090d4f58 in  () at /usr/lib/libQt5Core.so.5
#15 0x00007f770750f53b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#16 0x00007f770756c219 in  () at /usr/lib/libglib-2.0.so.0
#17 0x00007f770750e1a2 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#18 0x00007f77090d8d3c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#19 0x00007f770908668c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#20 0x00007f77090912f9 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#21 0x00005563c772afee in  ()
#22 0x00007f770883c790 in  () at /usr/lib/libc.so.6
#23 0x00007f770883c84a in __libc_start_main () at /usr/lib/libc.so.6
#24 0x00005563c77328f5 in  ()
[Inferior 1 (process 1059) detached]

Reported using DrKonqi
Comment 1 Nate Graham 2023-09-14 19:42:02 UTC
*** Bug 471042 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2023-09-14 19:42:24 UTC
*** Bug 473796 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2023-09-14 19:43:29 UTC
*** Bug 471550 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2023-09-14 19:43:51 UTC
Symbolicated backtrace from one of the plasma crashes:

Thread 1 (Thread 0x7fd58c1ae980 (LWP 8203)):
[KCrash Handler]
#5  0x00007fd590c0da58 in KCoreConfigSkeleton::load() (this=0x5633bacd9750) at /usr/src/debug/kconfig-5.107.0/src/core/kcoreconfigskeleton.cpp:1206
#6  0x00007fd58ed257a2 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc62a1c780, r=0x5633b7759bb0, this=0x5633bacd9830) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#7  doActivate<false>(QObject*, int, void**) (sender=0x5633b7759bb0, signal_index=3, argv=0x7ffc62a1c780) at kernel/qobject.cpp:3925
#8  0x00007fd58ed1e40f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x5633b7759bb0, m=m@entry=0x7fd590c29700, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffc62a1c780) at kernel/qobject.cpp:3985
#9  0x00007fd590be7b17 in KConfigWatcher::configChanged(KConfigGroup const&, QList<QByteArray> const&) (this=this@entry=0x5633b7759bb0, _t1=..., _t2=...) at /usr/src/debug/kconfig-5.107.0/build/src/core/KF5ConfigCore_autogen/EWIEGA46WW/moc_kconfigwatcher.cpp:147
#10 0x00007fd590bf236a in KConfigWatcher::onConfigChangeNotification(QHash<QString, QList<QByteArray> > const&) (changes=..., this=0x5633b7759bb0) at /usr/src/debug/kconfig-5.107.0/src/core/kconfigwatcher.cpp:102
#11 KConfigWatcher::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x5633b7759bb0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=1, _a=_a@entry=0x7ffc62a1c930) at /usr/src/debug/kconfig-5.107.0/build/src/core/KF5ConfigCore_autogen/EWIEGA46WW/moc_kconfigwatcher.cpp:88
#12 0x00007fd590bf2483 in KConfigWatcher::qt_metacall(QMetaObject::Call, int, void**) (this=0x5633b7759bb0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7ffc62a1c930) at /usr/src/debug/kconfig-5.107.0/build/src/core/KF5ConfigCore_autogen/EWIEGA46WW/moc_kconfigwatcher.cpp:133
#13 0x00007fd58ff9446b in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) (this=<optimized out>, object=<optimized out>, msg=<optimized out>, metaTypes=<optimized out>, slotIdx=<optimized out>) at qdbusintegrator.cpp:1001
#14 0x00007fd58ed192b0 in QObject::event(QEvent*) (this=0x5633b7759bb0, e=0x7fd58415ee80) at kernel/qobject.cpp:1347
#15 0x00007fd58f9a519e in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x5633b7759bb0, e=0x7fd58415ee80) at kernel/qapplication.cpp:3640
#16 0x00007fd58eced4f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5633b7759bb0, event=0x7fd58415ee80) at kernel/qcoreapplication.cpp:1064
#17 0x00007fd58eced6be in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#18 0x00007fd58ecf0af1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x5633b568af50) at kernel/qcoreapplication.cpp:1821
#19 0x00007fd58ecf1038 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=<optimized out>, event_type=<optimized out>) at kernel/qcoreapplication.cpp:1680
#20 0x00007fd58ed46c83 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x5633b578c940) at kernel/qeventdispatcher_glib.cpp:277
#21 0x00007fd58d7348d8 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#22 0x00007fd58d734ce8 in  () at /lib64/libglib-2.0.so.0
#23 0x00007fd58d734d7c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#24 0x00007fd58ed46496 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5633b578fd90, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#25 0x00007fd58ecebf8b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffc62a1cd70, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#26 0x00007fd58ecf4420 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#27 0x00007fd58f17059c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#28 0x00007fd58f9a5115 in QApplication::exec() () at kernel/qapplication.cpp:2832
#29 0x00005633b5073a91 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-workspace-5.27.6/shell/main.cpp:235
Comment 5 Nate Graham 2023-09-14 19:44:05 UTC
*** Bug 472362 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2023-09-14 19:44:16 UTC
*** Bug 470956 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2023-09-19 16:42:21 UTC
*** Bug 474622 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2023-09-19 16:47:40 UTC
*** Bug 474600 has been marked as a duplicate of this bug. ***
Comment 9 Bug Janitor Service 2023-10-04 12:06:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-pa/-/merge_requests/210
Comment 10 David Redondo 2023-10-04 13:10:23 UTC
Git commit 3877906ab63ceb662885ecad645c6bb13dd2c8fd by David Redondo.
Committed on 04/10/2023 at 13:58.
Pushed by davidre into branch 'master'.

Use context object with KConfigWatcher signal

KConfigWatcher has shared ownership shared with other places watching the
same file. We need to provide the context object otherwise load can be called
after this object has been destroyed.

M  +1    -1    src/qml/globalconfigskeleton.h

https://invent.kde.org/plasma/plasma-pa/-/commit/3877906ab63ceb662885ecad645c6bb13dd2c8fd
Comment 11 Bug Janitor Service 2023-10-04 13:11:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-pa/-/merge_requests/211
Comment 12 David Redondo 2023-10-04 13:11:46 UTC
Git commit f623e16a30f18f485bd2cad2d95a2810c72f4421 by David Redondo.
Committed on 04/10/2023 at 15:10.
Pushed by davidre into branch 'Plasma/5.27'.

Use context object with KConfigWatcher signal

KConfigWatcher has shared ownership shared with other places watching the
same file. We need to provide the context object otherwise load can be called
after this object has been destroyed.


(cherry picked from commit 3877906ab63ceb662885ecad645c6bb13dd2c8fd)

M  +1    -1    src/qml/globalconfigskeleton.h

https://invent.kde.org/plasma/plasma-pa/-/commit/f623e16a30f18f485bd2cad2d95a2810c72f4421
Comment 13 Nate Graham 2023-10-30 20:03:00 UTC
*** Bug 476162 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2023-11-03 15:15:50 UTC
All duplicates are in Plasma or the plasma-pa KCM. We think the above change for plasma-pa has fixed all of them. The fix is released in Plasma 5.27.9, so we can re-open this if we get any more duplicate reports from people using that version.
Comment 15 Nate Graham 2023-11-29 22:48:47 UTC
*** Bug 477396 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2023-11-29 23:03:32 UTC
*** Bug 477250 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2023-11-29 23:03:43 UTC
*** Bug 476145 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2024-04-11 18:16:15 UTC
*** Bug 485355 has been marked as a duplicate of this bug. ***