| Summary: | Systemsettings crashes when applying change in KWallet KCM | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Nicolas Fella <nicolas.fella> |
| Component: | general | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | nate |
| Priority: | NOR | Keywords: | qt6 |
| Version First Reported In: | master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/utilities/kwalletmanager/-/commit/8e61ad31269a627a00bdbd8ff9fc7e4ae04ce6ec | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
in https://invent.kde.org/utilities/kwalletmanager/-/blob/master/src/konfigurator/konfigurator.cpp?ref_type=heads#L73 widget()->window() gives an instance of FocusHackWidget (from systemsettings). This is clearly not a window, so why is it considered one? The check happens before the KCM widget is properly added to the systemsettings widget tree, so at this point the widget doesn't have a proper parent yet and thus ->window() doesn't work A possibly relevant merge request was started @ https://invent.kde.org/utilities/kwalletmanager/-/merge_requests/31 Git commit 8e61ad31269a627a00bdbd8ff9fc7e4ae04ce6ec by Nicolas Fella. Committed on 04/09/2023 at 17:53. Pushed by aacid into branch 'master'. Delay creating the KAuth Action At the point where we create it the KCM widget is not included in the widget tree yet, so widget()->parent() gives us a wrong widget Delay creating the action until we actually need it to fix this This also slightly simplifies the code M +6 -13 src/konfigurator/konfigurator.cpp M +0 -3 src/konfigurator/konfigurator.h https://invent.kde.org/utilities/kwalletmanager/-/commit/8e61ad31269a627a00bdbd8ff9fc7e4ae04ce6ec |
STEPS TO REPRODUCE 1. Run systemsettings kcm_kwallet5 2. Change any setting 3. Click Apply OBSERVED RESULT #0 QWindow::winId() const (this=this@entry=0x10bea00) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/gui/kernel/qwindow.cpp:693 #1 0x00007fff98f99350 in KAuth::Polkit1Backend::preAuthAction(QString const&, QWindow*) (this=this@entry=0x15dd170, action=..., parent=parent@entry=0x10bea00) at /home/nico/kde6/src/kauth/src/backends/polkit-1/Polkit1Backend.cpp:58 #2 0x00007ffff7437e41 in KAuth::ExecuteJobPrivate::doExecuteAction() (this=0x1b26760) at /home/nico/kde6/src/kauth/src/executejob.cpp:157 #3 0x00007ffff47cfe57 in QObject::event(QEvent*) (this=0x17debc0, e=0xd46470) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:1391 #4 0x00007ffff6dc0af8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x17debc0, e=0xd46470) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:3287 #5 0x00007ffff477cdb8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x17debc0, event=0xd46470) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1118 #6 0x00007ffff477cfbd in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1536 #7 0x00007ffff47808d5 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x453c60) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1898 #8 0x00007ffff4780c0d in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=<optimized out>, event_type=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1757 #9 0x00007ffff4a2108f in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x6f4680) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:243 #10 0x00007ffff3b2a4fc in g_main_dispatch (context=0x7fffdc000f10) at ../glib/gmain.c:3460 #11 g_main_context_dispatch (context=0x7fffdc000f10) at ../glib/gmain.c:4200 #12 0x00007ffff3b886b8 in g_main_context_iterate.isra.0 (context=0x7fffdc000f10, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4276 #13 0x00007ffff3b27b83 in g_main_context_iteration (context=0x7fffdc000f10, may_block=1) at ../glib/gmain.c:4343 #14 0x00007ffff4a2092f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x4561a0, flags=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393 #15 0x00007ffff47899f3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffffffc230, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/global/qflags.h:34 #16 0x00007ffff5a10e18 in KJob::exec() (this=this@entry=0x17debc0) at /usr/include/qt6/QtCore/qflags.h:74 #17 0x00007fff9b93623d in KWalletConfig::save() (this=0x1254940) at /home/nico/kde6/src/kwalletmanager/src/konfigurator/konfigurator.cpp:321 #18 0x00007ffff7fb4052 in ModuleView::moduleSave(KCModule*) (this=0x817180, module=<optimized out>) at /home/nico/kde6/src/systemsettings/core/ModuleView.cpp:386 #19 0x00007ffff7fb6a36 in ModuleView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffc4c0) at /home/nico/kde6/build/systemsettings/core/systemsettingsview_autogen/include/moc_ModuleView.cpp:274 #20 0x00007ffff47de908 in doActivate<false>(QObject*, int, void**) (sender=0x7cc130, signal_index=9, argv=0x7fffffffc4c0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:4004 #21 0x00007ffff47d4e17 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x7cc130, m=m@entry=0x7ffff7370140 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fffffffc4c0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:4052 #22 0x00007ffff6ef0db4 in QAbstractButton::clicked(bool) (this=this@entry=0x7cc130, _t1=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/redhat-linux-build/src/widgets/Widgets_autogen/include/moc_qabstractbutton.cpp:408 #23 0x00007ffff6ef103f in QAbstractButtonPrivate::emitClicked() (this=0x806960) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/widgets/qabstractbutton.cpp:379 #24 0x00007ffff6ef2750 in QAbstractButtonPrivate::click() (this=0x806960) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/widgets/qabstractbutton.cpp:372 #25 0x00007ffff6ef2958 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) (this=0x7cc130, e=0x7fffffffcb30) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/widgets/qabstractbutton.cpp:974 #26 0x00007ffff6e1cdd0 in QWidget::event(QEvent*) (this=0x7cc130, event=0x7fffffffcb30) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qwidget.cpp:9317 #27 0x00007ffff6dc0af8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x4272a0, receiver=receiver@entry=0x7cc130, e=e@entry=0x7fffffffcb30) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:3287 #28 0x00007ffff6dcab5e in QApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x7cc130, e=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:2774 #29 0x00007ffff477cdb8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7cc130, event=0x7fffffffcb30) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1118 #30 0x00007ffff477cfcd in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1550 #31 0x00007ffff6dc961e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) (receiver=receiver@entry=0x7cc130, event=event@entry=0x7fffffffcb30, alienWidget=0x7cc130, nativeWidget=0x858020, buttonDown=buttonDown@entry=0x7ffff73b2830 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:2358 #32 0x00007ffff6e2ff46 in QWidgetWindow::handleMouseEvent(QMouseEvent*) (this=0x1742d70, event=event@entry=0x7fffffffcdf0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qwidgetwindow.cpp:623 #33 0x00007ffff6e32e20 in QWidgetWindow::event(QEvent*) (this=0x1742d70, event=0x7fffffffcdf0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qwidgetwindow.cpp:241 #34 0x00007ffff6dc0af8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x1742d70, e=0x7fffffffcdf0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:3287 #35 0x00007ffff477cdb8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x1742d70, event=0x7fffffffcdf0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1118 #36 0x00007ffff477cfcd in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) --Type <RET> for more, q to quit, c to continue without paging-- at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1550 #37 0x00007ffff5209ad7 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (e=0x7fffd4003270) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/gui/kernel/qguiapplication.cpp:2299 #38 0x00007ffff5263aac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/gui/kernel/qwindowsysteminterface.cpp:1094 #39 0x00007ffff5740534 in userEventSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/gui/platform/unix/qeventdispatcher_glib.cpp:38 #40 0x00007ffff3b2a4fc in g_main_dispatch (context=0x7fffdc000f10) at ../glib/gmain.c:3460 #41 g_main_context_dispatch (context=0x7fffdc000f10) at ../glib/gmain.c:4200 #42 0x00007ffff3b886b8 in g_main_context_iterate.isra.0 (context=0x7fffdc000f10, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4276 #43 0x00007ffff3b27b83 in g_main_context_iteration (context=0x7fffdc000f10, may_block=1) at ../glib/gmain.c:4343 #44 0x00007ffff4a2092f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x4561a0, flags=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393 #45 0x00007ffff47899f3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffd210, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/global/qflags.h:34 #46 0x00007ffff478569d in QCoreApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/global/qflags.h:74 #47 0x00007ffff51f917d in QGuiApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/gui/kernel/qguiapplication.cpp:1908 #48 0x00007ffff6dc0a69 in QApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:2566 #49 0x000000000040e94f in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/nico/kde6/src/systemsettings/app/main.cpp:185 SOFTWARE/OS VERSIONS KDE Plasma Version: master KDE Frameworks Version: master Qt Version: 6.5.2