android.database.CursorIndexOutOfBoundsException

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.


rprp

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(AbstractCursor.java:432) at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:136) at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:50) at com.nxstudio.suratbus.DBHelper$override.insert_coordinates(DBHelper.java:35) at com.nxstudio.suratbus.DBHelper$override.access$dispatch(DBHelper.java) at com.nxstudio.suratbus.DBHelper.insert_coordinates(DBHelper.java:0) at com.nxstudio.suratbus.MainActivity.onCreate(MainActivity.java:75) at android.app.Activity.performCreate(Activity.java:5245) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3740) at android.app.ActivityThread.access$900(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5052)

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
rafaelrafael
Once,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
AkshayAkshay
Once,
51 more bugmates