Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Creating XYLineAnnotation with NaN Values causes ChartUtils.writeChartAsPNG() to hang #223

@davewichers

Description

@davewichers

I have code that is accidentally passing NaN values to the 1st, 3rd, and 4th double values for the 6 parameter constructor of XYLineAnnotation(). See: https://github.com/jfree/jfreechart/blob/master/src/main/java/org/jfree/chart/annotations/XYLineAnnotation.java#L118

This annotation is then added to a chart, and later on, when I invoke ChartUtils.writeChartAsPNG() with this chart, that method simply hangs. Seems like the XYLineAnnotation() constructors should all verify that all the doubles passed to them are actual numbers. Regardless, the ChartUtils.writeChartAsPNG() method shouldn't simply hang.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions