Index 8 requested, with a size of 8

Samebug tips3

You have an empty cursor. Check your query if it is not expected, or handle empty cursor with if(cursor.getCount() > 0) ...

You need to make sure that there is a data in the cursor. Check that moveToFirst() return true.


Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web374

Stack trace

  • android.database.CursorIndexOutOfBoundsException: Index 8 requested, with a size of 8 at android.database.AbstractCursor.checkPosition( at android.database.AbstractWindowedCursor.checkPosition( at android.database.AbstractWindowedCursor.getString( at com.nxstudio.suratbus.DBHelper$override.insert_coordinates( at com.nxstudio.suratbus.DBHelper$override.access$dispatch( at com.nxstudio.suratbus.DBHelper.insert_coordinates( at com.nxstudio.suratbus.MainActivity.onCreate( at at at at at at$900( at$H.handleMessage( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown visitor
Unknown visitor2 times, last one
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
51 more bugmates