Hi again,
I've new logs from the Android device (see below). Our application
generates more logs now (stopping , onDestroy, onStart, onCreate ...)
Could you advise ? We don't know the way to troubleshoot this issue.
Everything works fine in emulator even when we kill (or crash) the
service while running. It stops randomly on real devices (whatever
Android version).
Where to start to get a clue ?
...
02-12 18:26:01.173: INFO/xx.yy.zz.RefreshService(1676): RefreshService
stopping (xx.yy.zz.refreshserv...@43239188)
02-12 18:26:01.173: INFO/ActivityManager(74): Stopping service:
xx.yy/.widget.RefreshService
02-12 18:26:01.173: INFO/xx.yy.zz.RefreshService(1676): RefreshService
onDestroy (xx.yy.zz.refreshserv...@43239188)
EVERYTHING IS FINE UNTIL HERE.
02-12 18:26:06.293: DEBUG/dalvikvm(1676): GC freed 3224 objects /
186016 bytes in 107ms
02-12 18:26:28.973: DEBUG/Sensors(74): sensors=00000000, real=00000000
02-12 18:26:29.063: DEBUG/AKMD(56): Compass CLOSE
02-12 18:26:29.273: DEBUG/dalvikvm(74): GC freed 5551 objects / 238016
bytes in 260ms
02-12 18:26:29.313: DEBUG/SurfaceFlinger(74): About to give-up screen,
flinger = 0x189700
02-12 18:27:10.535: WARN/ActivityManager(74): Scheduling restart of
crashed service xx.yy/.widget.RefreshService in 5000ms
02-12 18:27:10.545: DEBUG/KeyguardViewMediator(74):
wakeWhenReadyLocked(82)
02-12 18:27:10.545: DEBUG/KeyguardViewMediator(74):
handleWakeWhenReady(82)
02-12 18:27:10.545: DEBUG/KeyguardViewMediator(74): pokeWakelock(5000)
02-12 18:27:10.565: DEBUG/Sensors(74): sensors=00000001, real=00000001
02-12 18:27:10.565: DEBUG/AKMD(56): Compass OPEN
02-12 18:27:10.625: WARN/ActivityManager(74): Exception when starting
service xx.yy/.widget.RefreshService
02-12 18:27:10.625: WARN/ActivityManager(74):
android.os.DeadObjectException
02-12 18:27:10.625: WARN/ActivityManager(74): at
android.os.BinderProxy.transact(Native Method)
02-12 18:27:10.625: WARN/ActivityManager(74): at
android.app.ApplicationThreadProxy.scheduleCreateService(ApplicationThreadNative.java:
545)
02-12 18:27:10.625: WARN/ActivityManager(74): at
com.android.server.am.ActivityManagerService.realStartServiceLocked(ActivityManagerService.java:
9938)
02-12 18:27:10.625: WARN/ActivityManager(74): at
com.android.server.am.ActivityManagerService.bringUpServiceLocked(ActivityManagerService.java:
10054)
02-12 18:27:10.625: WARN/ActivityManager(74): at
com.android.server.am.ActivityManagerService.startServiceLocked(ActivityManagerService.java:
10235)
02-12 18:27:10.625: WARN/ActivityManager(74): at
com.android.server.am.ActivityManagerService.startServiceInPackage(ActivityManagerService.java:
10264)
02-12 18:27:10.625: WARN/ActivityManager(74): at
com.android.server.am.PendingIntentRecord.send(PendingIntentRecord.java:
227)
02-12 18:27:10.625: WARN/ActivityManager(74): at
android.app.PendingIntent.send(PendingIntent.java:400)
02-12 18:27:10.625: WARN/ActivityManager(74): at
com.android.server.AlarmManagerService
$AlarmThread.run(AlarmManagerService.java:636)
02-12 18:27:10.655: INFO/ActivityManager(74): Start proc xx.yy for
service xx.yy/.widget.RefreshService: pid=1687 uid=10025 gids={3003,
1015}
02-12 18:27:10.705: INFO/ActivityManager(74): Process xx.yy(pid 1676)
has died.
02-12 18:27:10.805: DEBUG/SurfaceFlinger(74): Screen about to return,
flinger = 0x189700
02-12 18:27:10.875: INFO/WindowManager(74): onOrientationChanged,
rotation changed to 0
02-12 18:27:10.935: INFO/dalvikvm(1687): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=38)
02-12 18:27:10.955: WARN/ActivityManager(74): No pending application
record for pid 1687 (IApplicationThread
android.app.applicationthreadpr...@434eae58); dropping process
WE DON'T UNDERSTAND THE BEHAVIOR ABOVE.
02-12 18:27:10.955: INFO/Process(74): Sending signal. PID: 1687 SIG: 9
02-12 18:27:10.985: INFO/Bluetooth AT sent(115): +CIEV: 5,4
02-12 18:27:15.805: DEBUG/Sensors(74): sensors=00000000, real=00000000
02-12 18:27:15.955: DEBUG/AKMD(56): Compass CLOSE
02-12 18:27:16.155: DEBUG/SurfaceFlinger(74): About to give-up screen,
flinger = 0x189700
02-12 18:31:33.800: DEBUG/NetworkLocationProvider(74):
onDataConnectionStateChanged 1
...
DUMP OF SERVICE activity.services:
Services in Current Activity Manager State:
Active services:
* ServiceRecord{4360d070 xx.yy/.widget.RefreshService}
intent={cmp=xx.yy/.widget.RefreshService}
packageName=xx.yy
processName=xx.yy
baseDir=/data/app/xx.yy.apk/data/app/xx.yy.apk dataDir=/data/data/
xx.yy
app=ProcessRecord{434e9810 0:xx.yy/10025}
isForeground=false lastActivity=-241595
startRequested=true startId=1 executeNesting=2
executingStart=-236564 crashCount=0
totalRestartCount=1 restartCount=1 restartDelay=5000
restartTime=-241595 nextRestartTime=-236564
...
Pending services:
* Pending ServiceRecord{4360d070 xx.yy/.widget.RefreshService}
intent={cmp=xx.yy/.widget.RefreshService}
packageName=xx.yy
processName=xx.y
baseDir=/data/app/xx.yy.apk/data/app/xx.yy.apk dataDir=/data/data/
xx.yy
app=ProcessRecord{434e9810 0:xx.yy/10025}
isForeground=false lastActivity=-241694
startRequested=true startId=1 executeNesting=2
executingStart=-236663 crashCount=0
totalRestartCount=1 restartCount=1 restartDelay=5000
restartTime=-241694 nextRestartTime=-236663
...
Restarting services:
* Restarting ServiceRecord{4360d070 xx.yy/.widget.RefreshService}
intent={cmp=xx.yy/.widget.RefreshService}
packageName=xx.yy
processName=xx.yy
baseDir=/data/app/xx.yy.apk/data/app/xx.yy.apk dataDir=/data/data/
xx.yy
app=ProcessRecord{434e9810 0:xx.yy/10025}
isForeground=false lastActivity=-241734
startRequested=true startId=1 executeNesting=2
executingStart=-236703 crashCount=0
totalRestartCount=1 restartCount=1 restartDelay=5000
restartTime=-241734 nextRestartTime=-236703
Thanks again for any help you could provide.
Cheers.
On Jan 7, 1:29 am, Dianne Hackborn <[email protected]> wrote:
> You probably want to fix the cause of your service crashing, so... what is
> the actual stack crawl of the exception? You don't show that anywhere.
>
> On Wed, Jan 6, 2010 at 2:03 PM, Derek <[email protected]> wrote:
> > Hi again,
>
> > Our service is still crashing for some reason not related to our
> > application. To make sure it's not RunTime exception we've used a :
> > try
> > {
> > // Get WakeLock
> > // Perform actions
> > }
> > catch (Throwable t)
> > {
> > // log error (if any)
> > }
> > finally
> > {
> > // Schedule a new service startup and PendingIntent an AlarmManager
> > long tick = 60000L;
> > long nextUpdate = System.currentTimeMillis();
> > nextUpdate += (tick - nextUpdate % tick);
> > Intent updateIntent = new Intent();
> > updateIntent.setClass(this, RefreshService.class);
> > PendingIntent pendingIntent = PendingIntent.getService(this, 0,
> > updateIntent, 0);
> > AlarmManager alarmManager = (AlarmManager)getSystemService
> > (Context.ALARM_SERVICE);
> > alarmManager.set(AlarmManager.RTC, nextUpdate, pendingIntent);
> > // Release WakeLock
> > ...
> > }
> > stopSelf();
>
> > The service is still crashing randomly on real device (Android 1.6/HTC
> > Magic) and it does not restart. It's not a problem of Taskiller
> > because it is not installed.
> > Here are the logs:
> > 01-06 21:18:00.653: INFO/ActivityManager(75): Stopping service:
> > xx.yy/.widget.RefreshService
> > 01-06 21:18:06.283: DEBUG/dalvikvm(1318): GC freed 4957 objects /
> > 283104 bytes in 110ms
> > // Problem starts here.
> > 01-06 21:18:59.153: INFO/ActivityManager(75): Process xx.yy(pid 1318)
> > has died.
> > 01-06 21:21:33.530: INFO/ActivityManager(75): Start proc xx.yyfor
> > service xx.yy/.widget.RefreshService: pid=1339 uid=10031 gids={3003,
> > 1015}
> > 01-06 21:21:33.720: INFO/dalvikvm(1339): Debugger thread not active,
> > ignoring DDM send (t=0x41504e4d l=38)
> > 01-06 21:21:33.750: INFO/dalvikvm(1339): Debugger thread not active,
> > ignoring DDM send (t=0x41504e4d l=48)
> > 01-06 21:21:34.520: INFO/ActivityManager(75): Stopping service:
> > xx.yy/.widget.RefreshService
> > 01-06 21:23:11.526: ERROR/JavaBinder(75): !!! FAILED BINDER
> > TRANSACTION !!!
> > 01-06 21:23:11.536: ERROR/JavaBinder(75): !!! FAILED BINDER
> > TRANSACTION !!!
> > 01-06 21:23:11.635: INFO/ActivityManager(75): Process xx.yy(pid 1339)
> > has died.
> > 01-06 21:23:11.686: WARN/ActivityManager(75): Scheduling restart of
> > crashed service xx.yy/.widget.RefreshService in 5000ms
> > 01-06 21:23:16.736: INFO/ActivityManager(75): Start proc xx.yy for
> > service xx.yy/.widget.RefreshService: pid=1349 uid=10031 gids={3003,
> > 1015}
> > 01-06 21:23:16.825: INFO/dalvikvm(1349): Debugger thread not active,
> > ignoring DDM send (t=0x41504e4d l=38)
> > 01-06 21:23:16.855: INFO/dalvikvm(1349): Debugger thread not active,
> > ignoring DDM send (t=0x41504e4d l=48)
> > // But service never restarts !
>
> > We've run the following command according to Dianne advice: "adb shell
> > dumpsys activity.services" and we can see our service but it is not
> > executed.
>
> > Currently running services:
> > activity.services
>
> > -------------------------------------------------------------------------------
> > DUMP OF SERVICE activity.services:
> > Services in Current Activity Manager State:
> > Active services:
> > * ServiceRecord{43563d78 xx.yy/.widget.RefreshService}
> > intent={cmp=xx.yy/.widget.RefreshService}
> > packageName=xx.yy
> > processName=xx.uu
> > baseDir=/data/app/xx.yy.apk/data/app/xx.yy.apk dataDir=/data/data/
> > xx.yy
> > app=ProcessRecord{4348d8f8 1349:xx.yy/10031}
> > isForeground=false lastActivity=-675021
> > startRequested=true startId=1 executeNesting=0
> > executingStart=-675021 crashCount=0
> > totalRestartCount=1 restartCount=1 restartDelay=5000
> > restartTime=-675021 nextRestartTime=-675183
>
> > * ServiceRecord{43471978
> > com.google.android.location/.NetworkLocationService}
> > intent={cmp=com.google.android.location/.NetworkLocationService}
> > packageName=com.google.android.location
> > processName=system
> > baseDir=/system/app/NetworkLocation.apk/system/app/
> > NetworkLocation.apk dataDir=/data/data/com.google.android.location
> > app=ProcessRecord{433869d8 75:system/1000}
> > isForeground=false lastActivity=-6811360
> > startRequested=true startId=1 executeNesting=0
> > executingStart=-6811353 crashCount=0
> > totalRestartCount=0 restartCount=0 restartDelay=0
> > restartTime=-6811360 nextRestartTime=-6857706
>
> > * ServiceRecord{43430480
> > com.google.android.googleapps/.GoogleLoginService}
> > intent={cmp=com.google.android.googleapps/.GoogleLoginService}
> > packageName=com.google.android.googleapps
> > processName=com.google.process.gapps
> > baseDir=/system/app/GoogleApps.apk/system/app/GoogleApps.apk
> > dataDir=/data/data/com.google.android.googleapps
> > app=ProcessRecord{4337a268 149:com.google.process.gapps/10015}
> > isForeground=false lastActivity=-330241
> > startRequested=false startId=0 executeNesting=0
> > executingStart=-6812034 crashCount=0
> > totalRestartCount=0 restartCount=0 restartDelay=0
> > restartTime=-6816373 nextRestartTime=-6857714
>
> > * IntentBindRecord{4345a4d0}:
> > intent={act=android.accounts.IAccountsService
> > cmp=com.google.android.googleapps/.GoogleLoginService}
> > binder=android.os.binderpr...@4345adc8
> > requested=true received=true hasBound=false doRebind=false
>
> > * IntentBindRecord{43430848}:
> > intent={cmp=com.google.android.googleapps/.GoogleLoginService}
> > binder=android.os.binderpr...@43438fa0
> > requested=true received=true hasBound=true doRebind=false
>
> > * Client AppBindRecord{43430918 ProcessRecord{4337a268
> > 149:com.google.process.gapps/10015}}
> > Per-process Connections:
> > ConnectionRecord{43398190
> > com.google.android.googleapps/.GoogleLoginService:@433a3768}
> > ConnectionRecord{433b9908
> > com.google.android.googleapps/.GoogleLoginService:@433b9878}
> > ConnectionRecord{433e7338
> > com.google.android.googleapps/.GoogleLoginService:@433e2100}
>
> > All Connections:
> > ConnectionRecord{433e7338
> > com.google.android.googleapps/.GoogleLoginService:@433e2100}
> > ConnectionRecord{433b9908
> > com.google.android.googleapps/.GoogleLoginService:@433b9878}
> > ConnectionRecord{43398190
> > com.google.android.googleapps/.GoogleLoginService:@433a3768}
>
> > * ServiceRecord{43340138
> > com.google.android.server.checkin/.CheckinService}
> > intent={cmp=com.google.android.server.checkin/.CheckinService}
> > packageName=com.google.android.server.checkin
> > processName=system
> > baseDir=/system/app/GoogleCheckin.apk/system/app/GoogleCheckin.apk
> > dataDir=/data/data/com.google.android.server.checkin
> > app=ProcessRecord{433869d8 75:system/1000}
> > isForeground=false lastActivity=-6827000
> > startRequested=true startId=1 executeNesting=0
> > executingStart=-6826997 crashCount=0
> > totalRestartCount=0 restartCount=0 restartDelay=0
> > restartTime=-6827000 nextRestartTime=-6857736
>
> > * ServiceRecord{4346d038 com.google.android.apps.gtalkservice/
> > com.google.android.gtalkservice.service.GTalkService}
> > intent={cmp=com.google.android.apps.gtalkservice/
> > com.google.android.gtalkservice.service.GTalkService}
> > packageName=com.google.android.apps.gtalkservice
> > processName=com.google.process.gapps
>
> > permission=com.google.android.gtalkservice.permission.GTALK_SERVICE
> > baseDir=/system/app/gtalkservice.apk/system/app/gtalkservice.apk
> > dataDir=/data/data/com.google.android.apps.gtalkservice
> > app=ProcessRecord{4337a268 149:com.google.process.gapps/10015}
> > isForeground=false lastActivity=-6811451
> > startRequested=true startId=1 executeNesting=0
> > executingStart=-6811446 crashCount=0
> > totalRestartCount=0 restartCount=0 restartDelay=0
> > restartTime=-6811451 nextRestartTime=-6857744
>
> > * ServiceRecord{433c6970 com.android.phone/.BluetoothHeadsetService}
> > intent={cmp=com.android.phone/.BluetoothHeadsetService}
> > packageName=com.android.phone
> > processName=com.android.phone
> > baseDir=/system/app/Phone.apk/system/app/Phone.apk dataDir=/data/
> > data/com.android.phone
> > app=ProcessRecord{4335dba0 118:com.android.phone/1001}
> > isForeground=false lastActivity=-6822206
> > startRequested=true startId=1 executeNesting=0
> > executingStart=-6006342 crashCount=0
> > totalRestartCount=0 restartCount=0 restartDelay=0
> > restartTime=-6822206 nextRestartTime=-6857753
>
> > * IntentBindRecord{43465dc8}:
> > intent={act=android.bluetooth.IBluetoothHeadset}
> > binder=android.os.binderpr...@434660d8
> > requested=true received=true hasBound=false doRebind=false
> > * Client AppBindRecord{434f1f50 ProcessRecord{4335dba0
> > 118:com.android.phone/1001}}
> > Per-process Connections:
> > ConnectionRecord{434f2020
> > com.android.phone/.BluetoothHeadsetService:@434f1dd0}
>
> > All Connections:
> > ConnectionRecord{434f2020
> > com.android.phone/.BluetoothHeadsetService:@434f1dd0}
>
> > * ServiceRecord{4323e190 com.android.inputmethod.latin/.LatinIME}
> > intent={act=android.view.InputMethod
> > cmp=com.android.inputmethod.latin/.LatinIME}
> > packageName=com.android.inputmethod.latin
> > processName=com.android.inputmethod.latin
> > permission=android.permission.BIND_INPUT_METHOD
> > baseDir=/system/app/LatinIME.apk/system/app/LatinIME.apk dataDir=/
> > data/data/com.android.inputmethod.latin
> > app=ProcessRecord{4342f8f8 285:com.android.inputmethod.latin/
> > 10006}
> > isForeground=false lastActivity=-6737471
> > startRequested=false startId=0 executeNesting=0
> > executingStart=-6737464 crashCount=0
> > totalRestartCount=0 restartCount=0 restartDelay=0
> > restartTime=-6737471 nextRestartTime=-6857768
>
> > * IntentBindRecord{433f1c80}:
> > intent={act=android.view.InputMethod
> > cmp=com.android.inputmethod.latin/.LatinIME}
> > binder=android.os.binderpr...@43385cd8
> > requested=true received=true hasBound=true doRebind=false
>
> > * Client AppBindRecord{4329e058 ProcessRecord{433869d8 75:system/
> > 1000}}
>
> > Per-process Connections:
> > ConnectionRecord{43294410
>
> ...
>
> read more »
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en