Memory leak with ogg streaming buffer?

stickymango

30-11-2007 17:30:17

Hi,

My OgreLeaks.log file lists memory leaks from OggSound::bufferData and I can't see where this is cleaned up? am I missing something when freeing up OgreAL resources, to prevent this?

Thanks,

CaseyB

30-11-2007 18:25:59

You were correct! I had a temporary char array that I didn't clean up! It's taken care of now and the change will be in the next update! Thank you!

stickymango

30-11-2007 20:35:13

No problem,

Glad to contribute.

stickymango

03-12-2007 10:01:17

Hi Casey,

I've also just had to add a call to delete in OggSound::~OggSound() for mBuffers? I now have no memory leaks in Ogre.log so I'm assuming its ok but didn't know if this was another possible bug...

Regards,

stickymango

03-12-2007 16:37:08

Actually adding a call to delete for mBuffers is causing a sharedPtr crash on shutdown so I've still got a single leak from mBuffers = new BufferRef[mNumBuffers];
Any idea how to clean this up?

[Edit] Scrap this I've sorted it, had the delete call in the wrong class, inserting it in OgreALSound seems to do the job :)

CaseyB

03-12-2007 20:48:33

Yup, you're right, I'll add that in, thanks again!

tlc

18-02-2008 10:00:34

Yup, you're right, I'll add that in, thanks again!

Does revision 113 resolve the above memory leak issue?

Apparently, my apps will crash after running a while, not sure if it is due to the memory leak issue. I'm playing a WAV file in a repeated mode.

Or should I use OGG format instead? I got the original sound file in MP3 format and I used a converter to convert it to WAV. So I'm not sure which format to use.

CaseyB

18-02-2008 18:23:15

The format shouldn't matter and the leak should be fixed, are you still having problems?

tlc

19-02-2008 00:11:00

The format shouldn't matter and the leak should be fixed, are you still having problems?

Yes. It'll give a crash dialog box after playing for few minutes. Some WAV file I played gave the problem right away, while some WAV are okay. Thus, I suspect it might be the MP3 to WAV converter software that I used. Different converters give different WAV filesize, so I do not know which is reliable and stable in OgreAL.

So I decide to try OGG format..

CaseyB

19-02-2008 01:48:03

Can you send me the wav file that crashes it? I am doing my own wav decoding and I want to make it as robust as possible, so I am collecting wav files that cause problems in order to try to beef it up.