Memory leak in bitmap trace

Bug #996695 reported by Kris on 2012-05-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When tracing a bitmap, memory consumption rises with each click on the "Update" button in the "Trace bitmap" dialog.
The memory that is leaked per click on Update is dependant on the dimensions of the embedded bitmap. There seems to be a treshhold though (for small images there seems to be no rise in memory consumption with each click, though it might be linked to a change in setting followed by an update).

Vista 64 bit, trunk rev 11231.

jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape trunk revision 11342.
With a 3.8 Mio JPG image, there's a loss of about 20-25 Mio each time I click on Update.

Changed in inkscape:
status: New → Triaged
Kris (kris-degussem) wrote :

Fixed some memory leaks in the bitmap trace code in revision 12050, though they are not the ones causing this bug...

Kris (kris-degussem) wrote :

Did some more study ...
It seems that the patch in attachment fixes the bug. Can anyone confirm this?

Patch content:
- comments out some code that seems unused (is this OK to drop?)
- modifies destroy callback for a few gdk_pixbuf_new_from_data into (GdkPixbufDestroyNotify)g_free (this is the real fix/patch)

jazzynico (jazzynico) wrote :

Patch tested successfully on Windows XP, Inkscape trunk revision 12054.
No regression found so far.

> comments out some code that seems unused (is this OK to drop?)

It seems it is not called at all. Thus I guess it can safely be removed.

Changed in inkscape:
assignee: nobody → Kris (kris-degussem)
milestone: none → 0.49
status: Triaged → In Progress
Kris (kris-degussem) wrote :

Patch for callback to release memory committed in revision 12057.

Changed in inkscape:
status: In Progress → Fix Committed
Kris (kris-degussem) wrote :

Backported for 0.48.5 in revision 9944 of 0.48.x branch.

Changed in inkscape:
milestone: 0.49 → 0.48.5
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers