Project: Birt
Bug 183162 OutOfMemoryError
Reported: 2007-04-19 07:33:09 | Status: resolved fixed

In some case (depends on data), during the design or even in the web viewer, an outOfMemoryError occured when try to creates / display a chart (bar, line, scatter) with these kind of values : X = toto for example ;) Y = -45000000 Error with 2.1.1 or 2.2 M6. After some little search, it seems that it comes from the Autoscale class which tries to computeTicks with a step of 1 (=> initialization of a double[90000000]). I suggest when min = max, to set the min or max value to 0. The step is then, well computed. Just for my comprehension, i'm not sure the getPrecision method works fine or comments are not synchronise with the code: - I always get a NaN for negative values (abs on log(value)), - The while that verify precision always return 1 (precision /= 10 ...) - The return value is supposed to be a 10 power.

Files changed in fix:
chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/AutoScale.java chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/ScaleContext.java