[Marble-devel] Review Request: Add a clear() method to AbstractDataPluginModel, need help avoiding crashes due to concurrent accesses

Guillaume Martres smarter at ubuntu.com
Fri Aug 19 17:00:03 UTC 2011


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

(Updated Aug. 19, 2011, 5 p.m.)


Review request for Marble, Bastian Holst and Thibaut Gridel.


Summary (updated)
-------

For the satellites plugin I need a way to remove every item from the model each time the datasets are downloaded(every few hours, and each time the user changes the settings in the config dialog).
This patch shows a buggy way to do so. It leads to a crash when clear() is called concurrently with AbstractDataPluginModel::items(), for example because of a paintEvent(), see the backtrace at http://paste.kde.org/111817/
I can't seem to find a good way to fix that without introducing locking. Maybe a refactoring/rewrite of AbstractDataPluginModel is needed?


Diffs
-----

  src/lib/AbstractDataPluginModel.h 1e75ba0 
  src/lib/AbstractDataPluginModel.cpp abf77e2 

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


Testing
-------


Thanks,

Guillaume

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20110819/6f00033d/attachment.html>


More information about the Marble-devel mailing list