#982 Infinite Loop in JFreechart.createBufferedImage()

closed-fixed
General (896)
5
2010-02-09
2010-02-05
nephist0
No

I want to create a dialplot.
The problem is, that StandardDialScale allows 0 for the parameter "MajorTickIncrement". Of course, it doesn't make sense, but if MajorTickIncrement is 0, JFreeChart.createBufferedImage(width, height) will hang up in an infinite loop, more precisely in Dialplot.draw().
So no image will be drawn, but there is also no hint or exception, that 0 isn't allowed!

here my code:

DialPlot plot = new DialPlot();
....
StandardDialScale standarddialscale = new StandardDialScale(wayne, wayne, wayne,0,wayne)
....
JFreeChart chart = new JFreeChart(plot);
BufferedImage img = chart.createBufferedImage(width, height);

Discussion

  • David Gilbert

    David Gilbert - 2010-02-09
    • labels: --> General
    • assigned_to: nobody --> mungady
    • status: open --> closed-fixed
     
  • David Gilbert

    David Gilbert - 2010-02-09

    Thanks for the report. I've committed a fix for inclusion in the next release.

     

Log in to post a comment.