yunjianwu / achartengine

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

ConcurrentModificationException during XYChart.draw() #225

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Separate thread adding points to XYSeries
2. GraphicalView.repaint()
3. ConcurrentModificationException if the other thread adds a point while the 
UI thread is iterating through the range returned by XYSeries.getRange() -- see 
lines 247 and 250 of XYChart.draw()

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

Please provide any additional information below.
I think that if XYSeries is going to have all those synchronized methods, it 
would help for the drawing to also happen in a thread-safe manner. If there 
isn't a need to support multi-threaded operation, then perhaps there's no need 
for the XYSeries methods to be synchronized?

In any case I got it to work in this case by adding a synchronized statement in 
XYChart.draw().

Original issue reported on code.google.com by Jonathan...@gmail.com on 29 Jun 2012 at 12:52

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

Original comment by dandrome...@gmail.com on 11 Jul 2012 at 10:41

GoogleCodeExporter commented 9 years ago
The fix does not solve the issue.

Original comment by mbevilac...@gmail.com on 22 Dec 2012 at 9:39