I've changed from eclipse to android studio few days ago.
Now I've found this weird bug.
if(c.moveToFirst())
{
do
{
exchange_rate = c.getFloat(columnExRate);
if(exchange_rate > 0)
total = total + c.getFloat(columnValue) * exchange_rate;
else
total = total + c.getFloat(columnValue);
}while(c.moveToNext());
}
Sometimes exchange_rate is equal to Infinity.
This happened at the second loop only in a specific set of data.
Maybe it's because I've entered the exchange_rate like a double and the I read a float?
Solved.
I've saved 1 / exchange_rate value without checking if exchange_rate is equal or not to 0.
1 / 0 return Infinity.