Join GitHub today
Segmentation fault with custom cleanup action while scanning a directory #31
I have configured a custom cleanup action, named "Open file in default application". The command for this is:
If I start a scan and during this scan, I execute the custom cleanup action on a file, qdirstat crashes and exits with an segmentation fault. I am able to reproduce this over and over again.
changed the title from
Segmentation fault with custom cleanup action while scanning a directory
Oct 23, 2016
BTW for that cleanup, you should clearly choose "Refresh Policy: No Refresh" in the options of that cleanup. That would prevent that crash (it needs to be fixed for the other cases, of course).
On second thought, it would be enough to disable those cleanups that have another refresh policy set. "No Refresh" won't do any harm - but the others do.
added a commit
Oct 23, 2016
Now disabling cleanups that have a refresh policy other than "No Refresh" while directory reading is in progress; otherwise the re-read when the cleanup action has finished clashes with the directory read alreay in progress.
Fixed with e68b081.
This is not an optimal solution, but a very pragmatic one; the optimal solution might queue updates and execute them after the main read is done.