Actually, I'm beginning to think it's the following method (though the JVM's message doesn't get that far). Note that I left commented-out code that isn't always commented out. Just before the ArrayIndexOutOfBoundsException, "Left drawAxisRep()" doesn't get printed. And yes, it only happens with the hardware renderer:
private void drawAxisRep() {
SimpleVector position = xWing.getTransformedCenter();
SimpleVector xPoint1 = Interact2D.project3D2D(camera, buffer, new SimpleVector(position.x-8f, position.y, position.z));
SimpleVector xPoint2 = Interact2D.project3D2D(camera, buffer, new SimpleVector(position.x+8f, position.y, position.z));
SimpleVector yPoint1 = Interact2D.project3D2D(camera, buffer, new SimpleVector(position.x, position.y-8f, position.z));
SimpleVector yPoint2 = Interact2D.project3D2D(camera, buffer, new SimpleVector(position.x, position.y+8f, position.z));
SimpleVector zPoint1 = Interact2D.project3D2D(camera, buffer, new SimpleVector(position.x, position.y, position.z-8f));
SimpleVector zPoint2 = Interact2D.project3D2D(camera, buffer, new SimpleVector(position.x, position.y, position.z+8f));
Graphics2D g = null;
// if (software)
g = (Graphics2D)buffer.getGraphics();
/* else {
Drawable drawable = Display.getDrawable();
if (drawable instanceof AWTGLCanvas)
// g =(Graphics2D) ((AWTGLCanvas)drawable).getGraphics();
g = awtGlCanvas.getGraphics();
}
*/
if (g == null)
return;
g.setStroke(new BasicStroke(4));
g.translate(300, 200);
g.setColor(Color.red);
g.drawLine((int)xPoint1.x, (int)xPoint1.y, (int)xPoint2.x, (int)xPoint2.y);
g.setColor(Color.green);
g.drawLine((int)yPoint1.x, (int)yPoint1.y, (int)yPoint2.x, (int)yPoint2.y);
g.setColor(Color.blue);
g.drawLine((int)zPoint1.x, (int)zPoint1.y, (int)zPoint2.x, (int)zPoint2.y);
System.out.println("Left drawAxisRep().");
}