Images disappearing

Monkey Targets Forums/Android/Images disappearing

siread(Posted 2012) [#1]
Anyone seen anything like this on Android devices...


Haven't seen it on my own device (San Francisco II) but it is apparently occurring on a Galaxy Nexus. Pressing the home button then returning to the game refreshes the images.

I do load all the button images as separate files rather than using one sprite sheet - could that be the problem?


siread(Posted 2012) [#2]
Double post.


Volker(Posted 2012) [#3]
I had this sometimes on my Galaxy Tab.
Using separate image files to.
Was thinking about orientation switching of the device could
have to do with it.


benmc(Posted 2012) [#4]
Are you using the most recent version of Monkey with the fix described in the thread below that appears to have been added to the latest versions of mojo?

http://www.monkeycoder.co.nz/Community/posts.php?topic=951#18040


siread(Posted 2012) [#5]
I was using 54c, which seems to include that fix unfortunately.


AdamRedwoods(Posted 2012) [#6]
The only thing I can think of is that since each image is rounded up to the next power of 2, so it may be using video memory inefficiently, eventually running out of video memory.


Supertino(Posted 2012) [#7]
Happens to me all the time on my HTC Desire - some times the images are the wrong images?! I would say it happens 1 time in 10 on average. When homing out of an app and going back in.

Thought it was just my code and me missing something but never got too far into a project to bother looking.


AdamRedwoods(Posted 2012) [#8]

When homing out of an app and going back in.

This is because android will get rid of the graphics context, so you need to utilize OnResume() within mojo and make a point to either reload your images or use the databuffer option in the opengl extension (which uses more memory).


Supertino(Posted 2012) [#9]
@Adam - Ah thought I might be missing something. noted for future.


siread(Posted 2012) [#10]
you need to utilize OnResume() within mojo and make a point to either reload your images or use the databuffer option in the opengl extension (which uses more memory)


Can you point me towards some info about using the databuffer?