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

Comments

Projects
None yet
2 participants
@Smile4ever
Contributor

Smile4ever commented Oct 23, 2016

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 from Segmentation fault to Segmentation fault with custom cleanup action while scanning a directory Oct 23, 2016

@shundhammer shundhammer added the bug label Oct 23, 2016

@shundhammer

This comment has been minimized.

Show comment
Hide comment
@shundhammer

shundhammer Oct 23, 2016

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.

Owner

shundhammer commented Oct 23, 2016

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

This comment has been minimized.

Show comment
Hide comment
@shundhammer

shundhammer Oct 23, 2016

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@Smile4ever

Smile4ever Oct 23, 2016

Contributor

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

Contributor

Smile4ever commented Oct 23, 2016

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

@shundhammer

This comment has been minimized.

Show comment
Hide comment
@shundhammer

shundhammer Oct 23, 2016

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.

Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment