我的应用程序可在任何Google设备上正常运行。但是当我尝试在Kindle fire
上运行时,它会崩溃。在崩溃发生之前,活动监视器日志显示大约15-20个以com.amazon
开始的进程死亡并计划重新启动。然后我的应用程序(在前台运行)崩溃并尝试重新启动:
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.
没有关于崩溃本身的描述,所以我不确定如何修复。有没有人有任何想法?
答案 0 :(得分:2)
可能是ANR 。
我有一套大约400个单元测试,可以在其他各种设备(包括亚马逊电话火)上正常运行但在亚马逊Kindle Fire HDX 7上运行失败。
当发生“崩溃”时,没有Java堆栈跟踪,也没有c堆栈跟踪。崩溃永远不会发生在同一个测试中。而且,显然,自己运行这些单元测试从来不会引起问题。
当这个过程最终退出时,除了正常的单元测试之外没有太多的大张旗鼓。例如。有一个WIN DEATH日志行,但即使单元测试成功运行完成,它仍然会宣布胜利死亡。
我注意到了一些有趣的事情。当我使用以下命令监视logcat时:
adb logcat WindowState:I *:S
我看到一个满是这些的页面:
I/WindowState( 826): WIN DEATH: Window{41968490 u0 com.amazon.kindle.otter/com.amazon.kindle.otter.Launcher}
当我坐在那里观看输出时,错误的速度会增加,直到我的测试应用程序崩溃。
根据我发现的一些文档,在5秒内对触摸事件没有响应,或者运行10秒的BroadcastReceiver将导致正常android中的ANR。但是,我不知道亚马逊做了什么。
我做了另一个测试,将runnable传递给$ getInstrumentation()。runOnMainSync()$,busy在空循环中等待120秒。在触摸后退按钮之前,仅此一项并未导致应用程序被杀死。然后我看到同样的确切崩溃:窗口死亡,没有堆栈跟踪,没有c堆栈跟踪。
此外,在最初的崩溃和故意的ANR中,我看到一条线提到ActivityRecord有困难(并不总是这一行):
W/ActivityManager( 826): Activity pause timeout for ActivityRecord{40fadb78 u0 com.amazon.kindle.otter/.Launcher}
我尝试让junit线程在每个线程之后休眠1500ms,认为我正在饿死UI线程的一些后台系统(我的单元测试导致在短时间内创建6,000个视图),但是这没有帮助,并没有明显延迟崩溃。