-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Close file pointer copy in the libtiff encoder if still open #6986
Close file pointer copy in the libtiff encoder if still open #6986
Conversation
Hi @fcarron - I opened #6985 (comment) 2 minutes before you posted this merge request. I've made the same changes and this seems to have resolved the issue in #6985 - in the test files I had provided as well. I can test this properly next week but thanks for submitting this. |
I presume, like the other reports we've received about this, that you're a Windows user? |
@radarhere Yes, exactly (sorry I forgot to mention that), |
Thanks. I've created fcarron#1 as a suggestion for a test to add, to help ensure that this change doesn't get broken again in the future. |
@radarhere Thank you for adding this test. |
Just to link, this PR is similar to #5946 |
Resolves #6985
Problem:
When saving many tiff files with compression="group4" I get the error OSError: [Errno 24] Too many open files (after ~8000 images)
Without compression="group4" it works fine.
This also happens when a new image is created on each iteration and with explicit close()
Changes proposed in this pull request:
The file pointer seems to be cloned by the libtiff library, but not freed at the end.
Closing to file pointer solve the problem for me.