Memory leak on skin change

Bug #636829 reported by jus
This bug report is a duplicate of:  Bug #1369051: Mixxx is leaking memory. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Low
Unassigned
1.8
Won't Fix
Low
Unassigned

Bug Description

Tested with Mixxx trunk on MacOSX 10.5.8 & 10.6.3

On every skin change the memory consumption grows, e.g. goes from 70 mb to 500 mb after 20 changes. Although nobody would probably change the skin this often in one session, the leak is there.

Another effect is that you can see briefly parts of the old skin on where the new skin has its waveform. It looks like the are actually layered.

Related branches

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hey Jus,

I see a memory leak but its nowhere near as drastic for me. After about 30 changes I see an increase of about 1 MB, but it is definitely there. Some of our widgets are probably leaking something. I'll take a look at this at some point.

Thanks,
RJ

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
William Good (bkgood) wrote :

Assigning to myself as a reminder to do a skin change under valgrind and see what blows up.

Changed in mixxx:
assignee: nobody → Bill Good (bkgood)
Revision history for this message
William Good (bkgood) wrote :

After running mixxx in valgrind and switching through all the skins (top to bottom, this took forever so I didn't do any more) and I got:
==19749== LEAK SUMMARY:
==19749== definitely lost: 109,381 bytes in 2,085 blocks
==19749== indirectly lost: 258,308 bytes in 3,525 blocks
==19749== possibly lost: 672,837 bytes in 13,516 blocks
==19749== still reachable: 64,625,979 bytes in 185,904 blocks
==19749== suppressed: 0 bytes in 0 blocks

After going up and down the skin list a few times outside of valgrind, I was able to get to ~40MB leaked. I'm not sure what caused your leak to be so huge, I definitely didn't get to 500MB in 20 changes (I quit at about 100MB, starting from 70MB, after around 30 changes). Definitely leaky though.

Changed in mixxx:
assignee: Bill Good (bkgood) → nobody
Revision history for this message
jus (jus) wrote :

Tested with latest http://bazaar.launchpad.net/~mixxxdevelopers/mixxx/release-1.9.x/revision/2666
Started Mixxx and switched once through all the skin on MacOS 10.6. Memory usage goes from 70mb to 160mb.

I then made the run same run with Instruments (the tracing and profiling tool ) attached .
Screenshot shows several leaked objects and the responsible frame, hope this is useful for you.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hey jus,

That's really useful. I just fixed the getPixmapNoCache leak. Could you expand the WPushButton and WKnob lines? And was there anything below ImgScaleWhite?

Revision history for this message
jus (jus) wrote :

I copied the wall of text from inside the Instrument`s frame.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

All ImgSource related lines should be gone now as well.

Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5514

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.