0

I developed android Live wallpaper using opengl.It starts fine,but it hangs to "loading live wallpaper" very often.I don't know why it is happening.

I have 10 images in drawable which is used for rendering.

My Logcat,

        06-27 07:05:26.338: W/Adreno-EGLSUB(22430): <DequeueBuffer:591>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
        06-27 07:05:26.338: W/Adreno-ES20(22430): <gl2_surface_swap:43>: GL_OUT_OF_MEMORY
        06-27 07:05:26.338: W/Adreno-EGL(22430): <qeglDrvAPI_eglSwapBuffers:3595>: EGL_BAD_SURFACE
        06-27 07:05:26.378: W/Adreno-EGLSUB(22430): <DequeueBuffer:591>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
        06-27 07:05:26.378: W/Adreno-ES20(22430): <gl2_surface_swap:43>: GL_OUT_OF_MEMORY
        06-27 07:05:26.378: W/Adreno-EGL(22430): <qeglDrvAPI_eglSwapBuffers:3595>: EGL_BAD_SURFACE
        06-27 07:05:26.428: W/Adreno-EGLSUB(22430): <DequeueBuffer:591>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
       06-27 07:05:26.428: W/Adreno-ES20(22430): <gl2_surface_swap:43>: GL_OUT_OF_MEMORY

Actually My wallpaper loads properly,while it rendering for 30 -50 secs it automatically stops and shows Loading Live wallpaper message.But when when I click settings button it loads again.

Can anyone tell me why I am facing this issue.

genpfault
  • 51,148
  • 11
  • 85
  • 139
micky
  • 508
  • 5
  • 17

1 Answers1

0

This seem to be a quite elusive bug. Searching for the LogCat messages turns up many questions, but rarely any answers.

Switching of the hardware acceleration worked for some: here

As this is most likely not an option you could try to change around the initialization routine for OpenGL/Drawing. This seems to have helped some people: one, twoo, threee

Without more info available, you will have to try these out (especially the last one) and see what happens.

Community
  • 1
  • 1
Dawnkeeper
  • 2,844
  • 1
  • 25
  • 41
  • I come to knoe it happens because of memory leak in my onDrawFrame method.How can I reduce it? – micky Jun 28 '14 at 04:22
  • The usual: write clean code (no offence intended). i.e.: Close very stream you open; Dispose all objects that have this function. Don't keep references you no longer need. [Here](http://www.java-gaming.org/index.php?topic=30619.0) is an example – Dawnkeeper Jun 30 '14 at 06:47