We are developing an application that uses a GLSurfaceView to display 3D objects. We regularly get the "Application Not Responding" dialog. Inspection of the dumped threads reveals something that looks suspiciously like a deadlock. I have added the three thread dumps involved below.
The first thread is the main application event thread, and it is waiting on a join with a GLThread. The second thread is a brand new GLThread that is waiting for a semaphore lock presumably so it knows it has exclusive access to the graphics hardware. The third thread is probably a previous GLThread (the one the main thread is waiting for to finish), that is waiting to be notified. The strange thing is that the main application thread has just done a "mDone=true; notify();" prior to calling "wait()", so the third thread should have been awaken? - Has anyone else run into this issue? - Does anyone know of a workaround? Any help would be appreciated! DALVIK THREADS: "main" prio=5 tid=3 WAIT | group="main" sCount=1 dsCount=0 s=0 obj=0x40018e70 | sysTid=713 nice=0 sched=0/0 handle=-1093387108 at java.lang.Object.wait(Native Method) - waiting on <0x2976e0> (a java.lang.VMThread) at java.lang.Thread.join(Thread.java:1020) at java.lang.Thread.join(Thread.java:974) at android.opengl.GLSurfaceView$GLThread.requestExitAndWait (GLSurfaceView.java:1056) at android.opengl.GLSurfaceView.onDetachedFromWindow (GLSurfaceView.java:447) at android.view.View.dispatchDetachedFromWindow(View.java:5230) "GLThread" prio=5 tid=23 WAIT | group="main" sCount=1 dsCount=0 s=0 obj=0x43516a80 | sysTid=1188 nice=0 sched=0/0 handle=3235208 at java.lang.Object.wait(Native Method) - waiting on <0x2976e0> (a java.lang.VMThread) at java.lang.Thread.parkFor(Thread.java:1497) at java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48) at sun.misc.Unsafe.park(Unsafe.java:319) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:117) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt (AbstractQueuedSynchronizer.java:680) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly (AbstractQueuedSynchronizer.java:836) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly (AbstractQueuedSynchronizer.java:1143) at java.util.concurrent.Semaphore.acquire(Semaphore.java:267) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:883) "GLThread" prio=5 tid=19 WAIT | group="main" sCount=1 dsCount=0 s=0 obj=0x435e4098 | sysTid=1184 nice=0 sched=0/0 handle=4061600 at java.lang.Object.wait(Native Method) - waiting on <0x1c74b8> (a android.opengl.GLSurfaceView$GLThread) at java.lang.Object.wait(Object.java:288) at android.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:925) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:887) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---