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

Fix panic on shutdown #145

Merged
merged 2 commits into from
Dec 20, 2020
Merged

Fix panic on shutdown #145

merged 2 commits into from
Dec 20, 2020

Conversation

davidbyttow
Copy link
Owner

Upon termination, if libvips continues work in another thread (such as for reporting leaks) and logs, then a panic will occur if the log handler is a callback into Go. This is not an ideal fix because all processes/threads should terminate appropriately, but it's a stopgap to prevent the failure.

There may be a better way to handle this (via a signal callback or something else) to catch it just as Go is exiting and unset the handler.

Users are suggested to call Shutdown() upon exit to avoid this error.

@coveralls
Copy link

coveralls commented Dec 20, 2020

Coverage Status

Coverage decreased (-0.3%) to 81.181% when pulling cd7a815 on fix-#144 into 07ff0af on master.

@tonimelisma tonimelisma merged commit 502ca4e into master Dec 20, 2020
@tonimelisma tonimelisma deleted the fix-#144 branch December 20, 2020 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants