summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-10-26 02:22:50 +0100
committerSven Gothel <[email protected]>2014-10-26 02:22:50 +0100
commit74fe4c340162e973e86c0e405de915cea8c72ec4 (patch)
treeb091c707e9532ee8bd085c326a080f2a71f59386 /src/jogl/classes/jogamp
parent729f4ef2d7e1bbb2748d71998046818aeabcd558 (diff)
Use ExceptionUtils.dumpStack(..) instead of Thread.dumpStack()
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java17
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java19
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java3
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableHelper.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableImpl.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java7
-rw-r--r--src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java10
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java9
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java9
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java5
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java3
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java5
13 files changed, 55 insertions, 44 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java b/src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java
index 7e49b3464..f278f73ae 100644
--- a/src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java
+++ b/src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java
@@ -34,6 +34,7 @@ import java.nio.IntBuffer;
import javax.media.opengl.*;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.util.IntObjectHashMap;
import com.jogamp.common.util.PropertyAccess;
@@ -266,7 +267,7 @@ public class GLBufferObjectTracker {
if( null == objOld ) {
if (DEBUG) {
System.err.printf("%s: %s.notifyBuffersDeleted()[%d/%d]: Buffer %d not tracked%n", warning, msgClazzName, i+1, count, bufferName);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return;
}
@@ -409,7 +410,7 @@ public class GLBufferObjectTracker {
if ( 0 == addr ) {
if( DEBUG ) {
System.err.printf("%s.%s: %s MapBuffer null result for target 0x%X -> %d: %s, off %d, len %d, acc 0x%X%n", msgClazzName, msgMapBuffer, warning, target, bufferName, store, offset, length, access);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
// User shall handle the glError !
} else {
@@ -442,14 +443,14 @@ public class GLBufferObjectTracker {
if( 0 == bufferName ) {
if (DEBUG) {
System.err.printf("%s: %s.%s: Buffer for target 0x%X not bound%n", warning, msgClazzName, msgUnmapped, target);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
store = null;
} else {
store = (GLBufferStorageImpl) bufferName2StorageMap.get(bufferName);
if( DEBUG && null == store ) {
System.err.printf("%s: %s.%s: Buffer %d not tracked%n", warning, msgClazzName, msgUnmapped, bufferName);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
final boolean res = dispatch.unmap(target, glProcAddress);
@@ -459,7 +460,7 @@ public class GLBufferObjectTracker {
if( DEBUG ) {
System.err.printf("%s.%s %s target: 0x%X -> %d: %s%n", msgClazzName, msgUnmapped, res ? "OK" : "Failed", target, bufferName, store.toString(false));
if(!res) {
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
return res;
@@ -476,7 +477,7 @@ public class GLBufferObjectTracker {
final GLBufferStorageImpl store = (GLBufferStorageImpl) bufferName2StorageMap.get(bufferName);
if (DEBUG && null == store ) {
System.err.printf("%s: %s.%s: Buffer %d not tracked%n", warning, msgClazzName, msgUnmapped, bufferName);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
final boolean res = dispatch.unmap(bufferName, glProcAddress);
if( res && null != store ) {
@@ -485,7 +486,7 @@ public class GLBufferObjectTracker {
if (DEBUG) {
System.err.printf("%s.%s %s %d: %s%n", msgClazzName, msgUnmapped, res ? "OK" : "Failed", bufferName, store.toString(false));
if(!res) {
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
return res;
@@ -505,7 +506,7 @@ public class GLBufferObjectTracker {
public synchronized final void clear() {
if (DEBUG) {
System.err.printf("%s.clear() - Thread %s%n", msgClazzName, Thread.currentThread().getName());
- // Thread.dumpStack();
+ // ExceptionUtils.dumpStackTrace(System.err);
}
bufferName2StorageMap.clear();
}
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index bf860e92c..2a224fd0e 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -48,6 +48,7 @@ import java.security.PrivilegedAction;
import java.util.HashMap;
import java.util.Map;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.os.DynamicLookupHelper;
import com.jogamp.common.os.Platform;
import com.jogamp.common.util.ReflectionUtil;
@@ -305,7 +306,7 @@ public abstract class GLContextImpl extends GLContext {
final String sgl1 = (null!=this.gl)?this.gl.getClass().getSimpleName()+", "+this.gl.toString():"<null>";
final String sgl2 = (null!=gl)?gl.getClass().getSimpleName()+", "+gl.toString():"<null>";
System.err.println("Info: setGL (OpenGL "+getGLVersion()+"): "+getThreadName()+", "+sgl1+" -> "+sgl2);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
this.gl = gl;
return gl;
@@ -383,7 +384,7 @@ public abstract class GLContextImpl extends GLContext {
lastCtxReleaseStack = new Throwable(msg);
if( TRACE_SWITCH ) {
System.err.println(msg);
- // Thread.dumpStack();
+ // ExceptionUtils.dumpStackTrace(System.err, 0, 10);
}
}
}
@@ -419,7 +420,7 @@ public abstract class GLContextImpl extends GLContext {
if ( DEBUG_TRACE_SWITCH ) {
if ( lock.getHoldCount() > 2 ) {
System.err.println(getThreadName() + ": GLContextImpl.destroy: Lock was hold more than once - makeCurrent/release imbalance: "+getTraceSwitchMsg());
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
try {
@@ -712,7 +713,7 @@ public abstract class GLContextImpl extends GLContext {
}
if ( DEBUG_TRACE_SWITCH ) {
System.err.println(getThreadName() + ": Create GL context "+(created?"OK":"FAILED")+": For " + getClass().getName()+" - "+getGLVersion()+" - "+getTraceSwitchMsg());
- // Thread.dumpStack();
+ // ExceptionUtils.dumpStackTrace(System.err, 0, 10);
}
if(!created) {
return CONTEXT_NOT_CURRENT;
@@ -1296,7 +1297,7 @@ public abstract class GLContextImpl extends GLContext {
if(0 == _glGetString) {
System.err.println("Error: Entry point to 'glGetString' is NULL.");
if(DEBUG) {
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return false;
} else {
@@ -1304,7 +1305,7 @@ public abstract class GLContextImpl extends GLContext {
if(null == _glVendor) {
if(DEBUG) {
System.err.println("Warning: GL_VENDOR is NULL.");
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return false;
}
@@ -1314,7 +1315,7 @@ public abstract class GLContextImpl extends GLContext {
if(null == _glRenderer) {
if(DEBUG) {
System.err.println("Warning: GL_RENDERER is NULL.");
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return false;
}
@@ -1326,7 +1327,7 @@ public abstract class GLContextImpl extends GLContext {
// FIXME
if(DEBUG) {
System.err.println("Warning: GL_VERSION is NULL.");
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return false;
}
@@ -1370,7 +1371,7 @@ public abstract class GLContextImpl extends GLContext {
if( 0 == _glGetIntegerv ) {
System.err.println("Error: Entry point to 'glGetIntegerv' is NULL.");
if(DEBUG) {
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return false;
} else {
diff --git a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java
index 7519d568b..e682431a9 100644
--- a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java
+++ b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java
@@ -33,13 +33,13 @@ import java.util.ArrayList;
import javax.media.nativewindow.NativeWindowException;
import javax.media.opengl.GL2ES2;
-import javax.media.opengl.GL2GL3;
import javax.media.opengl.GLDebugListener;
import javax.media.opengl.GLDebugMessage;
import javax.media.opengl.GLException;
import jogamp.common.os.PlatformPropsImpl;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.os.Platform;
import com.jogamp.gluegen.runtime.ProcAddressTable;
import com.jogamp.opengl.GLExtensions;
@@ -308,7 +308,7 @@ public class GLDebugMessageHandler {
public void messageSent(final GLDebugMessage event) {
System.err.println(event);
if(threadDump) {
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
}
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
index b51f290e9..d7868c6dd 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
@@ -67,6 +67,7 @@ import javax.media.opengl.GLFBODrawable;
import javax.media.opengl.GLOffscreenAutoDrawable;
import javax.media.opengl.GLProfile;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.nativewindow.MutableGraphicsConfiguration;
import com.jogamp.nativewindow.DelegatedUpstreamSurfaceHookWithSurfaceSize;
import com.jogamp.nativewindow.UpstreamSurfaceHookMutableSize;
@@ -195,7 +196,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
System.err.println("chosenCapsMod: "+chosenCapsMod);
System.err.println("OffscreenLayerSurface: **** "+ols);
System.err.println("Target: **** "+target);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
if( ! ( target instanceof MutableSurface ) ) {
throw new IllegalArgumentException("Passed NativeSurface must implement SurfaceChangeable for offscreen layered surface: "+target);
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
index 3847b4042..6982418a9 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
@@ -355,7 +355,7 @@ public class GLDrawableHelper {
}
if( DEBUG && ( 0>=newWidth || 0>=newHeight) ) {
System.err.println("WARNING: Odd size detected: "+newWidth+"x"+newHeight+", using safe size 1x1. Drawable "+drawable);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
if( 0 >= newWidth ) { newWidth = 1; validateSize=false; }
if( 0 >= newHeight ) { newHeight = 1; validateSize=false; }
@@ -734,7 +734,7 @@ public class GLDrawableHelper {
final int glerr0 = drawable.getGL().glGetError();
if( GL.GL_NO_ERROR != glerr0 ) {
System.err.println("Info: GLDrawableHelper.reshape: pre-exisiting GL error 0x"+Integer.toHexString(glerr0));
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
drawable.getGL().glViewport(x, y, width, height);
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
index 544aaf064..7cd887fee 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
@@ -51,6 +51,8 @@ import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLException;
import javax.media.opengl.GLProfile;
+import com.jogamp.common.ExceptionUtils;
+
public abstract class GLDrawableImpl implements GLDrawable {
protected static final boolean DEBUG = GLDrawableFactoryImpl.DEBUG;
@@ -176,7 +178,7 @@ public abstract class GLDrawableImpl implements GLDrawable {
final boolean isProxySurface = surface instanceof ProxySurface;
if(DEBUG) {
System.err.println(getThreadName() + ": setRealized: drawable "+getClass().getSimpleName()+", surface "+surface.getClass().getSimpleName()+", isProxySurface "+isProxySurface+": "+realized+" -> "+realizedArg);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
final AbstractGraphicsDevice aDevice = surface.getGraphicsConfiguration().getScreen().getDevice();
if(realizedArg) {
diff --git a/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
index 991a351e6..579dc27dc 100644
--- a/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
@@ -11,6 +11,7 @@ import javax.media.opengl.GLContext;
import javax.media.opengl.GLException;
import javax.media.opengl.GLFBODrawable;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.VersionUtil;
import com.jogamp.nativewindow.MutableGraphicsConfiguration;
@@ -171,7 +172,7 @@ public class GLFBODrawableImpl extends GLDrawableImpl implements GLFBODrawable {
if( !initialized && !realize ) {
if( DEBUG ) {
System.err.println("GLFBODrawableImpl.initialize(): WARNING - Already unrealized!");
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return; // NOP, no exception for de-init twice or no init!
}
@@ -233,7 +234,7 @@ public class GLFBODrawableImpl extends GLDrawableImpl implements GLFBODrawable {
if(DEBUG) {
System.err.println("GLFBODrawableImpl.initialize("+realize+"): "+this);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
@@ -284,7 +285,7 @@ public class GLFBODrawableImpl extends GLDrawableImpl implements GLFBODrawable {
final boolean ctxSwitch = null != curContext && curContext != ourContext;
if(DEBUG) {
System.err.println("GLFBODrawableImpl.reset(newSamples "+newSamples+"): BEGIN - ctxSwitch "+ctxSwitch+", "+this);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
Throwable tFBO = null;
Throwable tGL = null;
diff --git a/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java b/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java
index 003b9148e..562d4883d 100644
--- a/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java
+++ b/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java
@@ -33,6 +33,7 @@ import java.util.Arrays;
import jogamp.opengl.Debug;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.util.LFRingbuffer;
import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.Ringbuffer;
@@ -262,7 +263,7 @@ public class ALAudioSink implements AudioSink {
if( ALCConstants.ALC_NO_ERROR != alcErr ) {
final String err = getThreadName()+": ALCError "+toHexString(alcErr)+" while makeCurrent. "+this;
System.err.println(err);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
lock.unlock();
throw new RuntimeException(err);
}
@@ -270,7 +271,7 @@ public class ALAudioSink implements AudioSink {
if( ALCConstants.ALC_NO_ERROR != alErr ) {
if( DEBUG ) {
System.err.println(getThreadName()+": Prev - ALError "+toHexString(alErr)+" @ makeCurrent. "+this);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
}
@@ -290,8 +291,7 @@ public class ALAudioSink implements AudioSink {
alc.alcDestroyContext(context);
} catch (final Throwable t) {
if( DEBUG ) {
- System.err.println("Caught "+t.getClass().getName()+": "+t.getMessage());
- t.printStackTrace();
+ ExceptionUtils.dumpThrowable("", t);
}
}
context = null;
@@ -652,7 +652,7 @@ public class ALAudioSink implements AudioSink {
alBufferBytesQueued = 0;
if(DEBUG_TRACE) {
System.err.println("<< _FLUSH_ [al "+val[0]+", err "+toHexString(alErr)+"] <- "+shortString()+" @ "+getThreadName());
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
index 5785f8041..c29972fca 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
@@ -48,6 +48,7 @@ import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLException;
import javax.media.opengl.GLProfile;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.nio.Buffers;
import com.jogamp.nativewindow.MutableGraphicsConfiguration;
import com.jogamp.opengl.GLRendererQuirks;
@@ -281,7 +282,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
System.err.println("GetPixelFormatAttribivARB: Failed - HDC 0x" + Long.toHexString(hdc) +
", value "+iresults.get(0)+
", LastError: " + GDI.GetLastError());
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return 0;
}
@@ -290,7 +291,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
if(DEBUG) {
System.err.println("GetPixelFormatAttribivARB: No formats - HDC 0x" + Long.toHexString(hdc) +
", LastError: " + GDI.GetLastError());
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
}
return pfdIDCount;
@@ -351,7 +352,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
iattributes, accelerationMode, null) ) {
if (DEBUG) {
System.err.println("wglChoosePixelFormatARB: GLCapabilities2AttribList failed: " + GDI.GetLastError());
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return null;
}
@@ -365,7 +366,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
pformatsTmp, numFormatsTmp) ) {
if (DEBUG) {
System.err.println("wglChoosePixelFormatARB: wglChoosePixelFormatARB failed: " + GDI.GetLastError());
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return null;
}
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
index ea9b86712..5d2df4784 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
@@ -50,6 +50,7 @@ import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLException;
import javax.media.opengl.GLProfile;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.nio.Buffers;
import com.jogamp.opengl.GLRendererQuirks;
@@ -417,7 +418,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
if (null == pformats) {
if (DEBUG) {
System.err.println("updateGraphicsConfigurationARB: failed, return false");
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return false;
}
@@ -431,7 +432,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
if( null == availableCaps || 0 == availableCaps.size() ) {
if (DEBUG) {
System.err.println("updateGraphicsConfigurationARB: wglARBPFIDs2GLCapabilities failed with " + pformats.length + " pfd ids");
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return false;
}
@@ -453,7 +454,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
}
if ( 0 > chosenIndex ) {
if (DEBUG) {
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return false;
}
@@ -603,7 +604,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
if ( 0 > chosenIndex ) {
if (DEBUG) {
System.err.println("updateGraphicsConfigurationGDI: failed, return false");
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return false;
}
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index 9631dbb5b..5f6960911 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -59,6 +59,7 @@ import jogamp.opengl.GLContextImpl;
import jogamp.opengl.GLDrawableImpl;
import jogamp.opengl.GLXExtensions;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.util.VersionNumber;
import com.jogamp.gluegen.runtime.ProcAddressTable;
@@ -258,8 +259,8 @@ public class X11GLXContext extends GLContextImpl {
ctx = _glXExt.glXCreateContextAttribsARB(display, config.getFBConfig(), share, direct, attribs);
} catch (final RuntimeException re) {
if(DEBUG) {
- final Throwable t = new Throwable(getThreadName()+": Info: X11GLXContext.createContextARBImpl glXCreateContextAttribsARB failed with "+getGLVersion(major, minor, ctp, "@creation"), re);
- t.printStackTrace();
+ System.err.println(getThreadName()+": Info: X11GLXContext.createContextARBImpl glXCreateContextAttribsARB failed with "+getGLVersion(major, minor, ctp, "@creation"));
+ ExceptionUtils.dumpThrowable("", re);
}
}
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
index 60e4438d0..65cb3c31d 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
@@ -72,6 +72,7 @@ import jogamp.opengl.GLDynamicLookupHelper;
import jogamp.opengl.GLGraphicsConfigurationUtil;
import jogamp.opengl.SharedResourceRunner;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.util.VersionNumber;
import com.jogamp.nativewindow.x11.X11GraphicsDevice;
@@ -329,7 +330,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
System.err.println("Screen : " + sr.screen);
System.err.println("Drawable: " + sr.drawable);
System.err.println("CTX : " + sr.context);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
if (null != sr.context) {
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index 44479acc0..caa336d5a 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -49,6 +49,7 @@ import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLException;
import javax.media.opengl.GLProfile;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.nativewindow.x11.X11GraphicsDevice;
@@ -375,7 +376,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
if ( 0 > chosenIndex ) {
if (DEBUG) {
System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: failed, return null");
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return null;
}
@@ -472,7 +473,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
if ( 0 > chosenIndex ) {
if (DEBUG) {
System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationXVisual: failed, return null");
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return null;
}