Steps to reproduce:
- Create a new zip archive
- Add a file
Ark starts an endless loop of new ListJobs. Libarchive is not affected.
Steps to reproduce:
Ark starts an endless loop of new ListJobs. Libarchive is not affected.
Actually, by commit 32832943
In Part::updateActions() we call Archive::encryptionType() which calls listIfNotListed(). Unfortunately in this situation m_hasBeenListed is still false and that's why we have this endless loop of ListJobs.
So the root cause is a race condition when ListJob emits result. Both ArchiveModel::slotLoadingFinished() and Archive::onListFinished() are connected to this signal. But the former triggers a chain of calls that ends up calling properties of Archive that are set by the concurrent Archive::onListFinished() method (including Archive::encryptionType())...
An ugly workaround (which fixes the endless loop) is setting m_hasBeenListed = true in Archive::list().
But this would be wrong (what if the returned job is never started?) and the race condition would be still there.
I don't really see an easy solution for this mess... :/