PhilJay / MPAndroidChart

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Other
37.63k stars 9.02k forks source link

ANR DataSet.getEntryIndex(DataSet.java:310) #4644

Open Aleafleave opened 5 years ago

Aleafleave commented 5 years ago

java.util.ArrayList.get(ArrayList.java:310)

2 com.github.mikephil.charting.data.DataSet.getEntryIndex(DataSet.java:310) 3 com.github.mikephil.charting.data.DataSet.getEntryForXValue(DataSet.java:281) 4 com.github.mikephil.charting.renderer.BarLineScatterCandleBubbleRenderer$XBounds.set(BarLineScatterCandleBubbleRenderer.java:88) 5 com.github.mikephil.charting.renderer.LineChartRenderer.drawCubicBezier(LineChartRenderer.java:193) 6 com.github.mikephil.charting.renderer.LineChartRenderer.drawDataSet(LineChartRenderer.java:123) 7 com.github.mikephil.charting.renderer.LineChartRenderer.drawData(LineChartRenderer.java:101) 8 com.github.mikephil.charting.charts.BarLineChartBase.onDraw(BarLineChartBase.java:237) 9 android.view.View.draw(View.java:15114) 10 android.view.View.updateDisplayListIfDirty(View.java:14048) 11 android.view.View.getDisplayList(View.java:14071) 12 android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3388) 13 android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3367) 14 android.view.View.updateDisplayListIfDirty(View.java:14008) 15 android.view.View.getDisplayList(View.java:14071) 16 android.view.View.draw(View.java:14838)

denrase commented 4 years ago

We are also seeing this with our Application. Most ANRs we get are from this Method.

kirileec commented 3 years ago

chart.getLowestVisibleX() in method XBounds.set returns Float.NaN, and then getEntryIndex go to endless loop. But I don't know what will cause this

liuan3756 commented 1 year ago

dude,i got this error too,how can i avoid this?