That's interesting.. Although I know for sure that all my gl* calls are happening only in the GL thread. And this freezing happens even when I simply leave the device (HTC Desire) running my app with zero user interaction whatsoever. All the app renders is a scenery with a single animation. No texture changes or geometry changes are taking place in this scenario. But because of the animation, I have to render continuously and this is why I have not used the Render_when_dirty approach.
I did notice that when the app freezes, my main UI thread as well as a secondary thread (that talks to a game server) are still running and alive. The main UI thread does register touches until a point and then hangs while the secondary thread stays alive. I tried to send an interrupt() to the GLThread from this secondary thread but that did not help. The GLThread remained stuck in eglSwapBuffer(); On Sep 14, 3:42 pm, String <[email protected]> wrote: > On Sep 13, 11:24 pm, Jeremy Statz <[email protected]> wrote: > > > The big problem here, in my eyes, is that this appears to > > affect any OpenGL using application, and is tremendously discouraging, > > to the point that people pull things off the market and avoid using > > OpenGL. > > I've been chasing this in a couple of my own OpenGL apps for a couple > of months as well. It's summed up well in this thread - extremely > intermittent, but extremely serious when it does happen. And I'm one > of the devs who has pulled an app from the Market as a result. > > At the moment, I'm provisionally optimistic that I've worked around > the issue in my case. Given it's a race condition, I took the approach > of maximum thread-safety: I put a whole load of semaphores into my > code, added "synchronized" and "volatile" modifiers all over the > place, that sort of thing. And it seems to have been successful... I > can't be sure (because of the intermittency), but I haven't seen it > happen for a couple of weeks now. > > If I had to speculate, I'd say that the problem finally went when I > synchronized some code which re-generates geometry within my OpenGL > model. I added semaphores to ensure that textures, geometry, and > rendering never happened concurrently. There's no way to know that was > the end problem, but that SEEMED to be it. If that helps anyone. > > Just to reiterate, I agree that this is a serious platform-level bug > that needs to be fixed by Google. And it has gotten worse since 2.2, > although I have (rarely) seen it happen on my G1 running 1.6. > > String -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

