SUMMARY The SDDM-KCM module does not work on my system. When trying to install themes, one of the error handling paths segfaults. STEPS TO REPRODUCE 1. Open 'System Settings' 2. Click 'Startup and Shutdown' 3. Click Login Screen (SDDM) 4. Click 'Get New Theme' 5. Click 'Install' for any theme. 6. Segfault! OBSERVED RESULT The utility 'sddmthemeinstaller' segfaults. ADDITIONAL INFORMATION I have some (unknown) configuration issue on my system that is taking me down an error path. This error path is segfaulting because it makes some invalid assumptions about job->errorString(). Based on a quick glance at source code in master, it looks like this issue is still around.
As per the documentation (https://api.kde.org/frameworks/kcoreaddons/html/classKJob.html#a975a15193b17d06e182f8fd55c5f0d8b) job->errorString() should only be called when job->error() != 0. A quick fix for my issues goes something like this: 75,76c75,81 < KMessageBox::sorry(nullptr, i18n("Unable to install theme"), job->errorString()); < qWarning() << job->error() << job->errorString(); --- > QString errMessage; > if (job->error() != 0) { > errMessage = job->errorString(); > } > > KMessageBox::sorry(nullptr, i18n("Unable to install theme"), errMessage); > qWarning() << job->error() << errMessage;
maybe duplicate of bug 404609
Thanks John, would you be interested in submitting your patch? If so please see https://community.kde.org/Infrastructure/Phabricator for instructions. I'm happy to help if you get stuck.
Hi Nate, Sure, I can submit a patch... I should have some free time this weekend. Thanks for the link! I will ping you if I have any troubles.
Patrick, I took a look at your backtrace... It looks like the same crash to me. Your crash should be fixed by this patch. Probably Duplicate.
Git commit 7df456404c26200ff6e36fc3d65aa39f2c6e7c3c by Nate Graham, on behalf of John Gehrig. Committed on 14/05/2019 at 20:37. Pushed by ngraham into branch 'master'. Crash in sddmthemeinstaller invalid use of errorString Summary: The destruction of KAuth::ExecuteJob* "job" is not handled properly when passed as a parameter to KMessageBox. An intermediate QString is created containing the error text. This value is passed into the KMessageBox and qWarning() so that the object "job" is no longer an input. The console error is now first so an error message displayed even in the event of a GUI crash. Related: bug 404609 FIXED-IN: 5.16.0 Test Plan: The patch has been applied to my system and the crash no longer occurs. Reviewers: ngraham, davidedmundson, #plasma Reviewed By: ngraham, davidedmundson, #plasma Subscribers: anthonyfieroni, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D20859 M +3 -2 sddmthemeinstaller.cpp https://commits.kde.org/sddm-kcm/7df456404c26200ff6e36fc3d65aa39f2c6e7c3c