diff options
Diffstat (limited to 'src/newt/classes')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index ca6ffa18b..b62628962 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -1104,6 +1104,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer if(null!=lifecycleHook) { lifecycleHook.destroyActionPreLock(); } + RuntimeException lifecycleCaughtInLock = null; final RecursiveLock _lock = windowLock; _lock.lock(); try { @@ -1133,7 +1134,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer if(null!=lifecycleHook) { // send synced destroy notification for proper cleanup, eg GLWindow/OpenGL - lifecycleHook.destroyActionInLock(); + try { + lifecycleHook.destroyActionInLock(); + } catch (final RuntimeException re) { + lifecycleCaughtInLock = re; + } } if( isNativeValid() ) { @@ -1156,6 +1161,13 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer if(DEBUG_IMPLEMENTATION) { System.err.println("Window.destroy() END "+getThreadName()/*+", "+WindowImpl.this*/); + if( null != lifecycleCaughtInLock ) { + System.err.println("Window.destroy() caught: "+lifecycleCaughtInLock.getMessage()); + lifecycleCaughtInLock.printStackTrace(); + } + } + if( null != lifecycleCaughtInLock ) { + throw lifecycleCaughtInLock; } } finally { // update states before release window lock |