PDA

View Full Version : [SOLVED] QFileSystemModel ASSERT error (disable SystemWatcher?)



Talei
6th May 2010, 21:19
Hello,
My application uses 2 treeView with displays QFileSystemModel. That gave me "live" update on the file system (actually particular directory), but sometimes (on random actually) situations my application hangs with fallowing message:

ASSERT: "indexNode" in file dialogs\qfilesystemmodel.cpp, line 239
I do file system modification, so file are deleted/added, and it seams that when I return from my worker thread, tree gets updated and I can see new content but only a few entries (i.e. 5 file names from 25) and then error occurs.
Can it be because of QSystemWatcher?

Work flow of my application is as fallows:
1. treview displays qfilesystem
2. worker thread manipulate files
3. at the end, when returning to main application, ASSERT error (on treeview updates)

Any suggestion?

EDIT: Solved
Just by pure luck I commented out stuff related to workerThread (stuff == I checked if thread is running, and if true changed values to terminate long operation) and if() condition gave me "strange" behaviour, to be honest I don't know ATM. why that was happening.