Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault with custom cleanup action while scanning a directory #31

Closed
Smile4ever opened this issue Oct 23, 2016 · 4 comments
Closed
Labels

Comments

@Smile4ever
Copy link
Contributor

I have configured a custom cleanup action, named "Open file in default application". The command for this is:
xdg-open %p

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.

@Smile4ever Smile4ever changed the title Segmentation fault Segmentation fault with custom cleanup action while scanning a directory Oct 23, 2016
@shundhammer
Copy link
Owner

Oops, that's right. At this point, cleanup actions need to be disabled since by default when the cleanup is finished, it will trigger a re-read of that branch, and that will clash with the scan already in progress.

@shundhammer
Copy link
Owner

shundhammer commented 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.

@Smile4ever
Copy link
Contributor Author

Setting the cleanup action Refresh Policy to No refresh makes the crash go away :)

@shundhammer
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants