aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java8
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java6
2 files changed, 10 insertions, 4 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index 70513f82d..d2eb98bdf 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -111,11 +111,15 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
Exception e = new Exception("Debug");
e.printStackTrace();
}
+ // don't free native resources from this point on,
+ // since we might be in a critical shutdown hook sequence
if(null!=sharedContext) {
- sharedContext.destroy(); // implies release, if current
+ // may cause deadlock: sharedContext.destroy(); // implies release, if current
+ sharedContext=null;
}
if(null!=sharedDrawable) {
- sharedDrawable.destroy();
+ // may cause deadlock: sharedDrawable.destroy();
+ sharedDrawable=null;
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
index aa1767c48..823809f43 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
@@ -151,12 +151,14 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna
}
}
+ // don't free native resources from this point on,
+ // since we might be in a critical shutdown hook sequence
if(null!=sharedDrawable) {
- sharedDrawable.destroy();
+ // may cause deadlock: sharedDrawable.destroy();
sharedDrawable=null;
}
if(null!=sharedScreen) {
- X11Util.closeThreadLocalDisplay(null);
+ // may cause deadlock: X11Util.closeThreadLocalDisplay(null);
sharedScreen = null;
sharedDevice=null;
}