Bug 404609 - SDDM theme installation: both "Unable to install theme" error message and crash notification occur if you cancel the password dialog or take more than 30 seconds to enter your password
Summary: SDDM theme installation: both "Unable to install theme" error message and cra...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_sddm (show other bugs)
Version: 5.15.4
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-20 17:22 UTC by Patrick Silva
Modified: 2019-05-14 20:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.16.0


Attachments
"Unable to install theme" error message (295.60 KB, image/png)
2019-02-20 17:22 UTC, Patrick Silva
Details
crash notification (22.13 KB, image/png)
2019-02-20 17:22 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-02-20 17:22:24 UTC
Created attachment 118220 [details]
"Unable to install theme" error message

STEPS TO REPRODUCE
1. open Discover app store
2. Click "plasma addons" in the side bar, select "login screen" category
3. click "Install" button related to any SDDM theme (Discover asks for your password)
4. do NOT enter your password and wait for 30 seconds

OBSERVED RESULT
error message "Unable to install theme" shows up (see the screenshot), click "Ok" button to close it. Plasma shows crash notification related to sddmthemeinstaller (see the screenshot).

EXPECTED RESULT
no error message, no crash notification.

SOFTWARE/OS VERSIONS
SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.15.1
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 1 Patrick Silva 2019-02-20 17:22:51 UTC
Created attachment 118221 [details]
crash notification
Comment 2 Patrick Silva 2019-04-15 12:51:20 UTC
Both error message and crash notification also occur when the password dialog
is canceled.
Comment 3 Aleix Pol 2019-04-15 16:14:28 UTC
This is a crash in the sddmthemeinstaller from sddm-kcm.
Would you be able to provide a backtrace?
Comment 4 Patrick Silva 2019-04-15 18:56:17 UTC
backtrace generated on neon dev unstable

Application: sddmthemeinstaller (sddmthemeinstaller), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ff0872e5800 (LWP 6104))]

Thread 6 (Thread 0x7ff059a1a700 (LWP 6123)):
#0  0x00007ff05a6045d8 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so
#1  0x00007ff05a605798 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so
#2  0x00007ff05a605ab9 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so
#3  0x00007ff05a60633f in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so
#4  0x00007ff05a866108 in pa_mainloop_dispatch () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#5  0x00007ff05a8664de in pa_mainloop_iterate () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#6  0x00007ff05a866560 in pa_mainloop_run () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#7  0x00007ff05a8743c9 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#8  0x00007ff05a616318 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so
#9  0x00007ff08491e6db in start_thread (arg=0x7ff059a1a700) at pthread_create.c:463
#10 0x00007ff0851e988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7ff05bbee700 (LWP 6122)):
#0  0x00007ff0849249f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55d6a49e9378) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55d6a49e9328, cond=0x55d6a49e9350) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55d6a49e9350, mutex=0x55d6a49e9328) at pthread_cond_wait.c:655
#3  0x00007ff05d0cedcb in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007ff05d0ceaf7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007ff08491e6db in start_thread (arg=0x7ff05bbee700) at pthread_create.c:463
#6  0x00007ff0851e988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7ff071314700 (LWP 6107)):
#0  0x00007ff0851d80b4 in __GI___libc_read (fd=10, buf=0x7ff071313cd0, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27
#1  0x00007ff082565cd0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff082521027 in g_main_context_check () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff0825214e0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff0825218d2 in g_main_loop_run () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff0728d6026 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007ff082549105 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ff08491e6db in start_thread (arg=0x7ff071314700) at pthread_create.c:463
#8  0x00007ff0851e988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7ff071b15700 (LWP 6106)):
#0  0x00007ff0851dcbf9 in __GI___poll (fds=0x55d6a4a7f8f0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ff082521539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff08252164c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff082521691 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff082549105 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff08491e6db in start_thread (arg=0x7ff071b15700) at pthread_create.c:463
#6  0x00007ff0851e988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7ff073c37700 (LWP 6105)):
#0  __libc_enable_asynccancel () at ../sysdeps/unix/sysv/linux/x86_64/cancellation.S:67
#1  0x00007ff0851dcbe6 in __GI___poll (fds=0x7ff06c01b010, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#2  0x00007ff082521539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff08252164c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff08579615b in QEventDispatcherGlib::processEvents (this=0x7ff06c000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007ff08573764a in QEventLoop::exec (this=this@entry=0x7ff073c36d70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#6  0x00007ff08555f41a in QThread::exec (this=this@entry=0x7ff08435fd80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:531
#7  0x00007ff0840e8015 in QDBusConnectionManager::run (this=0x7ff08435fd80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#8  0x00007ff085560bc2 in QThreadPrivate::start (arg=0x7ff08435fd80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:361
#9  0x00007ff08491e6db in start_thread (arg=0x7ff073c37700) at pthread_create.c:463
#10 0x00007ff0851e988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ff0872e5800 (LWP 6104)):
[KCrash Handler]
#7  0x000055d6a2fad646 in main (argc=<optimized out>, argv=<optimized out>) at ./sddmthemeinstaller.cpp:76
Comment 5 Nate Graham 2019-05-14 20:37:10 UTC
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 406718
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