Create DesktopView before connecting signals from the activity consumer

Review Request #123494 - Created April 25, 2015 and submitted

Information
Bhushan Shah
plasma-workspace
master, Plasma/5.3
Reviewers
plasma
ivan, mart

This avoids the crash situation where something have created the activity consumer earlier and currentActivityChanged signal is emitted before view is created.

#0  PlasmaQuick::View::setContainment (this=0x0, cont=0x16a9fc0) at /home/bshah/aur/plasma-framework-git/src/plasma-framework/src/plasmaquick/view.cpp:243
#1  0x0000000000462097 in StandaloneAppCorona::currentActivityChanged (this=0x7772a0, newActivity=...)
    at /home/bshah/aur/plasma-workspace-git/src/plasma-workspace/shell/standaloneappcorona.cpp:192
#2  0x00007ffff32383c9 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#3  0x00007ffff71f9763 in KActivities::Consumer::currentActivityChanged (this=0x741aa0, _t1=...) at /home/bshah/aur/kactivities-git/src/build/src/lib/core/moc_consumer.cpp:216
#4  0x00007ffff71f94dd in KActivities::Consumer::qt_static_metacall (_o=0x741aa0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffa570)
    at /home/bshah/aur/kactivities-git/src/build/src/lib/core/moc_consumer.cpp:103
#5  0x00007ffff32383c9 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#6  0x00007ffff71f91d6 in KActivities::ActivitiesCache::currentActivityChanged (this=0x77c900, _t1=...) at /home/bshah/aur/kactivities-git/src/build/src/lib/core/moc_activitiescache_p.cpp:353
#7  0x00007ffff71ee4f7 in KActivities::ActivitiesCache::setCurrentActivity (this=0x77c900, activity=...)
    at /home/bshah/aur/kactivities-git/src/kactivities/src/lib/core/activitiescache_p.cpp:297

I hit this crash when creating recent media backend for pmc. First backendsmodel is initalized which in turn loads the recentmedia backend and hence creates the activity consumer first. Afterwards when signal is connected it calls currentActivityChanged slot and fails to set containment on null view.

works fine

David Edmundson
Bhushan Shah
Marco Martin
Bhushan Shah
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 317421fd23eabd17d84320a31552c40ccd45a778 by Bhushan Shah to branch master.
Loading...