Hi All,
I installed Sun 1.4.2 a while ago, and I am very happy with its
performance in Linux, However there is bug on this release that seems to
affect VisAD. The problem that araises in Visad is that some points in
a lines (e.g. Grid2Dset) are given the vaule "Infinity", which makes the
line go across the image
(http://cires.colorado.edu/~ricardo/temp/Screenshot.png)
The exception I got is:
sun.dc.pr.PRException: endPath: bad path
at sun.dc.pr.Rasterizer.endPath(Rasterizer.java:537)
at
sun.java2d.pipe.DuctusRenderer.createShapeRasterizer(DuctusRenderer.java:374)
at
sun.java2d.pipe.DuctusShapeRenderer.renderPath(DuctusShapeRenderer.java:57)
at
sun.java2d.pipe.DuctusShapeRenderer.draw(DuctusShapeRenderer.java:45)
at sun.java2d.SunGraphics2D.draw(SunGraphics2D.java:2128)
at visad.java2d.VisADCanvasJ2D.render(VisADCanvasJ2D.java:806)
at visad.java2d.VisADCanvasJ2D.render(VisADCanvasJ2D.java:577)
at visad.java2d.VisADCanvasJ2D.render(VisADCanvasJ2D.java:577)
at visad.java2d.VisADCanvasJ2D.render(VisADCanvasJ2D.java:566)
at visad.java2d.VisADCanvasJ2D.render(VisADCanvasJ2D.java:577)
at visad.java2d.VisADCanvasJ2D.render(VisADCanvasJ2D.java:577)
at
visad.java2d.VisADCanvasJ2D.paintComponent(VisADCanvasJ2D.java:451)
at visad.java2d.VisADCanvasJ2D.run(VisADCanvasJ2D.java:349)
at java.lang.Thread.run(Thread.java:534)
This is a known bug in Java. The report can be found in
http://developer.java.sun.com/developer/bugParade/bugs/4755500.html
It affected previous versions of Java, and it seems it affects as well
this new release.
Is it possible to come up with a workaround for this bug? Is it
actually the same bug.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class MathBugTest {
public static void main(String[] args) {
System.out.println(Math.round(1d)); // prints "1", as expected
for (int i=0; i<2000; i++) {
Math.round(Double.NaN);
}
System.out.println(Math.round(1d)); // prints "0", which is wrong
}
}
---------- END SOURCE ---------
Thanks,
Ricardo