Anyone ? Thanks.
On Feb 12, 7:35 pm, Derek <[email protected]> wrote: > 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 > > ... > > 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

