Review Request: Crash when browsing a category [@ CollectionTreeItem::row]

Wolfgang Lorenz wl-chmw at gmx.de
Fri Feb 25 14:16:38 CET 2011


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

(Updated Feb. 25, 2011, 1:16 p.m.)


Review request for Amarok.


Changes
-------

I think the mentioned crashes occurred because the running queries weren't aborted. (Fixed)


Summary
-------

patch for https://bugs.kde.org/show_bug.cgi?id=233170

When a query is started the Collections::QueryMaker* is stored in
    QHash<CollectionTreeItem*, Collections::QueryMaker*> 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.


This addresses bug 233170.
    https://bugs.kde.org/show_bug.cgi?id=233170


Diffs (updated)
-----

  src/browsers/CollectionTreeItemModelBase.h df260d6 
  src/browsers/CollectionTreeItemModelBase.cpp 9e5a50d 

Diff: http://git.reviewboard.kde.org/r/100723/diff


Testing
-------

Sometimes Amarok still crashed, when entering a search. Unfortunately, the backtrace was always empty in these cases. I don't know why. This could be another bug.


Thanks,

Wolfgang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20110225/d24b3d98/attachment.htm 


More information about the Amarok-devel mailing list