views:

732

answers:

2

I'm writing a graphically intense game for the Nexus One, using the NDK (revision 4) and OpenGL ES 2.0. We're really pushing the hardware here, and for the most part it works well, except every once in a while I get a serious crash with this log message:

W/SharedBufferStack( 398): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again.

The entire system locks up, repeats this message over and over, and will either restart after a couple minutes or we have to reboot it manually. We're using Android OS 2.1, update 1.

I know a few other people out there have seen this bug, sometimes in relation to audio. In my case it's caused by the SharedBufferStack, so I'm guessing it's an OpenGL issue. Has anyone encountered this, and better yet fixed it? Or does anyone know what's going on with the SharedBufferStack to help me narrow things down?

Thanks in advance!

~ Kim

+1  A: 

I don't believe such error can occur in audio code, SharedBufferStack is only used in Surface libraries. Most probably this is a bug in EGL swapBuffers or SurfaceFlinger implementation, and you should file it to the bug tracker.

ognian
A: 

Any update on this SharedBufferStack issue? I am having the same issue with my opengl game on Android. It happens randomly and inconsistently and no idea what the trigger really is. The opengl thread hangs in EGLSwap() and the main (UI) thread spits out the SharedBufferStack LockCondition CPU may be pegged messages. I found that the main thread is still responsive for a few seconds after the freeze happens and I even tried to issue an interrupt() to the GL thread. But this so far has not worked.

Any help on this is greatly appreciated...

Willie Marzo