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
Sequence not clearing from memory, sequence.destroy not working #237
Comments
Thanks Nertskull. Can you run the following, and post output?
|
Yeah, here it is. 0.4.0 |
I have also run into this issue recently. I spent a little bit of time troubleshooting and was able to narrow it down to something that is happening inside this is fine:
but this will not free up the allocated memory:
I can even specify that it only holds onto the memory for the specific sequence item that you interact with. If you have images in the sequence and you only examine one of them, it will free the rest up. Sorry I am not able to provide any more detail. Hope that is useful. |
Every single image in a sequence has to be accessed using with Image(blob=blob) as img:
with img.sequence[0] as single_image:
print single_image |
Yea, we're using that way. I was trying to simplify for the sake of the example. |
All (@Nertskull & @valdarin), Please clone/checkout my development branch issue-237, and verify if the issue still exists. Proposed SolutionWhen DiscoveryFor folks wondering how I identified this, I used Apple's Instruments.app (a gui for ldb + batteries included.) Using the example provided with Python 3.4 + ImageMagick 6.8.5 (both compiled with debug flags for backtrace & breakpoint support.) Memory usage + leaks where visible The bt quickly identified CloneImage was the cause of memory consumption. A simple DestroyImage seems to work. Please help and verify. |
Cool. 👍 |
Proposed fix for issue #237 - Sequence not clearing from memory
#237 fixed this. |
If I do this
or even explicity destroy the image like this
I end up with images piling up in memory (and then on disk in /tmp) until i reach a segmentation fault. It appears the ImageSingle stuff is not getting cleared.
I posted about it here, in case that helps.:
https://stackoverflow.com/questions/30100956/python-wand-sequence-not-clearing-from-memory/30106428#30106428
The text was updated successfully, but these errors were encountered: