memory leaks associated with images
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Inkscape |
Fix Released
|
Medium
|
David Mathog | ||
Bug Description
This was tested on Windows XP with code built from Trunk downloaded 2/29/2012.
There are at least two locations where image (bitmap) operations leak memory. This can be seen with the Windows task manager tool.
A) Extract image extension:
1. Select a bitmap
2. extendions -> images -> extract image
3. save the image
The memory usage increases at step 3 and does not return to the level it was at (1).
B) Above whatever calls the save as "::image" method if one is implemented for EMF (I am currently working on this, and traced the observed memory leak to outside of my changes):
1. Change emf-win32-print.cpp by adding:
unsigned int PrintEmfWin32:
{
return 0;
}
2. btool
3. start inkscape and open an SVG containing a single 1280 x 1024 bitmap.
4. save as -> emf
memory leaks 11M relative to what it was at (3), or about 2X the size of the bitmap which was passed into the image method (but not processed).
In my working code (which does save images) I was able to reduce the leakage somewhat by free(px) at the end of the routine. When that is in place the first call leaks around 5M (probably one full bitmap) and then each subsequent call leaks another 300K (roughly).
In an unrelated bug, the transform passed to PrintEMFWin32:
The size of these memory leaks is pretty darn large, anybody who makes heavy use of these features is going to find
inkscape burning through a lot of memory.
| tags: | added: exporting extensions-plugins performance win32 |
| Changed in inkscape: | |
| status: | Confirmed → Triaged |
| Changed in inkscape: | |
| status: | Fix Committed → Fix Released |

A confirmed on windows vista 64 bit, trunk revision 11265, devlibs revision 29.
Roughly 66 MB is leaked every time with the given procedure.