diff options
3 files changed, 16 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java index 21de61ff8..3cf691493 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java @@ -47,6 +47,7 @@ import javax.media.nativewindow.*; import com.jogamp.opengl.impl.*; import com.jogamp.gluegen.runtime.ProcAddressTable; import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; +import com.jogamp.nativewindow.impl.x11.X11Util; public abstract class X11GLXContext extends GLContextImpl { private boolean glXQueryExtensionsStringInitialized; @@ -106,11 +107,18 @@ public abstract class X11GLXContext extends GLContextImpl { protected Map/*<String, String>*/ getExtensionNameMap() { return extensionNameMap; } + protected static final boolean TRACE_CONTEXT_CURRENT = false; // true; + protected boolean glXMakeContextCurrent(long dpy, long writeDrawable, long readDrawable, long ctx) { boolean res = false; try { - // at least on ATI we receive 'often' SEGV in case of + if(TRACE_CONTEXT_CURRENT) { + Throwable t = new Throwable(Thread.currentThread()+" - glXMakeContextCurrent("+toHexString(dpy)+", "+ + toHexString(writeDrawable)+", "+toHexString(readDrawable)+", "+toHexString(ctx)+")"); + t.printStackTrace(); + } + // at least on ATI we receive 'often' SEGV in case of // highly multithreaded MakeContextCurrent calls with writeDrawable==readDrawable if(writeDrawable==readDrawable) { res = GLX.glXMakeCurrent(dpy, writeDrawable, ctx); diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/NullToolkitLock.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/NullToolkitLock.java index 5a03cba7f..db4db1126 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/impl/NullToolkitLock.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/NullToolkitLock.java @@ -41,7 +41,12 @@ public class NullToolkitLock implements ToolkitLock { protected NullToolkitLock() { } public final void lock() { - if(TRACE_LOCK) { System.err.println("NullToolkitLock.lock()"); } + if(TRACE_LOCK) { + String msg = "NullToolkitLock.lock()"; + System.err.println(msg); + // Throwable t = new Throwable(msg); + // t.printStackTrace(); + } } public final void unlock() { diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c index 31d57240f..57bc6fc59 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); + // x11IOErrorHandlerEnable(1, env); // JAU FIXME: can't enable without disable _initialized=1; } } |