java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.

tip

If your row exceed the limit of 2mb of SQLite you're gonna receive this exception, consider using your database just for filepaths and then store your files in a filesystem.

tip

This is caused by issue #73 in couchbase-lite-java-core, and it seems to have been fixed.

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

  • Theme chooser crashes giving this error report : java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it. at android.database.CursorWindow.nativeGetLong(Native Method) at android.database.CursorWindow.getLong(CursorWindow .java:511) at android.database.CursorWindow.getInt(CursorWindow. java:578) at android.database.AbstractWindowedCursor.getInt(Abs tractWindowedCursor.java:69) at android.database.CursorWrapper.getInt(CursorWrappe r.java:102) at com.cyngn.theme.chooser.ThemeFragment.loadStatusBa r(ThemeFragment.java:1591) at com.cyngn.theme.chooser.ThemeFragment.onLoadFinish ed(ThemeFragment.java:1342) at com.cyngn.theme.chooser.MyThemeFragment.onLoadFini shed(MyThemeFragment.java:368) at com.cyngn.theme.chooser.MyThemeFragment.onLoadFini shed(MyThemeFragment.java:54) at android.support.v4.app.LoaderManagerImpl$LoaderInf o.callOnLoadFinished(LoaderManager.java:427) at android.support.v4.app.LoaderManagerImpl$LoaderInf o.onLoadComplete(LoaderManager.java:395) at android.support.v4.content.Loader.deliverResult(Lo ader.java:104) at android.support.v4.content.CursorLoader.deliverRes ult(CursorLoader.java:73) at android.support.v4.content.CursorLoader.deliverRes ult(CursorLoader.java:35) at android.support.v4.content.AsyncTaskLoader.dispatc hOnLoadComplete(AsyncTaskLoader.java:223) at android.support.v4.content.AsyncTaskLoader$LoadTas k.onPostExecute(AsyncTaskLoader.java:61) at android.support.v4.content.ModernAsyncTask.finish( ModernAsyncTask.java:461) at android.support.v4.content.ModernAsyncTask.access$ 500(ModernAsyncTask.java:47) at android.support.v4.content.ModernAsyncTask$Interna lHandler.handleMessage(ModernAsyncTask.java:474) at android.os.Handler.dispatchMessage(Handler.java:10 2) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.jav a:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:693)
    via by Ashveen Iyer,
  • Theme chooser crashes giving this error report : java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it. at android.database.CursorWindow.nativeGetLong(Native Method) at android.database.CursorWindow.getLong(CursorWindow .java:511) at android.database.CursorWindow.getInt(CursorWindow. java:578) at android.database.AbstractWindowedCursor.getInt(Abs tractWindowedCursor.java:69) at android.database.CursorWrapper.getInt(CursorWrappe r.java:102) at com.cyngn.theme.chooser.ThemeFragment.loadStatusBa r(ThemeFragment.java:1591) at com.cyngn.theme.chooser.ThemeFragment.onLoadFinish ed(ThemeFragment.java:1342) at com.cyngn.theme.chooser.MyThemeFragment.onLoadFini shed(MyThemeFragment.java:368) at com.cyngn.theme.chooser.MyThemeFragment.onLoadFini shed(MyThemeFragment.java:54) at android.support.v4.app.LoaderManagerImpl$LoaderInf o.callOnLoadFinished(LoaderManager.java:427) at android.support.v4.app.LoaderManagerImpl$LoaderInf o.onLoadComplete(LoaderManager.java:395) at android.support.v4.content.Loader.deliverResult(Lo ader.java:104) at android.support.v4.content.CursorLoader.deliverRes ult(CursorLoader.java:73) at android.support.v4.content.CursorLoader.deliverRes ult(CursorLoader.java:35) at android.support.v4.content.AsyncTaskLoader.dispatc hOnLoadComplete(AsyncTaskLoader.java:223) at android.support.v4.content.AsyncTaskLoader$LoadTas k.onPostExecute(AsyncTaskLoader.java:61) at android.support.v4.content.ModernAsyncTask.finish( ModernAsyncTask.java:461) at android.support.v4.content.ModernAsyncTask.access$ 500(ModernAsyncTask.java:47) at android.support.v4.content.ModernAsyncTask$Interna lHandler.handleMessage(ModernAsyncTask.java:474) at android.os.Handler.dispatchMessage(Handler.java:10 2) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.jav a:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:693)
    via by Ashveen Iyer,
  • GitHub comment 73#35058494
    via GitHub by PankaJJakhar
    ,
  • How does a cursor refer to deleted rows?
    via Stack Overflow by satur9nine
    ,
    • java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it. at android.database.CursorWindow.nativeGetLong(Native Method)

    Users with the same issue

    ajinkya_w
    ajinkya_w37 times, last one,
    Stefan Braune
    Stefan Braune7 times, last one,
    Ranjana Dangol
    Ranjana Dangol1 times, last one,
    jk
    jk1 times, last one,
    joni1408
    joni140820 times, last one,
    29 more bugmates