Regression when upgrading JFreeChart to 1.5.0

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Post Reply
Posts: 1
Joined: Thu Oct 17, 2019 8:44 pm
antibot: No, of course not.

Regression when upgrading JFreeChart to 1.5.0

Post by jucui » Thu Oct 17, 2019 8:50 pm

I am using JFreeChart to generate a benchmark report, but an exception is thrown when generating a buffered image after upgrading from version 1.0.19 to 1.5.0. The API worked fine before upgrading the version. To reproduce the bug, download this folder and run the commands found in README.adoc. From debugging, the exception seems to be caused by the lengthToJava2D() method returning NaN, resulting in a division by zero. The stack trace is as follows:

Code: Select all

Caused by: java.lang.IllegalArgumentException: Must be finite.
	at org.jfree.chart.axis.NumberTickUnitSource.getCeilingTickUnit( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.axis.NumberAxis.selectVerticalAutoTickUnit( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.axis.NumberAxis.selectAutoTickUnit( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.axis.NumberAxis.refreshTicksVertical( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.axis.NumberAxis.refreshTicks( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.axis.ValueAxis.reserveSpace( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.plot.CategoryPlot.calculateRangeAxisSpace( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.plot.CategoryPlot.calculateAxisSpace( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.plot.CategoryPlot.draw( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.JFreeChart.draw( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.JFreeChart.createBufferedImage( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.JFreeChart.createBufferedImage( ~[jfreechart-1.5.0.jar!/:na]
	at org.jfree.chart.JFreeChart.createBufferedImage( ~[jfreechart-1.5.0.jar!/:na]
Any advice is appreciated. Thanks in advance!

Post Reply