kded5 crashes on startup due to infinite recursion if the config key kdeglobals->[KDE]->LookAndFeelPackage contains a non-default value that is a desktop file that is not installed. Background: I ended up with a lookandfeelpackage name in this config key "org.openSUSE.desktop" referencing a desktop file in a branding package that I had uninstalled and replaced with the branding package containing the upstream desktop file org.kde.breeze.desktop. PlatformStatus::findLookAndFeelPackage(bool sendSignal) tries to locate the path of the configured look and feel file, and if this does not exist, clears the config key (line 90) and calls itself recursively so that it will pick up the default value Unfortunately, it clears the wrong config key, and thus recurses infinitely. Reproducible: Always
(gdb) bt 25 #0 qt_normalizePathSegments (name=..., allowUncPaths=allowUncPaths@entry=false) at io/qdir.cpp:2029 #1 0x00007ffff5536fdc in QDir::cleanPath (path=...) at io/qdir.cpp:2163 #2 0x00007ffff55baf3f in QFileSystemEngine::homePath () at io/qfilesystemengine_unix.cpp:686 #3 0x00007ffff5536929 in QDir::homePath () at io/qdir.cpp:1921 #4 0x00007ffff55c5d88 in QStandardPaths::writableLocation (type=type@entry=QStandardPaths::GenericDataLocation) at io/qstandardpaths_unix.cpp:93 #5 0x00007ffff55c6de1 in QStandardPaths::standardLocations (type=type@entry=QStandardPaths::GenericDataLocation) at io/qstandardpaths_unix.cpp:313 #6 0x00007ffff557be28 in QStandardPaths::locate (type=type@entry=QStandardPaths::GenericDataLocation, fileName=..., options=..., options@entry=...) at io/qstandardpaths.cpp:377 #7 0x00007fffdc855e07 in PlatformStatus::findLookAndFeelPackage (this=this@entry=0x7141d0, sendSignal=sendSignal@entry=false) at /usr/src/debug/plasma-framework-5.6.0/src/platformstatus/platformstatus.cpp:87 #8 0x00007fffdc85605e in PlatformStatus::findLookAndFeelPackage (this=this@entry=0x7141d0, sendSignal=sendSignal@entry=false) at /usr/src/debug/plasma-framework-5.6.0/src/platformstatus/platformstatus.cpp:91 #9 0x00007fffdc85605e in PlatformStatus::findLookAndFeelPackage (this=this@entry=0x7141d0, sendSignal=sendSignal@entry=false) at /usr/src/debug/plasma-framework-5.6.0/src/platformstatus/platformstatus.cpp:91 #10 0x00007fffdc85605e in PlatformStatus::findLookAndFeelPackage (this=this@entry=0x7141d0, sendSignal=sendSignal@entry=false) at /usr/src/debug/plasma-framework-5.6.0/src/platformstatus/platformstatus.cpp:91 #11 0x00007fffdc85605e in PlatformStatus::findLookAndFeelPackage (this=this@entry=0x7141d0, sendSignal=sendSignal@entry=false) at /usr/src/debug/plasma-framework-5.6.0/src/platformstatus/platformstatus.cpp:91 #12 0x00007fffdc85605e in PlatformStatus::findLookAndFeelPackage (this=this@entry=0x7141d0, sendSignal=sendSignal@entry=false) at /usr/src/debug/plasma-framework-5.6.0/src/platformstatus/platformstatus.cpp:91 #13 0x00007fffdc85605e in PlatformStatus::findLookAndFeelPackage (this=this@entry=0x7141d0, sendSignal=sendSignal@entry=false) at /usr/src/debug/plasma-framework-5.6.0/src/platformstatus/platformstatus.cpp:91
Git commit b931c000313be7950022aa86907401d9f77c5b4f by Sebastian Kügler. Committed on 29/01/2015 at 12:35. Pushed by sebas into branch 'master'. Fix fallback from invalid L&F packages The mechanism should have deleted the old key from the config if it was invalid and then try again in order to get the default. As we were deleting the wrong key (actually the value of the shell package key), this was turning into a recursive loop. Deleting the correct key obviously fixes this. Thanks Bille for reporting! Reviewed-by: Marco Martin M +1 -1 src/platformstatus/platformstatus.cpp http://commits.kde.org/plasma-framework/b931c000313be7950022aa86907401d9f77c5b4f