githubbub / achartengine

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

I had a blocking problem ( sometimes random, sometime after 28 th add ) during an XYSeries add ( double x, double y ) operation #330

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. During the add operation in XYSeries
2. I use three series
3. at the 28-th add, system blocks.

What is the expected output? What do you see instead?
To see the XY graph, nothing appear, application is blocket

Please provide a source code snippet that we can use to replicate the issue.

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

Please provide any additional information below.
I think that the problem is inside XYSeries.java. I comment , inside the add ( 
double x, double y ) operation , the while that add a Padding to x value in 
case it exists already into the serie. The problem disappear:
public synchronized void add(double x, double y) {

    /* LF  
    while (mXY.get(x) != null) {
      // add a very small value to x such as data points sharing the same x will
      // still be added
      x += getPadding();
    }
    */
    mXY.put(x, y);
    updateRange(x, y);
  }

Original issue reported on code.google.com by luca.fer...@gmail.com on 16 Jul 2013 at 12:38

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 31 Oct 2013 at 8:37