<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/123494/">https://git.reviewboard.kde.org/r/123494/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On April 25th, 2015, 10:27 a.m. UTC, <b>David Edmundson</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Ship it * 1000</p></pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Wait. How can this make any difference?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">DBus slots all happen in the main thread's event loop, which means we must have finished all this function before that.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The only way this could change the behaviour is if something in new DesktopView() is calling creating a new event loop or calling qApp->processEvents()</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">do you still have the entire trace?</p></pre>
<br />










<p>- David</p>


<br />
<p>On April 25th, 2015, 3:56 a.m. UTC, Bhushan Shah wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for Plasma and Marco Martin.</div>
<div>By Bhushan Shah.</div>


<p style="color: grey;"><i>Updated April 25, 2015, 3:56 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-workspace
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This avoids the crash situation where something have created the activity consumer earlier and currentActivityChanged signal is emitted before view is created.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">#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
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">works fine</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>shell/standaloneappcorona.cpp <span style="color: grey">(efa5c91)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/123494/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>