From 32171ee45370a9c6dacb582c39d51d0ff17911f1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 2 Sep 2013 07:05:11 +0200 Subject: Animator/GLWindow: Catch 'ThreadDeath/Throwable' and dump info in DEBUG mode (cosmetic change only); Typo in comment; TestSharedContextListNEWT2: Stop animator. --- src/jogl/classes/com/jogamp/opengl/util/Animator.java | 5 +++++ src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java index ac2b24117..80d980492 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java @@ -201,6 +201,11 @@ public class Animator extends AnimatorBase { Thread.yield(); } } + } catch( ThreadDeath td) { + if(DEBUG) { + System.err.println("Animator Catched: "+td.getClass().getName()+": "+td.getMessage()); + td.printStackTrace(); + } } finally { if( exclusiveContext && !drawablesEmpty ) { setDrawablesExclCtxState(false); diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java index 52069b88f..91beddb02 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java @@ -337,7 +337,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { if (null != sr.context) { // may cause JVM SIGSEGV: - sr.context.destroy(); // will also pull the dummy MutuableSurface + sr.context.destroy(); // will also pull the dummy MutableSurface sr.context = null; } -- cgit v1.2.3