android bug and debug, glBindRenderbufferExt, sprite memory leak.

Previous topic - Next topic


I managed to debug my android tablet (archos 10.1 g9) thanks to "ddms" command line on xubuntu linux. (dalvik debug monitor service. Should work in console on windows too, once you have adb.)
Bug: after 8 resizings using "USESCREEN 2" and POLYVECTOR those corresponding sprites disappear from the screen. It happens after about 20 times in the emulator, and never on windose. I'm surprised that only the sprites disappear. The rest drawn with POLYVECTOR keeps running o.k. I thought DRAWSPRITE was less consuming... Then the debugger repeats "glBindRenderbufferExt failed 8cdd". If you look at you will see that 0x8cdd means
Thank you for any suggestion.

   ddms seems to only work on linux.
hint for beginners: *) install adb etc... *) in a console type: "adb devices". (if you don't see the device it isn't installed yet.) *) "adb usb"  *)"ddms". *) then watch the debug window to see what the device or emulator does.
Linux newbies? get a "live cd" of xubuntu or lubuntu and burn the *.iso on a cd with "isoburn". Set the bios to boot on the cd before the hd. in 5 minutes it's up and running, without hd installation.

I found that my resize routine calls a GENSPRITE() everytime. By repeating this, I end up busting the sprite memory, so the new sprites are empty and invisible. This is where it can be dangerous to develop on an oversized machine with plenty of ram: the problem doesn't show up. Then I find GENSPRITE() dangerous too. It's o.k. to load sprites at the beginning of a program, but if you use it regularly you should remember to de-allocate the previous sprites. Perhaps >> LOADSPRITE "",  old_sprite_num works? I haven't tried.
Finally I don't understand the error message. What's the relationship with busting the sprite (or ram?) memory ?
Finally I'd like to recommend the test of running the app in the emulator with small memory size, in order to spot this kind of problem: MEMORY LEAKS
On the day the atom is a cube I will start believing in the square pixel.


Are you making sure that you use USESCREEN -1 after each USESCREEN 2 ?


oh yes, of course. The pb is somewhere else. Maybe some repeated GENSPRITE() 's on the fly too... I don't know yet. Update: dalvik debugger "ddms" seems to only work on linux.
It's a kind of memory leak. See the 1st post edits.
On the day the atom is a cube I will start believing in the square pixel.