Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Strange shutdown crash.

RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

I got a strange crash from my Ant interfaceing app. As far as I was concerened I had finished using the app 20 minutes previously and had shutdown the api The Ant notification had was long gone. The crash was caught by Acra. Here is the stack dump.

java.lang.IllegalArgumentExceptionContext must be provided
    at com
.dsi.ant.AntInterface.initService(AntInterface.java:268)
    
at com.dsi.ant.AntInterface$1.onServiceDisconnected(AntInterface.java:250)
    
at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1069)
    
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1083)
    
at android.os.Handler.handleCallback(Handler.java:587)
    
at android.os.Handler.dispatchMessage(Handler.java:92)
    
at android.os.Looper.loop(Looper.java:130)
    
at android.app.ActivityThread.main(ActivityThread.java:3701)
    
at java.lang.reflect.Method.invokeNative(Native Method)
    
at java.lang.reflect.Method.invoke(Method.java:507)
    
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
    
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
    
at dalvik.system.NativeStart.main(Native Method


As you can see there is nothing from my code in there. There are a few lins of interest in the logcat.

01-25 14:57:21.484 V/IpBike  7046): BaseSaveState IDLE
01
-25 14:57:21.484 I/ActivityManager(  230): Start proc org.openintents.filemanager for activity org.openintents.filemanager/.FileManagerActivitypid=7728 uid=10135 gids={1015}
01
-25 14:57:21.564 I/ActivityManager(  230): No longer want com.dsi.ant.service.socket (pid 5925): hidden #16
01-25 14:57:21.574 D/AndroidRuntime5284): Shutting down VM
01
-25 14:57:21.574 W/dalvikvm5284): threadid=1thread exiting with uncaught exception (group=0x2aac8578)
01-25 14:57:21.574 E/ACRA    5284): ACRA caught a IllegalArgumentException exception for com.iforpowell.android.ipantmanBuilding report.
01-25 14:57:21.574 D/AntHal  (  230): failed to read from client=162
01
-25 14:57:21.574 I/bluedroid(  230): Stopping hciattach deamon
01
-25 14:57:21.574 D/ACRA    5284): Retrieve application default SharedPreferences.
01-25 14:57:21.604 I/bluedroid(  230): Stopping hciattach deamon
01
-25 14:57:21.604 D/AntHal  (  230): client 162 closed
01
-25 14:57:21.604 D/AntHal  (  230): waiting for new client
01
-25 14:57:21.604 W/ActivityManager(  230): Scheduling restart of crashed service com.dsi.ant.service.socket/.AntRadioService in 5000ms
01
-25 14:57:21.634 I/ActivityThread7728): Pub org.openintents.filemanagerorg.openintents.filemanager.FileManagerProvider
01
-25 14:57:21.684 I/EulaOrNewVersion7728): Eula has been accepted.
01-25 14:57:21.694 I/EulaOrNewVersion7728): Same version 17 as last launch

There will of been some memory presure as I was starting the OIFileManger from within IpBike it looks to me like the system decided to get rid of com.dsi.ant.service.socket which is when the error occured.

This is on an SE Active with I belive the curent version of AntRadioService, although I am not that sure how to check.      
Rank

Total Posts: 4

Joined 2011-08-22

PM

We have tracked this down to a code bug that can be triggered in the ANTLib code when the ARS is killed by the system at the same time as a call to releaseService.

There will be a release of the ANT SDK which includes this fix soon. In the meantime the problem can be fixed by removing the following redundant code from AntInterface.java (They are located in the onServiceDisconnected method of mIAntConnection):

Context oldContext mContext;
ServiceListener oldServiceListener mServiceListener;
releaseService();
initService(oldContextoldServiceListener); 
     
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

Thanks I will add the workaround.