Author Topic: android bug and debug, glBindRenderbufferExt, sprite memory leak.  (Read 1801 times)

Offline sf-in-sf

  • Mr. Drawsprite
  • **
  • Posts: 93
  • Artist F.P. Brixey
    • View Profile
    • My computed art project
Hi!
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 http://code.google.com/p/monkey-ext/source/browse/monkey/modules/opengl/gles20_src.txt?r=34f0e133a20e2fc86e0060b0f962c1c6aace282d you will see that 0x8cdd means
Quote
Const GL_FRAMEBUFFER_UNSUPPORTED
.
Thank you for any suggestion.

UPDATE:
   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.

UPDATE / SOLVED.
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
« Last Edit: 2013-Sep-17 by sf-in-sf »
On the day the atom is a cube I will start believing in the square pixel.

MrTAToad

  • Guest
Re: android bug and debug, glBindRenderbufferExt
« Reply #1 on: 2013-Sep-11 »
Are you making sure that you use USESCREEN -1 after each USESCREEN 2 ?

Offline sf-in-sf

  • Mr. Drawsprite
  • **
  • Posts: 93
  • Artist F.P. Brixey
    • View Profile
    • My computed art project
Re: android bug and debug, glBindRenderbufferExt
« Reply #2 on: 2013-Sep-11 »
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.
EDIT - SOLVED
It's a kind of memory leak. See the 1st post edits.
« Last Edit: 2013-Sep-17 by sf-in-sf »
On the day the atom is a cube I will start believing in the square pixel.