aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-05-04 07:07:19 +0200
committerSven Gothel <[email protected]>2010-05-04 07:07:19 +0200
commit7fad4be03e6d9987be420444364b6714667d32cc (patch)
tree2d3196944902e1d285ab10f3462ff866d07e10ef /src
parent9e792dcef900de7039cd277459c0629abfab9f21 (diff)
Remove critical path in shutdown ..
Diffstat (limited to 'src')
-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;
}