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

Memory leak in mDiff #68

Open
guillaumechereau opened this issue Aug 18, 2023 · 2 comments
Open

Memory leak in mDiff #68

guillaumechereau opened this issue Aug 18, 2023 · 2 comments

Comments

@guillaumechereau
Copy link

It seems that the mDiff function leaks memory in the case where "All pixels are blank" (line 949 of file montageDiff.c).

This is an issue for me because I try to run mDiffExec on a large number of files and the command eventually runs out of memory.

Regards,
G

@pandapawskat
Copy link

I've found that a lot of these tools have memory leaks or other memory management issues that aren't a problem when run as an individual tool, but add up quickly when using the python wrappers. Calling mProjectQL in a loop eats up memory, and mViewer starts having issues like double frees if called repeatedly. My solution has been to use the multiprocessing library to fire off the methods in a separate process so everything gets cleaned up when it terminates. Definitely not ideal but it got me unstuck.

@pandapawskat
Copy link

Just adding that mAdd seems to leave stuff in globals, so later runs are affected by the previous ones. I think I'm going to refactor all the montagePy calls into separate processes - who knows what other bugs I may have due to things like this.

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

No branches or pull requests

2 participants