[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request 123494: Create DesktopView before connecting signals from the activity consumer
From:       "Bhushan Shah" <bhush94 () gmail ! com>
Date:       2015-04-25 14:09:24
Message-ID: 20150425140924.6982.80716 () mimi ! kde ! org
[Download RAW message or body]

--===============2310056833087123252==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123494/
-----------------------------------------------------------

(Updated April 25, 2015, 2:09 p.m.)


Status
------

This change has been marked as submitted.


Review request for Plasma, Ivan Čukić and Marco Martin.


Changes
-------

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


Repository: plasma-workspace


Description
-------

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.


Diffs
-----

  shell/standaloneappcorona.cpp efa5c91 

Diff: https://git.reviewboard.kde.org/r/123494/diff/


Testing
-------

works fine


Thanks,

Bhushan Shah


--===============2310056833087123252==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<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 />



<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been marked as \
submitted.</h1>  </td>
 </tr>
</table>
<br />


<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, Ivan Čukić and Marco Martin.</div>
<div>By Bhushan Shah.</div>


<p style="color: grey;"><i>Updated April 25, 2015, 2:09 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Submitted with commit \
317421fd23eabd17d84320a31552c40ccd45a778 by Bhushan Shah to branch master.</pre>  </td>
 </tr>
</table>







<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>


--===============2310056833087123252==--


[Attachment #3 (text/plain)]

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic