Changed a bunch of Thread.dumpStack() calls into stack traces properly logged
via the logging system. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@788 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
+8
-4
@@ -1,14 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry excluding="**/.svn/|com/threerings/jme/" kind="src" output="dist/classes" path="src/java"/>
|
||||
<classpathentry excluding="**/.svn/|com/threerings/jme/" kind="src" output="tests/dist/classes" path="tests/src/java"/>
|
||||
<classpathentry excluding="**/.svn/**" kind="src" output="dist/classes" path="src/java"/>
|
||||
<classpathentry excluding="**/.svn/**" kind="src" output="tests/dist/classes" path="tests/src/java"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/narya"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/xml-writer.jar"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/jogg-0.0.7.jar"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/jorbis-0.0.15.jar"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/lwjgl/lwjgl.jar"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/jl1.0.jar"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/jme/jme.jar"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/jme/jme-effects.jar"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/jme/jme-model.jar"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/lwjgl/lwjgl.jar"/>
|
||||
<classpathentry exported="true" kind="var" path="EXT_LIBS_DIR/lwjgl/lwjgl_util.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/narya"/>
|
||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/jme-bui"/>
|
||||
</classpath>
|
||||
|
||||
@@ -129,8 +129,7 @@ public class CharacterSprite extends ImageSprite
|
||||
{
|
||||
// sanity check
|
||||
if (action == null) {
|
||||
log.warning("Refusing to set null action sequence " + this + ".");
|
||||
Thread.dumpStack();
|
||||
log.warning("Refusing to set null action sequence " + this + ".", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -147,8 +146,7 @@ public class CharacterSprite extends ImageSprite
|
||||
{
|
||||
if (orient < 0 || orient >= FINE_DIRECTION_COUNT) {
|
||||
log.info("Refusing to set invalid orientation [sprite=" + this +
|
||||
", orient=" + orient + "].");
|
||||
Thread.dumpStack();
|
||||
", orient=" + orient + "].", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -285,8 +283,7 @@ public class CharacterSprite extends ImageSprite
|
||||
if (_descrip.getComponentIds() == null ||
|
||||
_descrip.getComponentIds().length == 0) {
|
||||
log.warning("Invalid character descriptor [sprite=" + this +
|
||||
", descrip=" + _descrip + "].");
|
||||
Thread.dumpStack();
|
||||
", descrip=" + _descrip + "].", new Exception());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -202,8 +202,8 @@ public class GeomUtil
|
||||
public static Rectangle grow (Rectangle source, Rectangle target)
|
||||
{
|
||||
if (target == null) {
|
||||
log.warning("Can't grow with null rectangle [src=" + source + ", tgt=" + target + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("Can't grow with null rectangle [src=" + source + ", tgt=" + target + "].",
|
||||
new Exception());
|
||||
} else if (source == null) {
|
||||
source = new Rectangle(target);
|
||||
} else {
|
||||
|
||||
@@ -162,8 +162,7 @@ public class Sprite extends Node
|
||||
{
|
||||
if (_path == null) {
|
||||
log.warning("pathCompleted() called on pathless sprite " +
|
||||
"(re-completed?) [sprite=" + this + "].");
|
||||
Thread.dumpStack();
|
||||
"(re-completed?) [sprite=" + this + "].", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,8 +128,7 @@ public abstract class AbstractMediaManager
|
||||
public void fastForward (long timeDelta)
|
||||
{
|
||||
if (_tickStamp > 0) {
|
||||
log.warning("Egads! Asked to fastForward() during a tick.");
|
||||
Thread.dumpStack();
|
||||
log.warning("Egads! Asked to fastForward() during a tick.", new Exception());
|
||||
}
|
||||
|
||||
for (int ii = 0, nn = _media.size(); ii < nn; ii++) {
|
||||
@@ -165,8 +164,7 @@ public abstract class AbstractMediaManager
|
||||
public void renderOrderDidChange (AbstractMedia media)
|
||||
{
|
||||
if (_tickStamp > 0) {
|
||||
log.warning("Egads! Render order changed during a tick.");
|
||||
Thread.dumpStack();
|
||||
log.warning("Egads! Render order changed during a tick.", new Exception());
|
||||
}
|
||||
|
||||
_media.remove(media);
|
||||
@@ -193,8 +191,8 @@ public abstract class AbstractMediaManager
|
||||
protected boolean insertMedia (AbstractMedia media)
|
||||
{
|
||||
if (_media.contains(media)) {
|
||||
log.warning("Attempt to insert media more than once [media=" + media + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("Attempt to insert media more than once [media=" + media + "].",
|
||||
new Exception());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -256,8 +254,7 @@ public abstract class AbstractMediaManager
|
||||
protected void clearMedia ()
|
||||
{
|
||||
if (_tickStamp > 0) {
|
||||
log.warning("Egads! Requested to clearMedia() during a tick.");
|
||||
Thread.dumpStack();
|
||||
log.warning("Egads! Requested to clearMedia() during a tick.", new Exception());
|
||||
}
|
||||
|
||||
for (int ii = _media.size() - 1; ii >= 0; ii--) {
|
||||
@@ -289,7 +286,8 @@ public abstract class AbstractMediaManager
|
||||
}
|
||||
|
||||
/** Used to sort media by render order. */
|
||||
protected static final Comparator<AbstractMedia> RENDER_ORDER = new Comparator<AbstractMedia>() {
|
||||
protected static final Comparator<AbstractMedia> RENDER_ORDER =
|
||||
new Comparator<AbstractMedia>() {
|
||||
public int compare (AbstractMedia am1, AbstractMedia am2) {
|
||||
return am1.renderCompareTo(am2);
|
||||
}
|
||||
|
||||
@@ -298,8 +298,7 @@ public class MediaPanel extends JComponent
|
||||
public void setOpaque (boolean opaque)
|
||||
{
|
||||
if (!opaque) {
|
||||
log.warning("Media panels shouldn't be setOpaque(false).");
|
||||
Thread.dumpStack();
|
||||
log.warning("Media panels shouldn't be setOpaque(false).", new Exception());
|
||||
}
|
||||
super.setOpaque(true);
|
||||
}
|
||||
@@ -435,8 +434,7 @@ public class MediaPanel extends JComponent
|
||||
Rectangle clip = dirty[ii];
|
||||
// sanity-check the dirty rectangle
|
||||
if (clip == null) {
|
||||
log.warning("Found null dirty rect painting media panel?!");
|
||||
Thread.dumpStack();
|
||||
log.warning("Found null dirty rect painting media panel?!", new Exception());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,14 +68,13 @@ public class RegionManager
|
||||
{
|
||||
// make sure we're on an AWT thread
|
||||
if (!EventQueue.isDispatchThread()) {
|
||||
log.warning("Oi! Region dirtied on non-AWT thread [rect=" + rect + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("Oi! Region dirtied on non-AWT thread [rect=" + rect + "].",
|
||||
new Exception());
|
||||
}
|
||||
|
||||
// sanity check
|
||||
if (rect == null) {
|
||||
log.warning("Attempt to dirty a null rect!?");
|
||||
Thread.dumpStack();
|
||||
log.warning("Attempt to dirty a null rect!?", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,8 +97,7 @@ public class RegionManager
|
||||
{
|
||||
if (width < 0 || height < 0) {
|
||||
log.warning("Attempt to add invalid dirty region?! " +
|
||||
"[size=" + width + "x" + height + "].");
|
||||
Thread.dumpStack();
|
||||
"[size=" + width + "x" + height + "].", new Exception());
|
||||
return false;
|
||||
|
||||
} else if (width == 0 || height == 0) {
|
||||
|
||||
@@ -382,8 +382,7 @@ public class ColorPository implements Serializable
|
||||
return crec;
|
||||
}
|
||||
}
|
||||
log.warning("No such color class [class=" + className + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("No such color class [class=" + className + "].", new Exception());
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -397,10 +396,8 @@ public class ColorPository implements Serializable
|
||||
// if they request color class zero, we assume they're just
|
||||
// decoding a blank colorprint, otherwise we complain
|
||||
if (classId != 0) {
|
||||
log.warning("Requested unknown color class " +
|
||||
"[classId=" + classId +
|
||||
", colorId=" + colorId + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("Requested unknown color class [classId=" + classId +
|
||||
", colorId=" + colorId + "].", new Exception());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -414,9 +411,8 @@ public class ColorPository implements Serializable
|
||||
{
|
||||
ClassRecord record = getClassRecord(className);
|
||||
if (record == null) {
|
||||
log.warning("Requested unknown color class " +
|
||||
"[className=" + className + ", colorName=" + colorName + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("Requested unknown color class [className=" + className +
|
||||
", colorName=" + colorName + "].", new Exception());
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -323,8 +323,8 @@ public abstract class TileSet
|
||||
if (tileIndex >= 0 && tileIndex < tcount) {
|
||||
return true;
|
||||
} else {
|
||||
log.warning("Requested invalid tile [tset=" + this + ", index=" + tileIndex + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("Requested invalid tile [tset=" + this + ", index=" + tileIndex + "].",
|
||||
new Exception());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,8 +38,7 @@ public abstract class TimedPath implements Path
|
||||
// sanity check some things
|
||||
if (duration <= 0) {
|
||||
log.warning("Requested path with illegal duration (<=0) " +
|
||||
"[duration=" + duration + "]");
|
||||
Thread.dumpStack();
|
||||
"[duration=" + duration + "]", new Exception());
|
||||
duration = 1; // assume something short but non-zero
|
||||
}
|
||||
|
||||
|
||||
@@ -51,8 +51,7 @@ public class ObjectSet
|
||||
// log a warning because the caller shouldn't be doing this
|
||||
log.warning("Requested to add an object to a set that already " +
|
||||
"contains such an object [ninfo=" + info +
|
||||
", oinfo=" + _objs[ipos] + "].");
|
||||
Thread.dumpStack();
|
||||
", oinfo=" + _objs[ipos] + "].", new Exception());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,8 +138,7 @@ public class KeyboardManager
|
||||
{
|
||||
// report incorrect usage
|
||||
if (enabled && _target == null) {
|
||||
log.warning("Attempt to enable uninitialized keyboard manager!");
|
||||
Thread.dumpStack();
|
||||
log.warning("Attempt to enable uninitialized keyboard manager!", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user