title: Android freeze in OpenGL|ES (CPU may be pegged. trying again.)
body: <p>A while ago I bumped into an issue with <code>eglSwapBuffers</code> freezing the phone with the following message showing up in the device log:</p>
  
  <pre><code>W/SharedBufferStack( 1110): waitForCondition(LockCondition) timed out (identity=28, status=0). CPU may be pegged. trying again.
  </code></pre>
  
  <p>I've seen discussion on this issue all over the web but the only solution I've found to have any effect is calling <code>glFinish</code> after <code>eglSwapBuffers</code>. This solution, however, results in the framerate dropping by a whooping 10-20, which is far from acceptable.</p>
  
  <p>Issues have been opened and one can be found <a href="http://code.google.com/p/android/issues/detail?id=6478">here</a></p>
  
  <p>Someone commented that using square textures eliminated the issue. By square I initially thought he meant power-of-two textures but after making sure I was not using any non-power-of-two textures and not getting rid of the issue I began to think that he might have actually meant textures with matching width and height?</p>
  
  <p>I'm testing on an HTC Desire with Android 2.3.3. Someone commented that future versions should have fixed this issue but 2.3.3 is installed on so many devices that we can't disregard it.</p>
  
  <p>Anyway, anyone have any thoughts on this? We're very close to shipping a title and this issue is threatening out schedule.</p>