Bug 257213

Summary: Plasma crashes on start with empty activityrc file
Product: [Unmaintained] plasma4 Reporter: Christoph Feck <cfeck>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Christoph Feck 2010-11-18 05:32:36 UTC
Application: plasma-desktop (0.4)
KDE Platform Version: 4.5.76 (4.6 >= 20101111) (Compiled from sources)
Qt Version: 4.7.1
Operating System: Linux 2.6.34.7-0.5-desktop i686
Distribution: "openSUSE 11.3 (i586)"

-- Information about the crash:
- What I was doing when the application crashed:

I opened the Activity Manager, finding 3 Activities (I never added any). Trying to see what they are, I clicked on one. This resulted in a black screen, and plasma crashed. I even deleted the activityrc config file, but Plasma refuses to start since then. Alt+F2 still works, so I can at least launch apps :)

Using daily trunk.

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma Desktop Shell (kdeinit4), signal: Segmentation fault
[Current thread is 1 (Thread 0xb5796710 (LWP 10840))]

Thread 4 (Thread 0xaa468b70 (LWP 10843)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb6d41125 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:122
#2  0xb426c306 in WTF::TCMalloc_PageHeap::scavengerThread() () from /local/qt4/lib/libQtWebKit.so.4
#3  0xb426ba11 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /local/qt4/lib/libQtWebKit.so.4
#4  0xb6d3cb25 in start_thread (arg=0xaa468b70) at pthread_create.c:297
#5  0xb5ea546e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xa996cb70 (LWP 10850)):
#0  __pthread_mutex_lock (mutex=0x83a70a4) at pthread_mutex_lock.c:47
#1  0xb59767ea in g_main_context_acquire (context=0x83a70a0) at gmain.c:2354
#2  0xb5977ffd in g_main_context_iterate (context=0x83a70a0, block=1, dispatch=1, self=0x8396750) at gmain.c:2846
#3  0xb597876e in g_main_context_iteration (context=0x83a70a0, may_block=1) at gmain.c:2965
#4  0xb6f01904 in QEventDispatcherGlib::processEvents (this=0x8406ea8, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:424
#5  0xb6ecb015 in QEventLoop::processEvents (this=0xa996c298, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:149
#6  0xb6ecb159 in QEventLoop::exec (this=0xa996c298, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:201
#7  0xb6dc075c in QThread::exec (this=0x83a6be8) at /local/git/Qt/qt/src/corelib/thread/qthread.cpp:490
#8  0xb6eac674 in QInotifyFileSystemWatcherEngine::run (this=0x83a6be8) at /local/git/Qt/qt/src/corelib/io/qfilesystemwatcher_inotify.cpp:248
#9  0xb6dc2e90 in QThreadPrivate::start (arg=0x83a6be8) at /local/git/Qt/qt/src/corelib/thread/qthread_unix.cpp:315
#10 0xb6d3cb25 in start_thread (arg=0xa996cb70) at pthread_create.c:297
#11 0xb5ea546e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xa9151b70 (LWP 10869)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb6d41452 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:179
#2  0xb6dc41cf in QWaitConditionPrivate::wait (this=0x8394428, time=30000) at /local/git/Qt/qt/src/corelib/thread/qwaitcondition_unix.cpp:86
#3  0xb6dc3fed in QWaitCondition::wait (this=0x82f039c, mutex=0x82f0398, time=30000) at /local/git/Qt/qt/src/corelib/thread/qwaitcondition_unix.cpp:160
#4  0xb6db55ce in QThreadPoolThread::run (this=0x837c4e0) at /local/git/Qt/qt/src/corelib/concurrent/qthreadpool.cpp:140
#5  0xb6dc2e90 in QThreadPrivate::start (arg=0x837c4e0) at /local/git/Qt/qt/src/corelib/thread/qthread_unix.cpp:315
#6  0xb6d3cb25 in start_thread (arg=0xa9151b70) at pthread_create.c:297
#7  0xb5ea546e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb5796710 (LWP 10840)):
[KCrash Handler]
#7  0xb4b3ce3d in Plasma::Containment::context (this=0x0) at /local/svn/kde/trunk/KDE/kdelibs/plasma/containment.cpp:2008
#8  0xb1eb609f in Activity::insertContainment (this=0x87c9f78, containment=0x0, screen=0, desktop=0) at /local/svn/kde/trunk/KDE/kdebase/workspace/plasma/desktop/shell/activity.cpp:335
#9  0xb1eb5468 in Activity::addContainment (this=0x87c9f78, screen=0, desktop=0) at /local/svn/kde/trunk/KDE/kdebase/workspace/plasma/desktop/shell/activity.cpp:181
#10 0xb1eb5183 in Activity::containmentForScreen (this=0x87c9f78, screen=0, desktop=0) at /local/svn/kde/trunk/KDE/kdebase/workspace/plasma/desktop/shell/activity.cpp:156
#11 0xb1ec2165 in DesktopCorona::checkDesktop (this=0x8167840, activity=0x87c9f78, signalWhenExists=false, screen=0, desktop=-1)
    at /local/svn/kde/trunk/KDE/kdebase/workspace/plasma/desktop/shell/desktopcorona.cpp:226
#12 0xb1ec2022 in DesktopCorona::checkScreen (this=0x8167840, screen=0, signalWhenExists=false) at /local/svn/kde/trunk/KDE/kdebase/workspace/plasma/desktop/shell/desktopcorona.cpp:205
#13 0xb1ec1f3b in DesktopCorona::checkScreens (this=0x8167840, signalWhenExists=false) at /local/svn/kde/trunk/KDE/kdebase/workspace/plasma/desktop/shell/desktopcorona.cpp:178
#14 0xb1eea590 in PlasmaApp::corona (this=0x80e6558) at /local/svn/kde/trunk/KDE/kdebase/workspace/plasma/desktop/shell/plasmaapp.cpp:790
#15 0xb1ee7cd7 in PlasmaApp::setupDesktop (this=0x80e6558) at /local/svn/kde/trunk/KDE/kdebase/workspace/plasma/desktop/shell/plasmaapp.cpp:286
#16 0xb1eedddc in PlasmaApp::qt_metacall (this=0x80e6558, _c=QMetaObject::InvokeMetaMethod, _id=18, _a=0x815fa98) at /local/build/KDE/kdebase/workspace/plasma/desktop/shell/plasmaapp.moc:157
#17 0xb6ed4962 in QMetaObject::metacall (object=0x80e6558, cl=QMetaObject::InvokeMetaMethod, idx=45, argv=0x815fa98) at /local/git/Qt/qt/src/corelib/kernel/qmetaobject.cpp:237
#18 0xb6ee29c1 in QMetaCallEvent::placeMetaCall (this=0x8153168, object=0x80e6558) at /local/git/Qt/qt/src/corelib/kernel/qobject.cpp:535
#19 0xb6ee3a97 in QObject::event (this=0x80e6558, e=0x8153168) at /local/git/Qt/qt/src/corelib/kernel/qobject.cpp:1217
#20 0xb6eceb51 in QCoreApplication::event (this=0x80e6558, e=0x8153168) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1560
#21 0xb624ed4f in QApplication::event (this=0x80e6558, e=0x8153168) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:2503
#22 0xb625422a in QApplicationPrivate::notify_helper (this=0x80ecf08, receiver=0x80e6558, e=0x8153168) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:4462
#23 0xb6251b26 in QApplication::notify (this=0x80e6558, receiver=0x80e6558, e=0x8153168) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:3862
#24 0xb76a921e in KApplication::notify (this=0x80e6558, receiver=0x80e6558, event=0x8153168) at /local/svn/kde/trunk/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#25 0xb6ecd2b7 in QCoreApplication::notifyInternal (this=0x80e6558, receiver=0x80e6558, event=0x8153168) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:731
#26 0xb6ed0bb9 in QCoreApplication::sendEvent (receiver=0x80e6558, event=0x8153168) at ../../include/QtCore/../../../../git/Qt/qt/src/corelib/kernel/qcoreapplication.h:215
#27 0xb6ece350 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x805bd60) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1372
#28 0xb6ece00d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1265
#29 0xb6f01fbc in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../../../git/Qt/qt/src/corelib/kernel/qcoreapplication.h:220
#30 0xb6f0111e in postEventSourceDispatch (s=0x80ef840) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:277
#31 0xb5977ca9 in g_main_dispatch (context=0x80ef098) at gmain.c:2267
#32 g_main_context_dispatch (context=0x80ef098) at gmain.c:2824
#33 0xb59784b0 in g_main_context_iterate (context=0x80ef098, block=1, dispatch=1, self=0x80ec660) at gmain.c:2902
#34 0xb597876e in g_main_context_iteration (context=0x80ef098, may_block=1) at gmain.c:2965
#35 0xb6f018e4 in QEventDispatcherGlib::processEvents (this=0x80ec560, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:422
#36 0xb631d068 in QGuiEventDispatcherGlib::processEvents (this=0x80ec560, flags=...) at /local/git/Qt/qt/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#37 0xb6ecb015 in QEventLoop::processEvents (this=0xbff11cac, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:149
#38 0xb6ecb159 in QEventLoop::exec (this=0xbff11cac, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:201
#39 0xb6ecd9a2 in QCoreApplication::exec () at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1008
#40 0xb6251758 in QApplication::exec () at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:3736
#41 0xb1ecf4db in kdemain (argc=1, argv=0x80a11c8) at /local/svn/kde/trunk/KDE/kdebase/workspace/plasma/desktop/shell/main.cpp:118
#42 0x0804de40 in launch (argc=1, _name=0x80ab2f4 "/local/kde4/bin/plasma-desktop", args=0x80ab313 "", cwd=0x0, envc=0, envs=0x80ab317 "", reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=
    0x80530bf "0") at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:730
#43 0x0804eed5 in handle_launcher_request (sock=8, who=0x8053358 "launcher") at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1222
#44 0x0804f616 in handle_requests (waitForPid=0) at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1415
#45 0x08050f10 in main (argc=4, argv=0xbff12474, envp=0xbff12488) at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1901

Reported using DrKonqi
Comment 1 Christoph Feck 2010-11-18 05:47:21 UTC
tail of output before the crash:

[...]
kde(29701)/libplasma Plasma::ContainmentPrivate::initApplets: !!{} STARTUP TIME 20928549 Applet "Adjustable Clock"
kde(29701)/libplasma Plasma::ContainmentPrivate::initApplets: !!{} STARTUP TIME 20928582 Applet "Icon"
kde(29701)/libplasma Plasma::Corona::addOffscreenWidget: widget is already an offscreen widget!
kde(29701)/libplasma Plasma::Corona::addOffscreenWidget: widget is already an offscreen widget!
kde(29701)/libplasma Plasma::ContainmentPrivate::initApplets: !!{} STARTUP TIME 20928651 Containment's applets initialized "Panel"
kde(29701)/plasma PlasmaApp::createView: !!{} STARTUP TIME 20928651 Plasma App createView() start (line: 863 )
kde(29701)/plasma PlasmaApp::createView: Containment name: "Panel" | type 1 | screen: 0 | desktop: -1 | geometry: QRectF(0,-30 1024x24) | zValue: 150
kde(29701)/libplasma Plasma::CoronaPrivate::importLayout: !!{} STARTUP TIME 20928651 Containment "Panel"
kde(29701)/libplasma Plasma::ContainmentPrivate::initApplets: !!{} STARTUP TIME 20928657 Containment's applets initialized "Desktop"
kde(29701)/plasma PlasmaApp::createView: !!{} STARTUP TIME 20928657 Plasma App createView() start (line: 863 )
kde(29701)/plasma PlasmaApp::createView: Containment name: "Desktop" | type 0 | screen: -1 | desktop: -1 | geometry: QRectF(1030,0 1024x768) | zValue: 0
kde(29701)/libplasma Plasma::CoronaPrivate::importLayout: !!{} STARTUP TIME 20928675 Containment "Desktop"
kde(29701)/libplasma Plasma::ContainmentPrivate::initApplets: !!{} STARTUP TIME 20928680 Containment's applets initialized "Desktop"
kde(29701)/plasma PlasmaApp::createView: !!{} STARTUP TIME 20928680 Plasma App createView() start (line: 863 )
kde(29701)/plasma PlasmaApp::createView: Containment name: "Desktop" | type 0 | screen: 0 | desktop: -1 | geometry: QRectF(0,0 1024x768) | zValue: 0
kde(29701)/libplasma Plasma::CoronaPrivate::importLayout: !!{} STARTUP TIME 20928699 Containment "Desktop"
kde(29701)/libplasma Plasma::Corona::setImmutability: setting immutability to 2
kde(29701)/plasma DesktopCorona::checkActivities: containments to start with 3
kde(29701)/plasma Activity::opened: open failed (bad file?). creating new containment
KCrash: Attempting to start /local/KDE4/trunk/bin/plasma-desktop from kdeinit
Comment 2 Christoph Feck 2010-11-18 05:48:45 UTC
Actually it has created the following activitymanagerrc file:

[activities]
90a25f2a-d1bb-4e8c-adc9-49f5e86b8d95=New Activity

[main]
currentActivity=90a25f2a-d1bb-4e8c-adc9-49f5e86b8d95

But it still crashes when starting plasma-desktop
Comment 3 Aaron J. Seigo 2010-11-18 18:39:52 UTC
SVN commit 1198503 by aseigo:

* merge addContainment into containmentForScreen
* use the new API in Plasma::Corona to allow creation of Containments for screens/desktops needing them regardless of immutability/kiosk
BUG:257213


 M  +19 -16    activity.cpp  
 M  +0 -1      activity.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1198503