I am trying to get the data from my DB.
My code fails on below line:
list[p] = cImage.getString(i);
The error message is as below:
11-27 12:34:59.683: E/CursorWindow(6901): Failed to read row 2, column 0 from a CursorWindow which has 2 rows, 2 columns.
11-27 12:34:59.683: D/AndroidRuntime(6901): Shutting down VM
11-27 12:34:59.683: W/dalvikvm(6901): threadid=1: thread exiting with uncaught exception (group=0x41e9b930)
11-27 12:34:59.693: E/AndroidRuntime(6901): FATAL EXCEPTION: main
11-27 12:34:59.693: E/AndroidRuntime(6901): java.lang.RuntimeException: Unable to create service com.example.imageswidget.WidgetService: java.lang.IllegalStateException: Couldn't read row 2, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
11-27 12:34:59.693: E/AndroidRuntime(6901): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2667)
For my call log:
Log.i("image length", list[p].length()+"");
I get few calls before my code breaks. The problem seems to happen only for some of the rows but a error code does not tell me what a problem is