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


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Amarok.</div>
<div>By Wolfgang Lorenz.</div>


<p style="color: grey;"><i>Updated Feb. 25, 2011, 1:16 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;">I think the mentioned crashes occurred because the running queries weren&#39;t aborted. (Fixed)</pre>
  </td>
 </tr>
</table>


<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;">patch for https://bugs.kde.org/show_bug.cgi?id=233170

When a query is started the Collections::QueryMaker* is stored in
    QHash&lt;CollectionTreeItem*, Collections::QueryMaker*&gt; runningQueries.

Now, when CollectionTreeItemModelBase::populateChildren deletes items
    CollectionTreeItemModelBase::itemAboutToBeDeleted
is called, which in turn stops, disconnects and deletes the queryMaker associated with the item.

The problem occurs, if there is more than one queryMaker for the item, as will happen, when
    CollectionTreeItemModelBase::handleCompilations
is called. In this case itemAboutToBeDeleted deletes only one queryMaker. The other one finishes normally, calls
    CollectionTreeItemModelBase::queryDone,
which in turn calls 
    CollectionTreeItem::row
of a deleted item and Amarok crashes with a segfault.

The patch changes the runningQueries buffer to QMultiHash. So all queryMakers are kept and itemAboutToBeDeleted can stop them all.</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;">Sometimes Amarok still crashed, when entering a search. Unfortunately, the backtrace was always empty in these cases. I don&#39;t know why. This could be another bug.</pre>
  </td>
 </tr>
</table>



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


 <a href="https://bugs.kde.org/show_bug.cgi?id=233170">233170</a>


</div>


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

 <li>src/browsers/CollectionTreeItemModelBase.h <span style="color: grey">(df260d6)</span></li>

 <li>src/browsers/CollectionTreeItemModelBase.cpp <span style="color: grey">(9e5a50d)</span></li>

</ul>

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




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




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