ShaneG - 10 September 2013 02:27 PM
The S&C database entries work somewhat different from others due to the way we have supported them across both the speed and cadence profiles. It is possible there is a S&C specific error in the database logic triggred by what you have described. Can you paste the stack dump from your logcat so we can confirm where this is occuring? Thanks.
You guessed it. FYI, I cleaned ANT+ Plugins' app data before I did this test to kill the existing database. Let me know if you need any more info.
09-10 22:16:16.644: E/AndroidRuntime(31743): FATAL EXCEPTION: main
09-10 22:16:16.644: E/AndroidRuntime(31743): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dsi.ant.plugins.antplus/com.dsi.ant.plugins.antplus.utility.search.Dialog_SearchPreferredDevice}: android.database.StaleDataException: Attempting to access a closed CursorWindow.Most probable cause: cursor is deactivated prior to calling this method.
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.app.ActivityThread.access$700(ActivityThread.java:140)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.os.Handler.dispatchMessage(Handler.java:99)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.os.Looper.loop(Looper.java:137)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.app.ActivityThread.main(ActivityThread.java:4921)
09-10 22:16:16.644: E/AndroidRuntime(31743): at java.lang.reflect.Method.invokeNative(Native Method)
09-10 22:16:16.644: E/AndroidRuntime(31743): at java.lang.reflect.Method.invoke(Method.java:511)
09-10 22:16:16.644: E/AndroidRuntime(31743): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
09-10 22:16:16.644: E/AndroidRuntime(31743): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
09-10 22:16:16.644: E/AndroidRuntime(31743): at dalvik.system.NativeStart.main(Native Method)
09-10 22:16:16.644: E/AndroidRuntime(31743): Caused by: android.database.StaleDataException: Attempting to access a closed CursorWindow.Most probable cause: cursor is deactivated prior to calling this method.
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:139)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java:74)
09-10 22:16:16.644: E/AndroidRuntime(31743): at com.dsi.ant.plugins.antplus.utility.db.SavedDeviceDb.getPreferredDevice(SavedDeviceDb.java:212)
09-10 22:16:16.644: E/AndroidRuntime(31743): at com.dsi.ant.plugins.antplus.utility.search.Dialog_SearchPreferredDevice.onCreate(Dialog_SearchPreferredDevice.java:67)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.app.Activity.performCreate(Activity.java:5188)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
09-10 22:16:16.644: E/AndroidRuntime(31743): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
09-10 22:16:16.644: E/AndroidRuntime(31743): ... 11 more