ISOUNDPLAYER problems AGAIN !!! ARRRG!!!! | developer.brewmp.com ISOUNDPLAYER problems AGAIN !!! ARRRG!!!! | developer.brewmp.com

Developer

ISOUNDPLAYER problems AGAIN !!! ARRRG!!!!

Forums:

Ok, here it goes... I have a small memory leak which I can't seem to fix.

When I first start the application, I have X amount of memory, after stopping the application, I have X-888 bytes. This only happens the first time I run the application, all subsequent calls without closing the emulator or the device, don't leak...

I am using Setinfo to set the info and to unset.. ISOUNDPLAYER_SetInfo(_pISoundPlayer, NULL)...

I am carefully waiting for every AEE msgs in the callback before setting/calling anything else and I am deleting my AEESoundPlayerInfo.pdata even though I am using SDT_FILE. I also release the interface...

What the.. Is this a normal leak..? As it happens only the first time I run the application, I wonder....

Sounds like i also have this kind of weird bug.. Even the brew 2.1 emulator cannot catch the leak, still dunno where it comes from..
Any1 has something similar or a way to fix it ?
/kUfa

Sounds like i also have this kind of weird bug.. Even the brew 2.1 emulator cannot catch the leak, still dunno where it comes from..
Any1 has something similar or a way to fix it ?
/kUfa

I'm using the ISOUNDPLAYER API exclusively for my sound output and I have never had this problem. So, I would say there is no bug in the emulator to that end. You guys are definitely doing something you shouldn't... :D ...big help, I know.
My recommendation would be to see if oyu have any data that are around 888 bytes - in Raz case - so that you know at least *what* is leaking. From there'd I'd keep checking the code step by step.
It is also always a good idea in such cases to check the core memory as you go through routines to see when it starts deviating from the start of the application. It helped me find a few really nasty memory bugs I've had in the past - and they were always mine, too.

I'm using the ISOUNDPLAYER API exclusively for my sound output and I have never had this problem. So, I would say there is no bug in the emulator to that end. You guys are definitely doing something you shouldn't... :D ...big help, I know.
My recommendation would be to see if oyu have any data that are around 888 bytes - in Raz case - so that you know at least *what* is leaking. From there'd I'd keep checking the code step by step.
It is also always a good idea in such cases to check the core memory as you go through routines to see when it starts deviating from the start of the application. It helped me find a few really nasty memory bugs I've had in the past - and they were always mine, too.

Quote:You guys are definitely doing something you shouldn't... ...big help, I know.
lol yeah :D
Btw it's kind of weird, since it happens only hte very first time i start my app.. Of course i have a memory tracker, but neither this one, neither the one in the emulator can find something. So i thought it's probably something with an object i do not release, but nope..
Maybe it's something to do with the callbacks.. hmm, will check it out later today if i reach my deadline in time hehe :rolleyes:
/kUfa

Quote:You guys are definitely doing something you shouldn't... ...big help, I know.
lol yeah :D
Btw it's kind of weird, since it happens only hte very first time i start my app.. Of course i have a memory tracker, but neither this one, neither the one in the emulator can find something. So i thought it's probably something with an object i do not release, but nope..
Maybe it's something to do with the callbacks.. hmm, will check it out later today if i reach my deadline in time hehe :rolleyes:
/kUfa

Hi,
Take a look at this thread:
http://brewforums.qualcomm.com/showthread.php?s=&threadid=2301&highlight...
I am assuming that Raz is using debug mode on the device. I went throught the same thing on my app. I even tried out several apps from 'Get it Now' , such as Disney, Ringster, etc and they all do the same thing if you use debug ###3 on the device.
They all seem to do it when making a datacall or when playing/viewing test files.
I don't know if it's supposed to do it, but it seems that all the apps do it.
Hope this sheds some light on the situation.

Hi,
Take a look at this thread:
http://brewforums.qualcomm.com/showthread.php?s=&threadid=2301&highlight...
I am assuming that Raz is using debug mode on the device. I went throught the same thing on my app. I even tried out several apps from 'Get it Now' , such as Disney, Ringster, etc and they all do the same thing if you use debug ###3 on the device.
They all seem to do it when making a datacall or when playing/viewing test files.
I don't know if it's supposed to do it, but it seems that all the apps do it.
Hope this sheds some light on the situation.

Interesting: my "leak" only occurs with the brew 2.1 emulator, but not with the brew 3.0 simulator...
/kUfa

Interesting: my "leak" only occurs with the brew 2.1 emulator, but not with the brew 3.0 simulator...
/kUfa

Weespeed,
Raz was actually referring to the emulator.
kUfa,
How in the world did you get the 3.0 simulator to work???? Everyone I know sees nothing but crashes and lock-ups. Pray, tell...

Weespeed,
Raz was actually referring to the emulator.
kUfa,
How in the world did you get the 3.0 simulator to work???? Everyone I know sees nothing but crashes and lock-ups. Pray, tell...

Well, dunno..
Here is what i've done: (already got brew 1.1 and 2.1 installed, brew dir is set to the 2.1) installed v3.0, did not update the brew dir. Started directly the simulator from the bin directory (i tried all the other .exe before hehe), set the cur applet dir from the menu (does not seems to work if i set it in the right panel), and that's it..
Hope that will help..
/kUfa

Well, dunno..
Here is what i've done: (already got brew 1.1 and 2.1 installed, brew dir is set to the 2.1) installed v3.0, did not update the brew dir. Started directly the simulator from the bin directory (i tried all the other .exe before hehe), set the cur applet dir from the menu (does not seems to work if i set it in the right panel), and that's it..
Hope that will help..
/kUfa

Thank you for the answers. Actually Dragon, the problem is both on the device and on the 2.1 emulator.
If all those commercially available apps do the same thing, I'm guessing mine won't be turned down by NSTL... Nevertheless I would like to find the problem so I'll keep looking and let you know if I find anything. Please do the same!

Thank you for the answers. Actually Dragon, the problem is both on the device and on the 2.1 emulator.
If all those commercially available apps do the same thing, I'm guessing mine won't be turned down by NSTL... Nevertheless I would like to find the problem so I'll keep looking and let you know if I find anything. Please do the same!

Are you seeing the leak on the emulator and the physical handset, or just on the handset? If just on the device, which one? I've seen ISOUNDPLAYER problems crop up on the the T720 when the same code ran without any leaks on the 4400, 6000, a530, etc.

Are you seeing the leak on the emulator and the physical handset, or just on the handset? If just on the device, which one? I've seen ISOUNDPLAYER problems crop up on the the T720 when the same code ran without any leaks on the 4400, 6000, a530, etc.

As I had just written, the leak is both on the emulator and on the device.

As I had just written, the leak is both on the emulator and on the device.

We're not quite sure if this is the case on all phones, nor are positive that its what is actually going on, but when you use BREW extentions that aren't normally loaded, ie, Graphics, Display, Sound, etc, BREW doesn't release all of the libraries on application exit, only when the GetItNow shop exits, or maybe even later. We first noticed it when all we were doing was initiating an instance of IWEB and then exiting, we were losing memory, but only on the first run of the application. As I said above, we've since then noticed similar occurences of these "memory leaks" when other BREW interfaces are used.
~james

We're not quite sure if this is the case on all phones, nor are positive that its what is actually going on, but when you use BREW extentions that aren't normally loaded, ie, Graphics, Display, Sound, etc, BREW doesn't release all of the libraries on application exit, only when the GetItNow shop exits, or maybe even later. We first noticed it when all we were doing was initiating an instance of IWEB and then exiting, we were losing memory, but only on the first run of the application. As I said above, we've since then noticed similar occurences of these "memory leaks" when other BREW interfaces are used.
~james

Ok. Thank you maki. We have confirmned that this is exactly what is happenning... The ISOUNDPLAYER interface is not being released immediately. For exemple, if I set the volume to a value, exit the application, and come back, the volume is still set to what it was before exiting the application. That is still strange because in my constructor I implicitly set the volume to the max....
I will check that out and let you know if I find anything.

Ok. Thank you maki. We have confirmned that this is exactly what is happenning... The ISOUNDPLAYER interface is not being released immediately. For exemple, if I set the volume to a value, exit the application, and come back, the volume is still set to what it was before exiting the application. That is still strange because in my constructor I implicitly set the volume to the max....
I will check that out and let you know if I find anything.