-
Bug
-
Resolution: Fixed
-
P3
-
1.4.2, 5.0, 6
-
beta
-
x86, sparc
-
solaris_8, solaris_9, windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2127068 | 5.0u5 | Kannan Balasubramanian | P3 | Resolved | Fixed | b03 |
JDK-2125837 | 1.4.2_09 | Kannan Balasubramanian | P3 | Resolved | Fixed | b02 |
the data hasn't been filled in yet, JVM hangs or crashes. It seems which one it does depends on the AffineTransform being used at the time. A transform of
[-1,-1] results in a crash; [1,1], a hang.
The program below (CrashVM2.java) takes an argument of either "-crash" or "-hang":
*****
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Graphics;
import java.awt.RenderingHints;
import java.awt.geom.*;
import java.awt.image.BufferedImage;
import java.util.Date;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class CrashVM2 extends JPanel {
CubicCurve2D.Double s1 = null;
static boolean crash = false;
public static void main(String[] args) {
if (args.length != 1) {
usage();
}
if (args[0].equals("-crash")) {
crash = true;
} else if (args[0].equals("-hang")) {
crash = false;
} else {
usage();
}
JFrame f = new JFrame();
f.getContentPane().add(new CrashVM2());
f.setSize(640, 480);
f.setVisible(true);
}
public static void usage() {
System.out.println("Usage: CrashVM2 [-crash | -hang ]");
System.exit(1);
}
public CrashVM2() {
s1 = new CubicCurve2D.Double();
s1.setCurve(1.0, 1.0,
Double.NaN, Double.NaN,
Double.NaN, Double.NaN,
0.0, 0.0);
}
public void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
System.out.println("About to draw...");
AffineTransform oldTransform = g2.getTransform();
AffineTransform downRight = (AffineTransform) oldTransform.clone();
AffineTransform upLeft = (AffineTransform) oldTransform.clone();
downRight.translate(1.0,1.0);
upLeft.translate(-1.0,-1.0);
g2.setTransform(crash ? upLeft : downRight);
g2.draw(s1);
g2.setTransform(oldTransform);
System.out.println("Done --> " + new Date().toString());
}
}
****************
- backported by
-
JDK-2125837 Rendering CubicCurve2D with NaN as control points causes crash in ductus code
- Resolved
-
JDK-2127068 Rendering CubicCurve2D with NaN as control points causes crash in ductus code
- Resolved
- duplicates
-
JDK-6205553 JVM Crash in sun.dc.pr.PathFiller.setOutputArea - Antialiasing and big screens
- Closed
- relates to
-
JDK-4587651 Drawing GeneralPath with Double.NaN crashes JVM if antialias is on
- Open
-
JDK-4836495 JVM crashes trying to draw very small Arc2D pie fraction when antialiasing is on
- Resolved
-
JDK-4486670 Arc2D.Double may not draw correctly for tiny angular extents
- Closed