"Scheduling restart of crashed service", but no call to onStart() follows
Posted
by kostmo
on Stack Overflow
See other posts from Stack Overflow
or by kostmo
Published on 2010-03-07T23:38:19Z
Indexed on
2010/03/28
5:33 UTC
Read the original article
Hit count: 353
android
In the 1.6 API, is there a way to ensure that the onStart() method of a Service is called after the service is killed due to memory pressure? From the logs, it seems that the "process" that the service belongs to is restarted, but the service itself is not. I have placed a Log.d() call in the onStart() method, and this is not reached.
To test my service under memory pressure, I spawn it from an activity, then launch the web browser and visit some Javascript-heavy websites like Slashdot until my service is killed. The logcat reads:
03-07 16:44:13.778: INFO/ActivityManager(52): Process com.kostmo.charbuilder.full (pid 2909) has died.
03-07 16:44:13.778: WARN/ActivityManager(52): Scheduling restart of crashed service com.kostmo.charbuilder.full/com.kostmo.charbuilder.DownloadImagesService in 5000ms
03-07 16:44:13.778: INFO/ActivityManager(52): Low Memory: No more background processes.
03-07 16:44:13.778: ERROR/ActivityThread(52): Failed to find provider info for android.server.checkin
03-07 16:44:13.778: WARN/Checkin(52): Can't log event SYSTEM_SERVICE_LOOPING: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/events
03-07 16:44:18.908: INFO/ActivityManager(52): Start proc com.kostmo.charbuilder.full for service com.kostmo.charbuilder.full/com.kostmo.charbuilder.DownloadImagesService: pid=3560 uid=10027 gids={3003, 1015}
03-07 16:44:19.868: DEBUG/ddm-heap(3560): Got feature list request
03-07 16:44:20.128: INFO/ActivityThread(3560): Publishing provider com.kostmo.charbuilder.full.provider.character: com.kostmo.charbuilder.provider.ImageFileContentProvider
© Stack Overflow or respective owner