pylab.savefig() causes memory leak in matplotlib-0.91.2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
matplotlib (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
I am using Ubuntu 8.04 on both i386 and amd64 machines.
At present Ubuntu 8.04 with all available updates has matplotlib in version 0.91.2
The bug appears in particular to python programmers who save to disk many plots with pylab in single python process.
The bug I am mentioning causes serious memory leaks when calling pylab.savefig()
In my case it is about 15 MB of memory leak for each call of savefig() causing entire RAM consumption in the end.
I decided not to put here any screenshots and so on, because this bug is already fixed in matplotlib version 0.91.4 (latest from 0.91 branch)
See the changelog entry:
2008-05-02 Update _subprocess.c from upstream Python 2.5.2 to get a few memory and reference-
[the full changelog is in attachment]
I built for myself matplotlib 0.91.4 from official sources and it works fine (no memory leaks), but I'm worried about other python/pylab programmers who may be not yet aware of this issue.
The bug report is my gentle request to Ubuntu Maintainers, to put matplotlib 0.91.4 in Ubuntu 8.04 repositories instead of current (buggy) version.
Greetings
Przemek
description: | updated |
Changed in matplotlib: | |
status: | New → Fix Released |
Putting matplotlib 0.91.4 in hardy-update is not really an option, there are a lot of feature additions and code changes beyond just fixing this bug. This seems serious enough though to warrant a stable release update. I'm attaching a patch I extracted from matplotlib SVN for that specific changelog entry. It seems fairly reasonable. Unfortunately I don't currently have a Hardy installation to test this out on.