Open fkirc opened 7 years ago
I was able to reliably reproduce the bug:
It happens when a LineChart is used with only one entry and when xAxisMinimum and xAxisMaximum are therefore set to the same value:
if (entries.size() >= 2) { // check to fix the crash
final float xMinimum = entries.get(0).getX();
final float xMaximum = entries.get(entries.size() - 1).getX();
xAxis.setAxisMinimum(xMinimum);
xAxis.setAxisMaximum(xMaximum);
chart.setVisibleXRange(xMinimum, xMaximum);
}
I fixed the crash using the above check whether entries has two or more entries. Nevertheless I think that this bug should be fixed in the library.
It is still an application not responding crash when xAxisMinimum and xAxisMaximum are set to the same value.
My application got stuck in an endless loop when attempting to display specific data sets in a line chart. I started the debugger and figured out using thread dumps that the main thread got stuck in the following method:
This is the endless loop in DataSet.java:
Here is a snapshot of the thread state:
I can provide more specific information about the used data set if necessary.