Skip to content

qt: fix assertion in asyncFetchMore when cache tries to recursively refer items

Pierre Lamot requested to merge chub/vlc:qt/rec-fetch-and-load-assert into master

The failling scenario is

  • Count&Load task issued (task n°1)
  • model need reset (thumbnail is updated for instance) => needReload = true
  • Count&Load task (n°1) is resolved
    • diff util insert/remove rows
    • Callback from model change ask to refer an item beyond the cache
      • refer issue a new 'fetch more' request (n°2) as m_countTask is 0
    • as needReload == true, cache is moved to oldCache, new count&load request is issued (n° 3)
  • task n°2 resolve, cache is null, assertion fails

by moving the m_countTask reset after the model update, we ensure that refer won't start a new request while the model is still propagating the update.

Merge request reports

Loading