Threaded View
-
27 Aug 2012 10:37 AM #1
NullPointerException in ScatterSeries.drawMarkers
NullPointerException in ScatterSeries.drawMarkers
I just upgraded to GXT 3.0.1 and my application started throwing the following exception while trying to redraw a chart.
java.lang.NullPointerException: null
at com.sencha.gxt.chart.client.chart.series.ScatterSeries.drawMarkers(ScatterSeries.java:479)
at com.sencha.gxt.chart.client.chart.series.ScatterSeries.drawSeries(ScatterSeries.java:224)
....
The offending line is
unusedShadow.setHidden(true);
In the initial drawing of the chart coordinates.size() is 199, but sprites.size() is 0, so the "hide unused sprites" code is not evaluated. However, when I redraw the chart with new colors for the sprites, for some reason coordinate.size is still 199, but sprites.size() is 209. That gets us into the "hide unused sprites" code. The problem arises because although I have not turned on shadows the shadowGroups is not empty. It holds three SpriteList entries, but all of those lists are empty. Hence at line 478 of ScatterSeries
Sprite unusedShadow = shadows.get(j);
unusedShadow gets set to null, leading to the NullPointerException from line 479 above.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote