使用高级任务管理器关闭并重新打开我们的应用程序后,应用程序和有时设备崩溃
我们有一个 Android Honeycomb 应用程序,在使用高级任务管理器应用程序关闭后显示出奇怪的行为。如果通过“设置”->“应用程序”->“管理应用程序”关闭应用程序,则不会发生相同的错误
使用高级任务管理器终止应用程序然后重新打开应用程序时,应用程序崩溃,有时整个平板电脑崩溃并重新启动。堆栈跟踪显示它启动了我们的启动活动,然后调用第二个活动。 Activity2 由于某种原因未启动,并尝试一次又一次启动。每次尝试启动 Activity2 时,都会为 Activity2 启动一个新意图。在应用程序(有时甚至是设备)崩溃之前,这种情况会发生几十次或几百次。代码中没有循环或任何在启动失败后尝试启动 Activity 2 的内容,因此我不确定为什么会发生这种情况。
我在 LogCat 中注意到两种不同的关闭应用程序的方法之间的唯一区别是“暂停”字段:
使用设置:
11-30 17:24:57.840: INFO/WindowManager(4524): WIN DEATH: Window{41d67198 com.path/com.path.MainViewLayout paused=true}
使用高级任务管理器:
11-30 17:20:19.930: INFO/WindowManager(143): WIN DEATH: Window{40eac9f0 com.path/com.path.MainViewLayout paused=false}
我不确定该字段的含义,但我怀疑应用程序可能使用高级任务管理器时尝试恢复并在设置方法后开始新的操作。
有谁知道这里会发生什么?
We have an android Honeycomb app that shows a strange behavior after closing with the Advanced Task Manager app. The same error does not happen if the app is closed through Settings->Applications->Manage application
When using Advanced Task Manager to kill the app and then reopen the app, the app crashes and sometimes the entire tablet crashes and restarts. The stack trace shows that it starts our start up activity, which then calls the second activity. Activity2 does not launch for some reason and tries to launch again and again. A new intent is started for Activity2 each time it tries to launch it. This happens a few dozen or hundred times before the app, and sometimes the device, crashes. There is no loop or anything in the code that attempts to launch Activity 2 after a failed launch, so I'm not sure why this is happening.
The only difference I've noticed in LogCat between the two different methods of closing the app is the "paused" field:
Using settings:
11-30 17:24:57.840: INFO/WindowManager(4524): WIN DEATH: Window{41d67198 com.path/com.path.MainViewLayout paused=true}
Using Advanced Task Manager:
11-30 17:20:19.930: INFO/WindowManager(143): WIN DEATH: Window{40eac9f0 com.path/com.path.MainViewLayout paused=false}
I'm not sure what that field means, but I suspect that perhaps the app is trying to resume when using the Advanced Task Manager and starting new after the Settings method.
Does anyone know what might be going on here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论