petrovick / achartengine

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

Demo source 1.1.0 crashing when using "embedded line chart demo" #327

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Launch Demo application 1.1.0
2. Select 1st option - "embedded line chart demo"
3. Create 2-3 series with data such that x or y co-ordinates are not visible on 
the screen
E.g.
1st series data 
(10,20),(20,30),(30,40)

2nd series data 
(12,25),(15,5),(28,20)

3rd series data 
(5,10),(50,10),(74,235)

As soon as the co-ordinates fall beyond the view limit, the application gets 
crashed.

What is the expected output? What do you see instead?
The application should not get crashed.

Please provide a source code snippet that we can use to replicate the issue.
XYChartBuilder.java of achartengine demo source code 1.1.0

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

Please provide any additional information below.
Logs below : 07-09 12:23:17.430: E/AndroidRuntime(6159): FATAL EXCEPTION: main
07-09 12:23:17.430: E/AndroidRuntime(6159): 
java.lang.IndexOutOfBoundsException: Invalid index 3, size is 3
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
java.util.ArrayList.get(ArrayList.java:308)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.util.IndexXYMap.getYByIndex(IndexXYMap.java:86)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.model.XYSeries.getY(XYSeries.java:203)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.chart.XYChart.drawChartValuesText(XYChart.java:590)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.chart.XYChart.drawSeries(XYChart.java:534)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.chart.XYChart.draw(XYChart.java:311)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
org.achartengine.GraphicalView.onDraw(GraphicalView.java:168)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.View.draw(View.java:9291)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2584)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2582)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2582)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2582)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.drawChild(ViewGroup.java:2582)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.View.draw(View.java:9294)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.widget.FrameLayout.draw(FrameLayout.java:419)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:207
7)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewRoot.draw(ViewRoot.java:1669)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewRoot.performTraversals(ViewRoot.java:1384)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.view.ViewRoot.handleMessage(ViewRoot.java:2020)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.os.Looper.loop(Looper.java:132)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
android.app.ActivityThread.main(ActivityThread.java:4028)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
java.lang.reflect.Method.invokeNative(Native Method)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
java.lang.reflect.Method.invoke(Method.java:491)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
07-09 12:23:17.430: E/AndroidRuntime(6159):     at 
dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by shadabun...@gmail.com on 9 Jul 2013 at 6:58

GoogleCodeExporter commented 9 years ago

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