Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
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.
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.
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.