#720 IntervalMarker with Double.POSITIVE_INFINITY bound

closed-fixed
General (896)
5
2007-03-01
2007-02-14
No

Please note, that this issue is different from bug 1647269.

I create the marker as follows:
IntervalMarker marker = new IntervalMarker(
100.0d,
Double.POSITIVE_INFINITY,
new Color(0x80, 0x80, 0xFF, 0x1F),
new BasicStroke(0.5f),
new Color(0, 0, 0),
new BasicStroke(0.5f),
1.0f);

It is not rendered with JFreeChart 1.0.3/4 (used to be OK with 1.0.2), and the following exception is logged:

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.fill(DuctusShapeRenderer.java:49)
at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:119)
at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2160)
at org.jfree.chart.renderer.xy.AbstractXYItemRenderer.drawDomainMarker(AbstractXYItemRenderer.java:991)
at org.jfree.chart.plot.XYPlot.drawDomainMarkers(XYPlot.java:3084)
at org.jfree.chart.plot.XYPlot.draw(XYPlot.java:2426)
at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1041)
at org.jfree.chart.ChartPanel.paintComponent(ChartPanel.java:1257)
at javax.swing.JComponent.paint(JComponent.java:808)
[...the rest of the trace is skipped...]

It fails under both JRE 1.4 and 1.5 and, although I'd blame this on the JRE and file a bug with Sun, I am afraid it must be fixed in the library for the time being.

In the code of AbstractXYItemRenderer.drawDomainMarker(...), the marker rectangle must be clipped to the chart data area.

Discussion

  • Sergei Ivanov

    Sergei Ivanov - 2007-02-28

    Logged In: YES
    user_id=1606022
    Originator: YES

    I looked at the Sun's bug parade and they claim that most of the "rasterizer" exceptions are fixed in the latest revisions of java 1.5 and 1.6. These exceptions can be eliminated by switching the anti-aliasing off.

    Anyway, I have submitted a patch 1670686 to fix this issue once and forever on all jdk versions.

     
  • David Gilbert

    David Gilbert - 2007-03-01

    Logged In: YES
    user_id=112975
    Originator: NO

    Thanks for the patch. I've committed it to CVS for inclusion in the 1.0.5 release.

     
  • David Gilbert

    David Gilbert - 2007-03-01
    • labels: --> General
    • assigned_to: nobody --> mungady
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks