[Gammaray-commits] [KDAB/GammaRay] 40003e: ObjectListModel: Fix assert in objectRemovedMainTh...

Kevin Funk kfunk at kde.org
Tue Mar 18 11:48:45 CET 2014


  Branch: refs/heads/2.0
  Home:   https://github.com/KDAB/GammaRay
  Commit: 40003e78b797939b136b9b2d8581f69071af3c63
      https://github.com/KDAB/GammaRay/commit/40003e78b797939b136b9b2d8581f69071af3c63
  Author: Kevin Funk <kevin.funk at kdab.com>
  Date:   2014-03-12 (Wed, 12 Mar 2014)

  Changed paths:
    M core/objectlistmodel.cpp

  Log Message:
  -----------
  ObjectListModel: Fix assert in objectRemovedMainThread

It's not safe to assume that m_invalidatedObjects does not contain obj in
case objectRemovedMainThread is called from the main thread.

We can end up in this order of calls:
- objectRemoved from a thread other than the main thread
  - inserts obj into m_invalidatedObjects
  - queues a call to objectRemovedMainThread
- objectAdded with the same obj-pointer
- objectRemoved from the main thread
  - calls objectRemovedMainThread directly
  - m_invalidatedObjects still contains obj.
=> Assertion triggered

We fix this by always trying to remove obj from m_invalidatedObjects in
objectRemovedMainThread.


  Commit: bc0aca9f601b7e525f1b25020226f3dbcacec8c3
      https://github.com/KDAB/GammaRay/commit/bc0aca9f601b7e525f1b25020226f3dbcacec8c3
  Author: Kevin Funk <kfunk at kde.org>
  Date:   2014-03-18 (Tue, 18 Mar 2014)

  Changed paths:
    M core/objectlistmodel.cpp

  Log Message:
  -----------
  Merge pull request #73 from krf/fix-multithreaded

ObjectListModel: Fix assert in objectRemovedMainThread


Compare: https://github.com/KDAB/GammaRay/compare/d92d8f55e8e2...bc0aca9f601b


More information about the Gammaray-commits mailing list