From 657081451f7cceac0b0a58b3c15a10a6d3b4b907 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 22 Sep 2014 07:07:42 +0200 Subject: Stabilize, fix regression: GLDrawable.invoke(..) and Animator* display-loop 'closure' GLDrawable.invoke(..) regression of commit c77b8f586cb2553582a42f5b90aeee5ef85f1efe: 'wait' was not set to false, if 'deferredHere' was forced to 'false'. This could lead to the situation where GLRunnableTask will catch the exception and supresses it. Animator/FPSAnimator post exception propagation code animThread = null; notifyAll(); must be complete to finalize animator state in case of an exception. Decorate 'handleUncaughtException(..)' w/ try { } finally { } where the latter ensures the mentioned 'closure'. --- src/jogl/classes/jogamp/opengl/GLDrawableHelper.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/jogl/classes/jogamp/opengl/GLDrawableHelper.java') diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java index 25ff83fc0..f770f2a59 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java @@ -899,6 +899,7 @@ public class GLDrawableHelper { if( isGLThread ) { // Run immediately, don't defer since locked by this thread, but isGLThread deferredHere = false; + wait = false; } else { // Locked by this thread, but _not_ isGLThread -> ERROR throw new IllegalStateException("Deferred, wait, isLocked on current and not GL-Thread: thread "+Thread.currentThread()); @@ -964,6 +965,7 @@ public class GLDrawableHelper { if( isGLThread ) { // Run immediately, don't defer since locked by this thread, but isGLThread deferredHere = false; + wait = false; } else { // Locked by this thread, but _not_ isGLThread -> ERROR throw new IllegalStateException("Deferred, wait, isLocked on current and not GL-Thread: thread "+Thread.currentThread()); -- cgit v1.2.3