import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import sun.font.FontDesignMetrics;
public class MakeCrash
{
// If some lines are added/removed then the crash may or may not occur at the some location.
// this could point to some type of stack corruption
public static void main(final String args[]) throws Exception
{
BufferedImage bi = new BufferedImage(1000, 1000, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = bi.createGraphics();
for (int i = 0; i < 1; i++)
{
double m00 = Double.NaN, m01 = Double.NaN, m02 = 0.0, m10 = Double.NaN, m11 = Double.NaN, m12 = 0.0;
AffineTransform at = new AffineTransform(m00, m10, m01, m11, m02, m12);
System.out.println(at);
Font font = g2.getFont();
System.out.println(font);
FontRenderContext frc = new FontRenderContext(at, true, false);
FontDesignMetrics fm2 = FontDesignMetrics.getMetrics(font, frc);
FontMetrics fm = g2.getFontMetrics(font);
g2.setTransform(at);
g2.setTransform(at);
Thread.sleep(100);
fm.getStringBounds("7204", g2);
}
}
}