Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Issue with Bike Speed example

Rank

Total Posts: 3

Joined 2013-07-06

PM

I am having an issue with the bike speed example causing ANT+ Plugins to crash. I have tried using the APK from the SDK and it also has the same issue. I am using a USB 2.0 stick with a Galaxy Note tablet and a Garmin GSC10 speed & cadence sensor.

The ANT+ plugins crashes when I call AntPlusBikeSpeedDistancePcc.requestAccess and have a preferred Speed & Cadence sensor stored in the ANT+ Plugins Manager. If I do not have my S&C sensor marked as preferred or I have no S&C sensor saved at all, then request access brings up the Plugins Manager window where I can select it, then everything works OK. If I use the overload with skipPreferredSearch = true, then it brings up the plugins manager window and works OK.

Any ideas?      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

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.      

Signature

Dynastream Developer

Rank

Total Posts: 3

Joined 2013-07-06

PM

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
     
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Are you by any chance developing on an Xperia Neo V? I was looking at a crash report from our play store entry that was the same stack trace, so it is good to confirm it is the same bug. Looking at it there was some errors with the S&C sensor database that show up here as a crash, but also prevent S&C database entries from working properly in general.

Since there are no public apps that we know of using this yet we aren't going to push this fix as an immediate public release. However, I can send you a new development release version with the fixes so you can continue development, would that be sufficient?      

Signature

Dynastream Developer

Rank

Total Posts: 3

Joined 2013-07-06

PM

ShaneG - 11 September 2013 04:54 PM
Are you by any chance developing on an Xperia Neo V? I was looking at a crash report from our play store entry that was the same stack trace, so it is good to confirm it is the same bug. Looking at it there was some errors with the S&C sensor database that show up here as a crash, but also prevent S&C database entries from working properly in general.

Since there are no public apps that we know of using this yet we aren't going to push this fix as an immediate public release. However, I can send you a new development release version with the fixes so you can continue development, would that be sufficient?


No, I am using a Samsung Galaxy Note 10.1 with a USB-OTG cable and a USB 2.0 ANT+ stick, paired with a Garmin GSC10.

A dev release would be great if it would help you squash any other bugs lurking in the S&C code. Like I said I can workaround this issue so it's not holding up development on my end at the moment, just as long as this bug won't prevent me from getting the application ANT+ certified.      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

I sent you a beta release of the SDK with the fix to the email I had from sending you the last beta. Let me know if you don't get it or if you have any more issues.      

Signature

Dynastream Developer

RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Just in case anybody ends up here again, this was fixed in a new release http://www.thisisant.com/forum/viewthread/4092/      

Signature

Dynastream Developer