Split from https://bugs.kde.org/show_bug.cgi?id=426047 # 26 - What I was doing when the application crashed: Configuring global shotcuts - Unusual behavior I noticed: I saved the shortcuts with apply button but they didn't actually works, also all shorcuts are unconfigured, I can't do an Alt + Tab - Custom settings of the application: -- Backtrace (Reduced): #4 0x00007fcd25320504 in KGlobalShortcutInfo::componentUniqueName() const () from /lib64/libKF5GlobalAccel.so.5 #6 0x00007fccf0cad232 in QtPrivate::QFunctorSlotObject<GlobalAccelModel::addApplication(QString const&, QString const&)::{lambda()#2}::operator()() const::{lambda()#2}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) () from /usr/lib64/qt5/plugins/kcms/kcm_keys.so #7 0x00007fcd2670b386 in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt5Core.so.5 #8 0x00007fcd254ae383 in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) () from /lib64/libQt5DBus.so.5 #9 0x00007fcd26703d1e in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5 ----- Reading the code it's clear what's wrong connect(infoWatcher, &QDBusPendingCallWatcher::finished, this, [=] { A reply can be valid but empty. At which point calling info[0].componentUniqueName(); obviously crashes. I don't know if it's safe to just guard in the lambda.
I think guarding should be ok but seems underlying there is something weird happening. The user picks an application from the dialog, which should have a valid desktopfile, which means we should have at least on valid action in there (launching the applciation)
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/307
Git commit ea08472b0fc87001ef700e5743342390103dff53 by David Redondo. Committed on 18/01/2021 at 14:48. Pushed by davidre into branch 'master'. Guard against an empty response when adding Applications One would expect to always have at least one action here, namely the launch action corresponding to the Exec entry. But we have a crash where it looks like that we got an empty list, guarding against that does no harm. M +5 -1 kcms/keys/globalaccelmodel.cpp https://invent.kde.org/plasma/plasma-desktop/commit/ea08472b0fc87001ef700e5743342390103dff53