ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: Oleander on August 04, 2011, 09:09:04 AM

Title: Memory leaks with -stay_open -TagsFromFile
Post by: Oleander on August 04, 2011, 09:09:04 AM
When using ExifTool with -stay_open and -TagsFromFile then memory is leaked for some source images.
Just as last time the memory usage grows until there is no memory left.
The leak doesn't seem to show up when the maker notes are removed from the source.
Attached a sample image that exhibits the leak as well as a crude sample batch file.

OS: Win XP SP3
ExifTool version: Windows executable 8.61
Title: Re: Memory leaks with -stay_open -TagsFromFile
Post by: Phil Harvey on August 04, 2011, 08:41:47 PM
Thanks.  I will get to this as soon as I can, which may be in a few weeks since I am currently on vacation.

- Phil
Title: Re: Memory leaks with -stay_open -TagsFromFile
Post by: Phil Harvey on August 17, 2011, 10:50:02 AM
Although I am still on vacation, I spent a few hours this morning and found the problem.  It will be fixed in the next release (version 8.62).

Thanks again for pointing this out, and for providing the sample file and script so I could reproduce the problem.

Now time to go kayaking... :)

- Phil
Title: Re: Memory leaks with -stay_open -TagsFromFile
Post by: Oleander on August 17, 2011, 11:09:21 AM
Quote from: Phil HarveyI spent a few hours this morning and found the problem.
Another circular reference?
Quote from: Phil HarveyThanks again for pointing this out, and for providing the sample file and script so I could reproduce the problem.
You're welcome!
Quote from: Phil HarveyNow time to go kayaking... :)
Enjoy!
Title: Re: Memory leaks with -stay_open -TagsFromFile
Post by: Phil Harvey on August 17, 2011, 05:42:57 PM
Quote from: Oleander on August 17, 2011, 11:09:21 AM
Another circular reference?

Yes, the same one.  I had added a patch earlier to fix the problem in one spot, but this time I fixed it properly by restructuring the object to remove the circular reference entirely.  This required a code sweep to add an argument to a couple of functions.  I should have done this earlier, but was trying to avoid a code sweep like this.

Quote
Quote from: Phil HarveyNow time to go kayaking... :)
Enjoy!

I did, thanks.  It was a great day and a good long (4 hour) paddle. :)

- Phil