legendaryfox/bamft — Issue #13: ScheduleListActivity - db handler issues
Author: susanafong
Created: 2012-02-20 19:13:21+00:00
State: open

Am unsure how to reproduce except to click on Search Nearby randomly.. sometimes this error shows up, sometimes it doesn't...

02-20 14:05:14.190: E/AndroidRuntime(18677): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ksj.bamft/com.ksj.bamft.activity.ScheduleListActivity}: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2781)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2797)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.app.ActivityThread.access$2300(ActivityThread.java:135)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2132)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.os.Handler.dispatchMessage(Handler.java:99)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.os.Looper.loop(Looper.java:143)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.app.ActivityThread.main(ActivityThread.java:4914)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at java.lang.reflect.Method.invokeNative(Native Method)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at java.lang.reflect.Method.invoke(Method.java:521)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at dalvik.system.NativeStart.main(Native Method)
02-20 14:05:14.190: E/AndroidRuntime(18677): Caused by: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.database.AbstractCursor.checkPosition(AbstractCursor.java:580)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:214)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:41)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at com.ksj.bamft.database.DatabaseHandler.getLandmark(DatabaseHandler.java:406)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at com.ksj.bamft.activity.ScheduleListActivity.getDistanceFromUser(ScheduleListActivity.java:233)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at com.ksj.bamft.activity.ScheduleListActivity.buildSchedulesToDistancesMap(ScheduleListActivity.java:180)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at com.ksj.bamft.activity.ScheduleListActivity.onCreate(ScheduleListActivity.java:81)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1065)
02-20 14:05:14.190: E/AndroidRuntime(18677):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2745)
02-20 14:05:14.190: E/AndroidRuntime(18677):	... 11 more
02-20 14:05:15.640: I/Process(18677): Sending signal. PID: 18677 SIG: 9