hochileo / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Adding Y label after clearing causes crash #209

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new renderer use regular steps 
2. Add some labels using renderer.addYTextLabel()
3. Call renderer.clearYTextLabels() to remove old labels added in step 2.
4. Call renderer.addYTextLabel() to add new labels

What is the expected output? What do you see instead?
Expected: the old labels get cleared and the chart shows the new labels
Actual: it throws NullPointerException

Please provide a source code snippet that we can use to replicate the issue.
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
renderer.addYTextLabel(1.0, "old");
renderer.clearYTextLabels();
renderer.addYTextLabel(1.0, "new"); // should throw NullPointerException

What version of the product binary library are you using?
1.0.0

Please provide any additional information below.
clearYTextLabels() should clear the submaps of mYTextLabels, not mYTextLabels 
itself. The problem can be solved either by putting empty maps back into 
mTextLabels or by calling clear() of each submaps instead of calling 
mYTextLabel.clear().

Original issue reported on code.google.com by Frozenmo...@gmail.com on 13 Apr 2012 at 7:54

GoogleCodeExporter commented 9 years ago
Fixed in SVN rev. r387.

Original comment by dandrome...@gmail.com on 11 May 2012 at 6:35

GoogleCodeExporter commented 9 years ago
Good catch!

Original comment by dandrome...@gmail.com on 11 May 2012 at 6:35

GoogleCodeExporter commented 9 years ago
Hi,

You show where is the problem and solution in .java file. 

But we have only .jar file , so please provide .jar file after updating issue 
changes. 

Original comment by darshitp...@gmail.com on 13 Sep 2012 at 5:28

GoogleCodeExporter commented 9 years ago
Where is it possible to get the jar with the issue fixed?

Thanks, 

Original comment by roby.bru...@gmail.com on 18 Feb 2013 at 11:53

GoogleCodeExporter commented 9 years ago
You can download a version including this feature here: 
https://repository-achartengine.forge.cloudbees.com/snapshot/org/achartengine/ac
hartengine/1.1.0/

Original comment by dandrome...@gmail.com on 18 Feb 2013 at 11:55