diff options
author | Sven Gothel <[email protected]> | 2014-09-22 07:07:42 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-22 07:07:42 +0200 |
commit | c298b4317a30cc453a2350ebeb5ab3570a4c107d (patch) | |
tree | cb7394038309222a72c65a91384e27eefd5a359e /src/jogl/classes/com/jogamp/opengl/util/Animator.java | |
parent | 4d736527930511cabf2c6604aa831544da917198 (diff) |
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'.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/Animator.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/Animator.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java index 4d61adaa6..c7a03eddb 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java @@ -237,11 +237,14 @@ public class Animator extends AnimatorBase { stopIssued = false; pauseIssued = false; isAnimating = false; - if( null != displayCaught ) { - handleUncaughtException(displayCaught); + try { + if( null != displayCaught ) { + handleUncaughtException(displayCaught); // may throw exception if null handler + } + } finally { + animThread = null; + Animator.this.notifyAll(); } - animThread = null; - Animator.this.notifyAll(); } } } |