We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 385 - Memory leak in SDL_mixer?
Summary: Memory leak in SDL_mixer?
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: All All
: P1 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-29 12:09 UTC by Ryan C. Gordon
Modified: 2007-07-15 08:57 UTC (History)
0 users

See Also:


Attachments
test case. (1.13 KB, text/x-csrc)
2007-07-15 08:17 UTC, Ryan C. Gordon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan C. Gordon 2007-01-29 12:09:13 UTC
Discussion:

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2007-January/059515.html


Relevant detail:

"Because this is for unit test, I have the effects on a button press.
So it's very likely that Mix_SetPanning() gets called multiple times.
No other effects were set on that channel.

Here's the flow:

Mix_OpenAudio
Set volume to MAX
Allocate 2 channels
Load the 2 different chunks (1 on each channel)
Load the music
Play the music (loop forever)
Play chunk 0 on channel 0
(while sfx is playing) Set Panning on both channels to (255, 0)
Halt Channel (passing -1, i.e. halt all channels)
Free chunk 0
Free chunk 1
Mix_AllocateChannels(0) // free all channels
Halt Music
Free Music
Mix_CloseAudio


Cheers,
Kos"

--ryan.
Comment 1 Ryan C. Gordon 2007-06-27 15:31:05 UTC
Whoops, this is an SDL_mixer bug, not an SDL bug...

--ryan.

Comment 2 Sam Lantinga 2007-07-14 20:40:45 UTC
Ryan, can you take a look at this for the SDL_mixer 1.2.8 release?
Comment 3 Ryan C. Gordon 2007-07-15 07:43:05 UTC
Looking at this now.

--ryan.

Comment 4 Ryan C. Gordon 2007-07-15 08:17:07 UTC
Created attachment 228 [details]
test case.


Here's a test case that triggers the bug. "whoosh.wav" and "icculus.org" can be just about any file you have laying around your hard drive.

--ryan.
Comment 5 Ryan C. Gordon 2007-07-15 08:57:57 UTC
Fixed in svn revision #3290.

--ryan.