Bug 318806

Summary: Can't change plasma-desktop background (without crashing)
Product: [Unmaintained] plasma4 Reporter: Rex Dieter <rdieter>
Component: wallpaper-imageAssignee: Paolo Capriotti <p.capriotti>
Status: RESOLVED FIXED    
Severity: crash CC: adaptee, cfeck, hein, kevin.kofler, plasma-bugs, skaturn
Priority: NOR    
Version: 4.10.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.10.3
Sentry Crash Report:

Description Rex Dieter 2013-04-24 15:06:09 UTC
Application: plasma-desktop (4.10.2)
KDE Platform Version: 4.10.2
Qt Version: 4.8.4
Operating System: Linux 3.8.8-202.fc18.x86_64 x86_64
Distribution: "Fedora release 18 (Spherical Cow)"

-- Information about the crash:
- What I was doing when the application crashed: 
Any attempt to change plasma-desktop background results in a crash

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma Desktop Shell (plasma-desktop), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fcb3bea1880 (LWP 32330))]

Thread 6 (Thread 0x7fcb2e475700 (LWP 32336)):
#0  0x0000003e1260b5e5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000038cff868c7 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x38d0294660 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00000038cff868f9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x0000003e12607d15 in start_thread () from /lib64/libpthread.so.0
#4  0x0000003e11af248d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fcaa589b700 (LWP 32338)):
#0  0x0000003e13e84dd1 in g_mutex_unlock (mutex=mutex@entry=0x7fcaa00009a0) at gthread-posix.c:229
#1  0x0000003e13e47824 in g_main_context_check (context=context@entry=0x7fcaa00009a0, max_priority=2147483647, fds=fds@entry=0x7fcaa0002bb0, n_fds=n_fds@entry=1) at gmain.c:3167
#2  0x0000003e13e47cc2 in g_main_context_iterate (context=context@entry=0x7fcaa00009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3287
#3  0x0000003e13e47e44 in g_main_context_iteration (context=0x7fcaa00009a0, may_block=1) at gmain.c:3351
#4  0x00000038c9fa5fa6 in QEventDispatcherGlib::processEvents (this=0x7fcaa00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00000038c9f765ef in QEventLoop::processEvents (this=this@entry=0x7fcaa589acd0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00000038c9f76878 in QEventLoop::exec (this=0x7fcaa589acd0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00000038c9e78980 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#8  0x00000038c9f56e1f in QInotifyFileSystemWatcherEngine::run (this=0x188d3c0) at io/qfilesystemwatcher_inotify.cpp:256
#9  0x00000038c9e7b95c in QThreadPrivate::start (arg=0x188d3c0) at thread/qthread_unix.cpp:338
#10 0x0000003e12607d15 in start_thread () from /lib64/libpthread.so.0
#11 0x0000003e11af248d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fca95a2c700 (LWP 32342)):
#0  0x0000003e12609c12 in pthread_mutex_lock () from /lib64/libpthread.so.0
#1  0x0000003e13e84da1 in g_mutex_lock (mutex=<optimized out>) at gthread-posix.c:210
#2  0x0000003e13e47c25 in g_main_context_iterate (context=context@entry=0x7fca900009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3257
#3  0x0000003e13e47e44 in g_main_context_iteration (context=0x7fca900009a0, may_block=1) at gmain.c:3351
#4  0x00000038c9fa5fa6 in QEventDispatcherGlib::processEvents (this=0x7fca900008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00000038c9f765ef in QEventLoop::processEvents (this=this@entry=0x7fca95a2bcc0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00000038c9f76878 in QEventLoop::exec (this=0x7fca95a2bcc0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00000038c9e78980 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#8  0x00007fca961412d5 in KCupsConnection::run() () from /lib64/libkcupslib.so
#9  0x00000038c9e7b95c in QThreadPrivate::start (arg=0x2c9e270) at thread/qthread_unix.cpp:338
#10 0x0000003e12607d15 in start_thread () from /lib64/libpthread.so.0
#11 0x0000003e11af248d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fcaab63b700 (LWP 32346)):
#0  0x0000003e1260b952 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000038c9e7be17 in wait (time=30000, this=0x2e41640) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2e41d78, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00000038c9e6f69f in QThreadPoolThread::run (this=0x1052f10) at concurrent/qthreadpool.cpp:141
#4  0x00000038c9e7b95c in QThreadPrivate::start (arg=0x1052f10) at thread/qthread_unix.cpp:338
#5  0x0000003e12607d15 in start_thread () from /lib64/libpthread.so.0
#6  0x0000003e11af248d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fcaa8ed6700 (LWP 32350)):
#0  0x0000003e1260b952 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000038c9e7be17 in wait (time=30000, this=0x2e41640) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2e41d78, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00000038c9e6f69f in QThreadPoolThread::run (this=0x394c3f0) at concurrent/qthreadpool.cpp:141
#4  0x00000038c9e7b95c in QThreadPrivate::start (arg=0x394c3f0) at thread/qthread_unix.cpp:338
#5  0x0000003e12607d15 in start_thread () from /lib64/libpthread.so.0
#6  0x0000003e11af248d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fcb3bea1880 (LWP 32330)):
[KCrash Handler]
#6  QAbstractButton::isChecked (this=0x7865747865746e69) at widgets/qabstractbutton.cpp:774
#7  0x0000003d93b17e7c in Plasma::AppletPrivate::configDialogFinished (this=0xf7e210) at /usr/src/debug/kdelibs-4.10.2/plasma/applet.cpp:2150
#8  0x0000003d93b1bcbe in qt_static_metacall (_c=QMetaObject::InvokeMetaMethod, _a=<optimized out>, _id=<optimized out>, _o=<optimized out>) at /usr/src/debug/kdelibs-4.10.2/x86_64-redhat-linux-gnu/plasma/applet.moc:198
#9  Plasma::Applet::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/kdelibs-4.10.2/x86_64-redhat-linux-gnu/plasma/applet.moc:153
#10 0x00000038c9f8cd6f in QMetaObject::activate (sender=0xf72cc0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3539
#11 0x0000003636ba7cd7 in KDialog::slotButtonClicked (this=0xf72cc0, button=8) at /usr/src/debug/kdelibs-4.10.2/kdeui/dialogs/kdialog.cpp:888
#12 0x0000003636ba8214 in qt_static_metacall (_c=QMetaObject::InvokeMetaMethod, _a=<optimized out>, _id=<optimized out>, _o=<optimized out>) at /usr/src/debug/kdelibs-4.10.2/x86_64-redhat-linux-gnu/kdeui/kdialog.moc:166
#13 KDialog::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/kdelibs-4.10.2/x86_64-redhat-linux-gnu/kdeui/kdialog.moc:126
#14 0x00000038c9f8cd6f in QMetaObject::activate (sender=0x38aaf60, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff1eda89d0) at kernel/qobject.cpp:3539
#15 0x00000038c9f92d8e in QSignalMapper::mapped (this=this@entry=0x38aaf60, _t1=8) at .moc/release-shared/moc_qsignalmapper.cpp:114
#16 0x00000038c9f92f95 in QSignalMapper::map (this=0x38aaf60, sender=0x3a0a730) at kernel/qsignalmapper.cpp:266
#17 0x00000038c9f8cd6f in QMetaObject::activate (sender=0x3a0a730, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff1eda8b60) at kernel/qobject.cpp:3539
#18 0x00000038cac2f062 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:219
#19 0x00000038ca983c8e in QAbstractButtonPrivate::emitClicked (this=this@entry=0x381c230) at widgets/qabstractbutton.cpp:548
#20 0x00000038ca984290 in QAbstractButtonPrivate::click (this=this@entry=0x381c230) at widgets/qabstractbutton.cpp:541
#21 0x00000038ca9844fc in QAbstractButton::mouseReleaseEvent (this=0x3a0a730, e=0x7fff1eda9400) at widgets/qabstractbutton.cpp:1123
#22 0x00000038ca619f49 in QWidget::event (this=0x3a0a730, event=0x7fff1eda9400) at kernel/qwidget.cpp:8375
#23 0x00000038ca5ca5cc in QApplicationPrivate::notify_helper (this=0xe15ad0, receiver=0x3a0a730, e=0x7fff1eda9400) at kernel/qapplication.cpp:4562
#24 0x00000038ca5cf2ab in QApplication::notify (this=<optimized out>, receiver=0x3a0a730, e=0x7fff1eda9400) at kernel/qapplication.cpp:4105
#25 0x0000003636c46f16 in KApplication::notify (this=0xdff3b0, receiver=0x3a0a730, event=0x7fff1eda9400) at /usr/src/debug/kdelibs-4.10.2/kdeui/kernel/kapplication.cpp:311
#26 0x00000038c9f7793e in QCoreApplication::notifyInternal (this=0xdff3b0, receiver=0x3a0a730, event=0x7fff1eda9400) at kernel/qcoreapplication.cpp:949
#27 0x00000038ca5cb40b in QApplicationPrivate::sendMouseEvent (receiver=0x3a0a730, event=0x7fff1eda9400, alienWidget=0x3a0a730, nativeWidget=0xf72cc0, buttonDown=0x38cb09e268 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at ../../src/corelib/kernel/qcoreapplication.h:231
#28 0x00000038ca645b74 in QETWidget::translateMouseEvent (this=0xf72cc0, event=<optimized out>) at kernel/qapplication_x11.cpp:4537
#29 0x00000038ca644901 in QApplication::x11ProcessEvent (this=0xdff3b0, event=0x7fff1eda9b70) at kernel/qapplication_x11.cpp:3660
#30 0x00000038ca66aa5c in x11EventSourceDispatch (s=s@entry=0xe0e960, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#31 0x0000003e13e47a55 in g_main_dispatch (context=0xe0ec50) at gmain.c:2715
#32 g_main_context_dispatch (context=context@entry=0xe0ec50) at gmain.c:3219
#33 0x0000003e13e47d88 in g_main_context_iterate (context=context@entry=0xe0ec50, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3290
#34 0x0000003e13e47e44 in g_main_context_iteration (context=0xe0ec50, may_block=1) at gmain.c:3351
#35 0x00000038c9fa5f86 in QEventDispatcherGlib::processEvents (this=0xd6a240, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#36 0x00000038ca66a73e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#37 0x00000038c9f765ef in QEventLoop::processEvents (this=this@entry=0x7fff1eda9f40, flags=...) at kernel/qeventloop.cpp:149
#38 0x00000038c9f76878 in QEventLoop::exec (this=0x7fff1eda9f40, flags=...) at kernel/qeventloop.cpp:204
#39 0x00000038c9f7b708 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#40 0x0000003f7a83d611 in kdemain (argc=1, argv=0x7fff1edaa238) at /usr/src/debug/kde-workspace-4.10.2/plasma/desktop/shell/main.cpp:126
#41 0x0000003e11a21a05 in __libc_start_main () from /lib64/libc.so.6
#42 0x0000000000400971 in _start ()

Possible duplicates by query: bug 318528.

Reported using DrKonqi
Comment 1 Jekyll Wu 2013-04-24 15:21:28 UTC
*** Bug 318528 has been marked as a duplicate of this bug. ***
Comment 2 Rex Dieter 2013-04-24 16:19:11 UTC
I've confirmed it appears this KDE/4.10 branch commit is the (primary) culprit,
https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/94e1d5c2bb5b60cee02a59c059c6acbf5941f09c

If I revert this, the crash reported here goes away.


Sho, any ideas what's going on?  (I did cherry pick only some post v4.10.2 kde-workspace commits, could this be dependent on something else I perhaps missed?)
Comment 3 Eike Hein 2013-04-24 17:16:19 UTC
My commit exposed a latent bug in Plasma::Applet - due to the scheme fix KConfigDialog::exists(configDialogId()) now returns true in that block in Plasma::AppletPrivate::configDialogFinished() and then it attempts to access stuff in the plasmoid sharing config UI which doesn't exist in the containment config dialog. The code has to be fixed up to not assume that UI is present.
Comment 4 Eike Hein 2013-04-24 18:22:09 UTC
Fix attempt is being tracked in https://git.reviewboard.kde.org/r/110158/.
Comment 5 Eike Hein 2013-04-24 20:42:08 UTC
Git commit 1babeb4689f6b3fa990250571448eb840048d598 by Eike Hein.
Committed on 24/04/2013 at 22:37.
Pushed by hein into branch 'KDE/4.10'.

Fix crash due to uninitialized member in the containment case.

Plasma::Applet initialized the (uic-generated) publishCheckbox
only in showConfigurationInterface(), but this method isn't run
for our desktop containments; showing the config dialog is han-
dled through a signal connected to a slot in the shell implemen-
tation instead. This caused Applet::configDialogFinished() to
crash when checking for the checkbox.

This was unearthed by 94e1d5c; previously configDialogFinished()
never reached the problematic check because an earlier config
dialog id comparison would fail.
REVIEW:110158

M  +2    -0    plasma/applet.cpp

http://commits.kde.org/kdelibs/1babeb4689f6b3fa990250571448eb840048d598