diff options
author | Sven Gothel <[email protected]> | 2010-10-26 23:23:39 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-10-26 23:23:39 +0200 |
commit | a4e3f241cfba55e407c68eba91ffcc4beb0758b5 (patch) | |
tree | d8cf0193ae6186cf77da96c5ea5f30523e295f89 /src/nativewindow | |
parent | d52181032830acdd5e4069a41ccd0daff5922d8a (diff) |
Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6; Misc ..
Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6
- Workaround in TestGLWindows01NEWT: same create/destroy order
- Prove bug with simple native test app: jogl/test/native/displayMultiple02.c
Misc:
- Reverted d52181032830acdd5e4069a41ccd0daff5922d8a, ie reenable x11IOErrorHandler (nativewindow)
- GLDrawableHelper: methods -> final
- X11Util.NamedDisplay: remove unused RecursiveLock, Cloneable
Diffstat (limited to 'src/nativewindow')
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java | 21 | ||||
-rw-r--r-- | src/nativewindow/native/x11/Xmisc.c | 2 |
2 files changed, 18 insertions, 5 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java index 5e89e9f50..14e285187 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java @@ -126,7 +126,7 @@ public class X11Util { private static ThreadLocal currentDisplayMap = new ThreadLocal(); - public static class NamedDisplay extends RecursiveLock implements Cloneable { + public static class NamedDisplay { String name; long handle; int refCount; @@ -142,6 +142,8 @@ public class X11Util { public final String getName() { return name; } public final long getHandle() { return handle; } public final int getRefCount() { return refCount; } + + public void setUncloseable(boolean v) { unCloseable = v; } public final boolean isUncloseable() { return unCloseable; } public Object clone() throws CloneNotSupportedException { @@ -158,9 +160,9 @@ public class X11Util { */ public static int shutdown(boolean realXClosePendingDisplays, boolean verbose) { int num=0; - String msg = null; if(DEBUG||verbose) { - msg = "X11Util.Display: Shutdown (global: "+globalNamedDisplayMap.size()+ ")" ; + String msg = "X11Util.Display: Shutdown (closePendingDisplays: "+realXClosePendingDisplays+ + ", global: "+globalNamedDisplayMap.size()+ ")" ; if(DEBUG) { Exception e = new Exception(msg); e.printStackTrace(); @@ -269,7 +271,7 @@ public class X11Util { ndpy = (NamedDisplay) globalNamedDisplayMap.get(handle); } if( null != ndpy ) { - ndpy.unCloseable=true; + ndpy.setUncloseable(true); return true; } return false; @@ -355,11 +357,22 @@ public class X11Util { throw new RuntimeException("X11Util.Display: Display(0x"+Long.toHexString(handle)+") Mapping error: "+namedDpy+". Thread "+Thread.currentThread().getName()); } + if(DEBUG) { + Exception e = new Exception("X11Util.Display: Closing new "+namedDpy+". Thread "+Thread.currentThread().getName()); + e.printStackTrace(); + } + if(!namedDpy.isUncloseable()) { XCloseDisplay(namedDpy.getHandle()); } } + public static NamedDisplay getNamedDisplay(long handle) { + synchronized(globalLock) { + return (NamedDisplay) globalNamedDisplayMap.get(handle); + } + } + /** * @return If name is null, it returns the previous queried NULL display name, * otherwise the name. */ diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c index 57bc6fc59..31d57240f 100644 --- a/src/nativewindow/native/x11/Xmisc.c +++ b/src/nativewindow/native/x11/Xmisc.c @@ -253,7 +253,7 @@ Java_com_jogamp_nativewindow_impl_x11_X11Util_initialize(JNIEnv *env, jclass _un } _initClazzAccess(env); - // x11IOErrorHandlerEnable(1, env); // JAU FIXME: can't enable without disable + x11IOErrorHandlerEnable(1, env); _initialized=1; } } |