Summary: | systemsettings5 reliably crashes when opening the power kcm via the overview in icon view mode | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Christian (Fuchs) <kde> |
Component: | iconview | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | hornetster, nate, nicolas.fella, qydwhotmail |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.23.0 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/powerdevil/commit/575ae1a1ef14e8a0c5b8382a283a8776dbbc3d08 | Version Fixed In: | 5.23.5 |
Attachments: | New crash information added by DrKonqi |
Description
Christian (Fuchs)
2021-10-16 22:34:50 UTC
Can reproduce only in Icon view, indeed. Strange. PowerDevil::BundledActions::PowerProfileConfig::buildUi()::{lambda(QDBusPendingCallWatcher*)#5}::operator()(QDBusPendingCallWatcher*) const () from /usr/lib64/qt5/plugins/powerdevilpowerprofileaction_config.so #6 0x00007f8f249e63a9 in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt5Core.so.5 Created attachment 144739 [details]
New crash information added by DrKonqi
systemsettings (5.23.80) using Qt 5.15.2
- What I was doing when the application crashed:
Set view mode to Icon mode, and open Power Management.
-- Backtrace (Reduced):
#6 0x00007fd921c8838a in QComboBox::clear() (this=0x7fd9257a5200) at widgets/qcombobox.cpp:3049
#7 0x00007fd8e35f0714 in operator()(QDBusPendingCallWatcher*) const (__closure=0x7fd923d30770, watcher=<optimized out>) at /usr/src/debug/powerdevil5-5.23.80git.20211219T014229~a4208c0c-ku.29.2.x86_64/daemon/actions/bundled/powerprofileconfig.cpp:83
#8 0x00007fd920f01043 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc55c98cf0, r=0x7fd90c01af20, this=0x7fd923d30760) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#9 doActivate<false>(QObject*, int, void**) (sender=0x7fd9249a57d0, signal_index=3, argv=0x7ffc55c98cf0) at kernel/qobject.cpp:3886
[...]
#11 0x00007fd92010bfff in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) (this=<optimized out>, _t1=<optimized out>) at .moc/moc_qdbuspendingcall.cpp:158
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/75 A possibly relevant merge request was started @ https://invent.kde.org/plasma/systemsettings/-/merge_requests/108 A possibly relevant merge request was started @ https://invent.kde.org/plasma/systemsettings/-/merge_requests/109 Git commit 9b8a9dfda3d3d8df167336ce3f029af8bf0401f5 by Fushan Wen. Committed on 23/12/2021 at 04:54. Pushed by fusionfuture into branch 'master'. powerprofileconfig: Use m_profileCombo as the watcher's parent `m_profileCombo` could be an invalid pointer, because when clicking an item, `QAbstractItemView::clicked` and `QAbstractItemView::activated` in systemsettings both will be emitted, and `IconMode::changeModule` will be called twice, and `closeModules()` will free `m_profileCombo` in the second call, which will crash systemsettings. To fix the crash, set the watcher's parent to `m_profileCombo`, so when `m_profileCombo` is destroyed, the watcher is also destroyed and the connection is disconnected to prevent modification to the old `m_profileCombo`. M +1 -1 daemon/actions/bundled/powerprofileconfig.cpp https://invent.kde.org/plasma/powerdevil/commit/9b8a9dfda3d3d8df167336ce3f029af8bf0401f5 Git commit 575ae1a1ef14e8a0c5b8382a283a8776dbbc3d08 by Fushan Wen. Committed on 23/12/2021 at 09:11. Pushed by fusionfuture into branch 'Plasma/5.23'. powerprofileconfig: Use m_profileCombo as the watcher's parent `m_profileCombo` could be an invalid pointer, because when clicking an item, `QAbstractItemView::clicked` and `QAbstractItemView::activated` in systemsettings both will be emitted, and `IconMode::changeModule` will be called twice, and `closeModules()` will free `m_profileCombo` in the second call, which will crash systemsettings. To fix the crash, set the watcher's parent to `m_profileCombo`, so when `m_profileCombo` is destroyed, the watcher is also destroyed and the connection is disconnected to prevent modification to the old `m_profileCombo`. (cherry picked from commit 9b8a9dfda3d3d8df167336ce3f029af8bf0401f5) M +1 -1 daemon/actions/bundled/powerprofileconfig.cpp https://invent.kde.org/plasma/powerdevil/commit/575ae1a1ef14e8a0c5b8382a283a8776dbbc3d08 *** Bug 448104 has been marked as a duplicate of this bug. *** @Fushan is there anything left to do here or can this be closed? Sorry I use the wrong CCBUG. I think it can be closed, though the MR in systemsettings is not merged, the crash was fixed. Git commit 0e02f4a552018d65272b34d5bb05fdf8d81372f2 by Fushan Wen. Committed on 08/01/2022 at 13:48. Pushed by ngraham into branch 'master'. Use styleHint to enable opening an item on single click Connecting both clicked and activated signals causes unnecessary reloading of KCMs when clicking files or folders is set to open them, and will crash systemsettings when opening Powerdevil settings. This commit uses QProxyStyle to set style hint in CategorizedView. `QStyle::SH_ItemView_ActivateItemOnSingleClick` now always returns 1 regardless of the behavior settings, so an item will always be opened on single click. M +1 -0 icons/CategorizedView.cpp M +23 -0 icons/CategorizedView.h M +0 -1 icons/IconMode.cpp https://invent.kde.org/plasma/systemsettings/commit/0e02f4a552018d65272b34d5bb05fdf8d81372f2 |