HTC Only Hard Crash inside OpenGL
Asked Answered
R

1

9

I have been seeing this problem for a while in my application. It shows itself by randomly hardlocking or rebooting HTC phones when they are rendering using OpenGL. Checking the logcat it appears to be a deadlock issue as you will see this printed...

waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. 

The best source for information I have been able to find so far is over here: http://groups.google.com/group/android-developers/browse_thread/thread/d5b7e87f4b42fa8f/d6214ed7a02efc98?q=freeze&lnk=ol&

Where they suggest adding a glFinish at the end of your glSurface's OnDraw function. I am not having great results using this solution (its still crashing but less often). Has anyone else heard about this problem? Encountered any better solutions?

Reveal answered 8/3, 2011 at 22:21 Comment(2)
This will be of little consolation, but I feel your pain. I've got 2 comments on the Market "Phone locked, had to remove battery. HTC Desire". No idea what causes this, and I've seen the game running fine on a friend's Desire.Questionary
Yea I've had it happen on a number of HTC phones but mainly during stress tests (let the app sit running overnight). So far no solution, I do a web search every few weeks to look for updates.Reveal
P
1

We have been getting exactly this problem on our game with HTC Sensation devices and Android 2.3.4 - so we went and bought the device and experimented for a bit. One of the solutions was to call egl.eglWaitGL() at the end of the onDraw() method but that halved the framerate - suprisingly only on that device, but I consodered it a bad solution and kept looking.

The second fix and the one we are using currently which had almost no performance penalty was to stop using glBufferSubData to update our vertex arrays and keep uploading the whole array with glBufferData. If you are using VBO's and glBufferSubData to update them, try changing it.

Politick answered 14/10, 2011 at 1:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.