Index 0 requested, with a size of 0

Samebug tips3

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

When you get a Cursor returned from the database you should do an moveToFirst(); before trying to get data from it.

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

Stack trace

  • android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0 at android.database.AbstractCursor.checkPosition( at android.database.AbstractWindowedCursor.checkPosition( at android.database.AbstractWindowedCursor.getInt( at com.eastcom.intelligentanswer.dao.DialectDao.getAllDialect( at com.eastcom.intelligentanswer.ui.Scenese.onClick( at android.view.View.performClick( at android.view.View$ at android.os.Handler.handleCallback( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke( at$ at at dalvik.system.NativeStart.main(Native Method)

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 visitorOnce,
Ranjana DangolRanjana Dangol
2 times, last one
2 times, last one
Unknown visitor
Unknown visitorOnce,
51 more bugmates