On mercredi 10 octobre 2018 22:11:12 CEST Albert Astals Cid wrote: > El dimecres, 10 d’octubre de 2018, a les 16:33:43 CEST, Jaime va escriure: > > Hello, > > > > About > > > > https://build.kde.org/job/Frameworks/job/kio/job/kf5-qt5%20SUSEQt5.10/429/ > > testReport/junit/(root)/TestSuite/kiowidgets_kdirmodeltest/> > > I'm only able to reproduce the crash 1/7 times I run ctest -j3, never if > > > > I run the test alone or run make test. > > FWIW I can reproduce the ASAN error quite easily with > > while [ true ]; do ASAN_OPTIONS=detect_leaks=0 ./bin/kdirmodeltest > testOverwriteFileWithDir; if [ $? -ne 0 ]; then break; fi; done > > it doesn't go more than two or three loops. > > > I've tried applying what worked for me in the 4th revision of > > > > https://phabricator.kde.org/D10742 to kdirmodel.cpp around line 600, but > > without success. > > > > Any idea how to fix it is welcomed. > > From what i see, the problem is that you're storing QModelIndexes and using > them later when the model has changed. > > This is not correct, you can only use a QModelIndex when you just got it or > when it's passed it to you, if you need to store it you need to use > QPersistentModelIndex. > > I don't understand much the test, but i think the attached patch is a good > fix, i.e. use the model indexes as soon as they happen and not store them. > Also makes the test pass "forever" here.
Looks good to me. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5