1

My application runs fine on any Google device. But when I try to run on a Kindle fire, it crashes. Right before the crash happens, Activity Monitor Logs show that around 15-20 processes that start with com.amazon die and are scheduled to restart. Then My app (which is running in the foreground) crashes and attempts to restart:

04-25 15:56:00.487: I/ActivityManager(861): Process com.qualcomm.wfd.service:wfd_service (pid 13715) has died.
04-25 15:56:00.517: I/ActivityManager(861): Process com.qualcomm.wiper (pid 13903) has died.
04-25 15:56:00.517: W/ActivityManager(861): Scheduling restart of crashed service com.qualcomm.wiper/.Wiper in 44738ms
04-25 15:56:00.567: I/WindowState(861): WIN DEATH: Window{421cb828 u0 com.amazon.kindle.otter/com.amazon.kindle.otter.Launcher}
04-25 15:56:00.567: I/ActivityManager(861): Process com.amazon.kindle.otter (pid 15113) has died.
04-25 15:56:00.737: I/ActivityManager(861): Process com.audible.application.kindle (pid 12920) has died.
04-25 15:56:00.737: W/ActivityManager(861): Scheduling restart of crashed service com.audible.application.kindle/com.audible.application.download.service.DownloadManagerService in 54521ms
04-25 15:56:00.737: W/ActivityManager(861): Scheduling restart of crashed service com.audible.application.kindle/com.audible.application.services.PlayerService in 64521ms
04-25 15:56:00.737: W/ActivityManager(861): Scheduling restart of crashed service com.audible.application.kindle/com.audible.application.AudibleContentManagementService in 74521ms
04-25 15:56:00.737: W/ActivityManager(861): Scheduling restart of crashed service com.audible.application.kindle/com.audible.application.media.AudioPlayerService in 84521ms
04-25 15:56:00.817: I/ActivityManager(861): Process com.amazon.zico (pid 13321) has died.
04-25 15:56:00.817: W/ActivityManager(861): Scheduling restart of crashed service com.amazon.zico/.service.LocalFileObserverService in 94443ms
04-25 15:56:00.857: I/ActivityManager(861): Process com.amazon.webview (pid 14116) has died.
04-25 15:56:00.857: W/ActivityManager(861): Scheduling restart of crashed service com.amazon.webview/.WarmupService in 94402ms
04-25 15:56:00.897: I/ActivityManager(861): Process com.ivona.tts.oem (pid 14231) has died.
04-25 15:56:00.897: W/ActivityManager(861): Scheduling restart of crashed service com.ivona.tts.oem/com.ivona.ttslib.engine.TTSServiceActivation in 104365ms
04-25 15:56:01.077: I/ActivityManager(861): Process com.amazon.platform (pid 14652) has died.
04-25 15:56:01.077: W/ActivityManager(861): Scheduling restart of crashed service com.amazon.platform/com.amazon.geo.platform.GeoDeviceService in 114186ms
04-25 15:56:01.117: I/ActivityManager(861): Process com.nokia.odnp.service:remote (pid 14738) has died.
04-25 15:56:01.117: W/ActivityManager(861): Scheduling restart of crashed service com.nokia.odnp.service/.OdnpService in 124145ms
04-25 15:56:01.397: I/ActivityManager(861): Process com.amazon.kindle.cms (pid 12817) has died.
04-25 15:56:01.397: W/ActivityManager(861): Scheduling restart of crashed service com.amazon.kindle.cms/.CMSService in 133859ms
04-25 15:56:01.397: W/ActivityManager(861): Scheduling restart of crashed service com.amazon.kindle.cms/.MaintenanceService in 143858ms
04-25 15:56:01.487: I/ActivityManager(861): Process com.nuance.swype.input:SwypeConnect (pid 12837) has died.
04-25 15:56:01.487: W/ActivityManager(861): Scheduling restart of crashed service com.nuance.swype.input/com.nuance.swype.connect.ConnectClient in 0ms
04-25 15:56:01.487: I/ActivityManager(861): Start proc com.nuance.swype.input:SwypeConnect for service com.nuance.swype.input/com.nuance.swype.connect.ConnectClient: pid=15792 uid=32062 gids={72062, 3003, 1015, 3002, 1028, 9001}
04-25 15:56:01.607: I/ActivityManager(861): Start proc com.amazon.kindle.cms for service com.amazon.kindle.cms/.CMSService: pid=15810 uid=32092 gids={72092, 1015, 3003, 1028, 9001}
04-25 15:56:01.657: I/ActivityManager(861): Process com.android.inputmethod.latin (pid 15740) has died.
04-25 15:56:01.657: W/ActivityManager(861): Scheduling restart of crashed service com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService in 153603ms
04-25 15:56:01.757: I/ActivityManager(861): Start proc com.amazon.device.settings:Settings for content provider com.amazon.device.settings/.SettingsProvider: pid=15830 uid=32086 gids={72086, 3003, 1028, 9001}
04-25 15:56:02.227: I/ActivityManager(861): Process com.theatavist.atavist (pid 15290) has died.
04-25 15:56:02.227: I/WindowState(861): WIN DEATH: Window{422de940 u0 com.theatavist.atavist/net.atavist.android.LaunchActivity}
04-25 15:56:02.237: W/ActivityManager(861): Force removing ActivityRecord{42941990 u0 com.theatavist.atavist/net.atavist.android.view.testPaging.TestPagerActivity}: app died, no saved state
04-25 15:56:02.237: I/WindowState(861): WIN DEATH: Window{423b0b38 u0 com.theatavist.atavist/net.atavist.android.StoreActivity}
04-25 15:56:02.247: I/WindowState(861): WIN DEATH: Window{4273e5c8 u0 com.theatavist.atavist/net.atavist.android.view.testPaging.TestPagerActivity}
04-25 15:56:02.247: V/DoNotDisturb(861): Top component: com.theatavist.atavist/net.atavist.android.StoreActivity
04-25 15:56:02.267: I/ActivityManager(861): Start proc com.theatavist.atavist for activity com.theatavist.atavist/net.atavist.android.StoreActivity: pid=15877 uid=10000 gids={50000, 1015, 3003, 1028}
04-25 15:56:02.297: D/WindowManager(861): openingActivityName = net.atavist.android.StoreActivity, animAttr = 4
04-25 15:56:02.297: V/DoNotDisturb(861): Top component: com.theatavist.atavist/net.atavist.android.StoreActivity
04-25 15:56:02.317: W/Settings(861): Setting default_input_method has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
04-25 15:56:02.337: D/ProfileManager(15877): Create ProfileManager instance
04-25 15:56:02.357: D/SurfaceTexture(424): [Starting com.theatavist.atavist] setFilteringEnabled called with mCurrentTextureBuf == NULL
04-25 15:56:02.367: I/Activity(15877): Constructing ActvityExender com.amazon.android.app.AmazonActivityExtender.
04-25 15:56:02.367: I/Activity(15877): Constructed ActvityExender com.amazon.android.app.AmazonActivityExtender.

There is no description of the crash itself, so I'm not sure how to fix. Does anyone have any ideas?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • 1
    Does a trivially simple app get killed as well? If not, split the difference in complexity between your app and a trivial example, repeatedly, until you figure out the cause. – Chris Stratton Apr 25 '14 at 16:15

1 Answers1

2

It may be an ANR.

I have a suite of about 400 unit tests that run fine on various other devices (including the Amazon Phone Fire) but fail on the Amazon Kindle Fire HDX 7".

When this "crash" happens there is no java stack trace and no c stack trace. The crash never happens on the same test. And, obviously, running those unit tests by themselves never causes an issue.

When the process finally exits, there isn't much fanfare beyond the normal unit test exist. E.g. there is a WIN DEATH log line, however even when the unit tests run successfully to completion it still announces WIN DEATH.

I have noticed something interesting though. When I monitor logcat using the following command:

adb logcat WindowState:I *:S

I see a page full of these:

I/WindowState(  826): WIN DEATH: Window{41968490 u0 com.amazon.kindle.otter/com.amazon.kindle.otter.Launcher}

When I sit there and watch the output, the pace of errors increases until my test app crashes.

According to some docs I've found, lack of response to a touch event in 5 sec, or a BroadcastReceiver running for 10 sec will cause an ANR in normal android. However, I don't know what amazon has done to it.

I did another test that passes a runnable to $getInstrumentation().runOnMainSync()$ which busy waits in an empty while loop for 120 seconds. That alone didn't cause the app to be killed, until I touched the back button. Then I see the same exact crash: window death, no stack trace, no c stack trace.

Also, in both the original crash and the deliberate ANR, I see a line mentioning ActivityRecord having difficulty (not always exactly this line):

W/ActivityManager(  826): Activity pause timeout for ActivityRecord{40fadb78 u0 com.amazon.kindle.otter/.Launcher}

I tried making the junit thread sleep for 1500ms after each thread, thinking that I was starving some background system of the UI thread (my unit tests cause 6,000 views to be created in a short amount of time), but that has not helped, and it has not noticeably delayed the crash either.