I just debugged this. I'll see if I can get a fix out soon. Jay
> -----Original Message----- > From: [email protected] [mailto:hlcoders- > [email protected]] On Behalf Of Arne Sikstrom > Sent: Thursday, July 23, 2009 3:39 AM > To: Discussion of Half-Life Programming > Subject: Re: [hlcoders] Engine Memory Leak > > I can confirm this for our OB based mod. The MP3 leaks memory but the > WAV > does not. > > This is really bad, our sound guy is not very happy to use WAV for > everything. Do we have an official bug report for this? > > > On Sun, Jul 12, 2009 at 5:52 PM, Justin Krenz <[email protected]> wrote: > > > MP3s don't appear to be cached. In my mod, we played the same MP3 > > sound effect over and over, and it eventually caused the client to > > crash with an out of memory error. When memory gets full, the > console > > reports that the MP3 can't be found on disk. Then, if something > tries > > to allocate memory or the level changes, it crashes. > > > > Playing the MP3 sound effect in my mod used up about 100 K at a time. > > I think it's probably related to how big the MP3 file is. Run your > > mod in a window with task manager open, and watch how memory changes > > for HL2. That's how I found the source of the leak. Memory should > be > > stable while your mod is running. Perform all of the actions that > > might normally occur in your mod while watching memory. See if you > > can find an action that consistently causes memory to increase. > > > > On Sun, Jul 12, 2009 at 8:57 AM, Brent Lewis<[email protected]> > wrote: > > > > > > Have you produced an out of memory error by playing the same mp3 > again > > and again? Just curious if maybe it's being cached. > > > > > >> Date: Sun, 12 Jul 2009 13:25:19 +0200 > > >> From: [email protected] > > >> To: [email protected] > > >> Subject: Re: [hlcoders] Engine Memory Leak > > >> > > >> How bad is it? How much memory is lost for each call? We are > chasing > > memory > > >> leaks in our mod at the moment and are playing mp3 sounds file at > level > > >> changes. > > >> > > >> > > >> On Mon, Jul 6, 2009 at 12:19 AM, Justin Krenz <[email protected]> > wrote: > > >> > > >> > I just discovered the source of a memory leak in my mod, > Smashball. > > >> > It appears that if you call EmitSound using an MP3 sound file, > memory > > >> > is allocated and never returned. Specifically, > > >> > "enginesound->EmitSound(...)" ( > /game/shared/SoundEmitterSystem.cpp > > >> > line 460 ) is the function that allocates the memory. Thus, if > you > > >> > play an MP3 over and over, it will eventually cause HL2 to run > out of > > >> > memory. When playing a wave file, no memory is allocated via > > >> > EmitSound. > > >> > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

