summaryrefslogtreecommitdiffstats
path: root/src/nativewindow
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/nativewindow
parent729f4ef2d7e1bbb2748d71998046818aeabcd558 (diff)
Use ExceptionUtils.dumpStack(..) instead of Thread.dumpStack()
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java7
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java4
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java3
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java4
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java5
5 files changed, 15 insertions, 8 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
index 6498ebd1e..32e4add75 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
@@ -37,6 +37,7 @@
package com.jogamp.nativewindow.awt;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.os.Platform;
import com.jogamp.common.util.awt.AWTEDTExecutor;
import com.jogamp.common.util.locks.LockFactory;
@@ -558,7 +559,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
surfaceLock.unlock();
if(DEBUG) {
System.err.println("JAWTWindow: Can't lock surface, component peer n/a. Component displayable "+component.isDisplayable()+", "+component);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
} else {
determineIfApplet();
@@ -765,7 +766,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
// avoid deadlock ..
if(DEBUG) {
System.err.println("Warning: JAWT Lock hold, but not the AWT tree lock: "+this);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
if( null == storage ) {
storage = new Point();
@@ -788,7 +789,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
if(LOCK_SURFACE_NOT_READY == lockRes) {
if(DEBUG) {
System.err.println("Warning: JAWT Lock couldn't be acquired: "+this);
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
return null;
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
index 3f8113baa..c73f544b0 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
@@ -33,7 +33,9 @@
package javax.media.nativewindow;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.util.ReflectionUtil;
+
import jogamp.nativewindow.Debug;
import jogamp.nativewindow.DefaultGraphicsConfigurationFactoryImpl;
@@ -226,7 +228,7 @@ public abstract class GraphicsConfigurationFactory {
throw new IllegalArgumentException("Given capabilities class must implement CapabilitiesImmutable");
}
if(DEBUG) {
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
System.err.println("GraphicsConfigurationFactory.getFactory: "+deviceType.getName()+", "+capabilitiesType.getName());
dumpFactories();
}
diff --git a/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java
index 881fd56a6..b187921e4 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java
@@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.media.nativewindow.ToolkitLock;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.util.LongObjectHashMap;
import com.jogamp.common.util.locks.LockFactory;
import com.jogamp.common.util.locks.RecursiveLock;
@@ -63,7 +64,7 @@ public class SharedResourceToolkitLock implements ToolkitLock {
if(DEBUG || verbose || handle2Lock.size() > 0 ) {
System.err.println("SharedResourceToolkitLock: Shutdown (open: "+handle2Lock.size()+")");
if(DEBUG) {
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
if( handle2Lock.size() > 0) {
dumpOpenDisplayConnections();
diff --git a/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java b/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java
index c409b6a39..b3cd977d4 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java
@@ -31,6 +31,8 @@ import javax.media.nativewindow.util.Point;
import javax.media.nativewindow.NativeWindowException;
import javax.media.nativewindow.NativeWindowFactory;
+import com.jogamp.common.ExceptionUtils;
+
import jogamp.nativewindow.NWJNILibLoader;
import jogamp.nativewindow.Debug;
import jogamp.nativewindow.ToolkitProperties;
@@ -132,7 +134,7 @@ public class GDIUtil implements ToolkitProperties {
SetProcessThreadsAffinityMask0(affinityMask, verbose);
}
- private static final void dumpStack() { Thread.dumpStack(); } // Callback for JNI
+ private static final void dumpStack() { ExceptionUtils.dumpStack(System.err); } // Callback for JNI
/** Creates WNDCLASSEX instance */
static native boolean CreateWindowClass0(long hInstance, String clazzName, long wndProc, long iconSmallHandle, long iconBigHandle);
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
index 2414248b4..786be7cd7 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
@@ -45,6 +45,7 @@ import jogamp.nativewindow.Debug;
import jogamp.nativewindow.NWJNILibLoader;
import jogamp.nativewindow.ToolkitProperties;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.util.LongObjectHashMap;
import com.jogamp.common.util.PropertyAccess;
import com.jogamp.nativewindow.x11.X11GraphicsDevice;
@@ -196,7 +197,7 @@ public class X11Util implements ToolkitProperties {
", pending (open in creation order): "+pendingDisplayList.size()+
")");
if(DEBUG) {
- Thread.dumpStack();
+ ExceptionUtils.dumpStack(System.err);
}
if( openDisplayList.size() > 0) {
X11Util.dumpOpenDisplayConnections();
@@ -615,7 +616,7 @@ public class X11Util implements ToolkitProperties {
}
private static final String getCurrentThreadName() { return Thread.currentThread().getName(); } // Callback for JNI
- private static final void dumpStack() { Thread.dumpStack(); } // Callback for JNI
+ private static final void dumpStack() { ExceptionUtils.dumpStack(System.err); } // Callback for JNI
private static native boolean initialize0(boolean debug);
private static native void shutdown0();