Bug 386533 - System Settings Sporadically Crashes
Summary: System Settings Sporadically Crashes
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: 5.11.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2017-11-04 18:48 UTC by yo
Modified: 2018-03-22 11:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yo 2017-11-04 18:48:21 UTC
Application: systemsettings5 (5.11.2)

Qt Version: 5.9.1
Frameworks Version: 5.39.0
Operating System: Linux 4.13.0-16-lowlatency x86_64
Distribution: Ubuntu 17.10

-- Information about the crash:
- What I was doing when the application crashed:
-- I went from one settings pane to another
-- From Compositor to Network Settings

-- Backtrace:
Application: System Settings (systemsettings5), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f5adb4ddd80 (LWP 16825))]

Thread 9 (Thread 0x7f5a9cc28700 (LWP 16947)):
#0  0x00007f5ad715a901 in __GI___poll (fds=0x7f5a7c000b10, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f5ad1091169 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5ad109127c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5ad7a9a49b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f5ad7a3fe3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f5ad785f3ca in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f5a5a9f9717 in KCupsConnection::run() () at /usr/lib/x86_64-linux-gnu/libkcupslib.so
#7  0x00007f5ad786429d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f5ad2f4f7fc in start_thread (arg=0x7f5a9cc28700) at pthread_create.c:465
#9  0x00007f5ad7166b0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7f5a8add4700 (LWP 16904)):
#0  0x00007f5ad715a901 in __GI___poll (fds=0x7f5a740ec790, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f5ad1091169 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5ad109127c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5ad7a9a49b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f5ad7a3fe3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f5ad785f3ca in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f5ad5913f45 in  () at /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007f5ad786429d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f5ad2f4f7fc in start_thread (arg=0x7f5a8add4700) at pthread_create.c:465
#9  0x00007f5ad7166b0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7f5a9eacb700 (LWP 16851)):
#0  0x00007f5ad715a901 in __GI___poll (fds=0x563dce916d70, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f5ad1091169 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5ad1091502 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5aa004db26 in  () at /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f5ad10b8645 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f5ad2f4f7fc in start_thread (arg=0x7f5a9eacb700) at pthread_create.c:465
#6  0x00007f5ad7166b0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7f5a9f2cc700 (LWP 16850)):
#0  0x00007f5ad108e092 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f5ad10905db in g_main_context_prepare () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5ad109109b in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5ad109127c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f5ad10912c1 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f5ad10b8645 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f5ad2f4f7fc in start_thread (arg=0x7f5a9f2cc700) at pthread_create.c:465
#7  0x00007f5ad7166b0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f5aac06a700 (LWP 16831)):
#0  0x00007f5ad108e0bf in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f5ad10905db in g_main_context_prepare () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5ad109109b in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5ad109127c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f5ad7a9a49b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f5ad7a3fe3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f5ad785f3ca in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f5ad5913f45 in  () at /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#8  0x00007f5ad786429d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f5ad2f4f7fc in start_thread (arg=0x7f5aac06a700) at pthread_create.c:465
#10 0x00007f5ad7166b0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f5ab5b74700 (LWP 16830)):
#0  0x00007f5ad10d65b9 in g_mutex_lock () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f5ad109112e in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5ad109127c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5ad7a9a49b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f5ad7a3fe3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f5ad785f3ca in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f5ad5913f45 in  () at /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007f5ad786429d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f5ad2f4f7fc in start_thread (arg=0x7f5ab5b74700) at pthread_create.c:465
#9  0x00007f5ad7166b0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f5abe9cf700 (LWP 16827)):
#0  0x00007f5ad7155ffd in __GI___libc_read (fd=7, buf=0x7f5abe9cea60, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:26
#1  0x00007f5ad10d5280 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5ad1090c4b in g_main_context_check () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5ad1091110 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f5ad109127c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f5ad7a9a49b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f5ad7a3fe3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f5ad785f3ca in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f5ad7f16e45 in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007f5ad786429d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f5ad2f4f7fc in start_thread (arg=0x7f5abe9cf700) at pthread_create.c:465
#11 0x00007f5ad7166b0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f5ac7a35700 (LWP 16826)):
#0  0x00007f5ad715a901 in __GI___poll (fds=0x7f5ac7a34bb8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f5ad37c9747 in  () at /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f5ad37cb53a in xcb_wait_for_event () at /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f5ac9f8ff09 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f5ad786429d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f5ad2f4f7fc in start_thread (arg=0x7f5ac7a35700) at pthread_create.c:465
#6  0x00007f5ad7166b0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f5adb4ddd80 (LWP 16825)):
[KCrash Handler]
#6  0x00007f5ad91f2e37 in QStandardItemModel::clear() () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#7  0x00007f5a59ef648f in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/kcm_kamera.so
#8  0x00007f5a59ef7d98 in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/kcm_kamera.so
#9  0x00007f5ada513101 in  () at /usr/lib/x86_64-linux-gnu/libKF5ConfigWidgets.so.5
#10 0x00007f5ad7a71452 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f5ad967a4d3 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007f5ad963946c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007f5ad9640d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f5ad7a41de8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f5ad7a4455d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007f5ad7a9ae53 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f5ad1090fb7 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007f5ad10911f0 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007f5ad109127c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007f5ad7a9a47f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007f5ad7a3fe3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007f5ad7a48da4 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x0000563dc78ffdcf in  ()
#24 0x00007f5ad70731c1 in __libc_start_main (main=0x563dc78ff9d0, argc=1, argv=0x7ffe73ff5128, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe73ff5118) at ../csu/libc-start.c:308
#25 0x0000563dc78ffe5a in _start ()

Reported using DrKonqi
Comment 1 Christoph Feck 2017-11-23 23:08:54 UTC

*** This bug has been marked as a duplicate of bug 305061 ***
Comment 2 David Edmundson 2018-03-22 11:23:32 UTC
Git commit 5bc0682c3a1e80d1a35691896816f2475eb3905f by David Edmundson.
Committed on 22/03/2018 at 01:00.
Pushed by davidedmundson into branch 'master'.

Fix dangly pointer if gp_context_new fails

Summary:
m_deviceModel is typically created in the constructor, except in the
code path where m_context fails.

At this point we have a dangly pointer that the rest of the code uses
uncondiationally

Safer code path is to just create it earlier, we want this object in the
non-error case anyway

Test Plan:
Purely code reading
I've not got a fancy camera

Reviewers: #plasma

Differential Revision: https://phabricator.kde.org/D11564

M  +2    -1    kcontrol/kamera.cpp

https://commits.kde.org/kamera/5bc0682c3a1e80d1a35691896816f2475eb3905f