如何检测 Android 上无提示故障的原因?

发布于 2024-12-17 16:49:38 字数 828 浏览 2 评论 0原文

我正在调试一个 Android 应用程序,其中一项活动悄无声息地失败了;它从返回堆栈中弹出,我得到了之前的活动。

我见过这种类型的静默故障,可能是由于内存问题造成的,但在这种情况下,我在没有附加调试器的情况下进行测试。 logcat 几乎没有显示任何信息:在触摸监听器输出一些信息后,我得到

I/DEBUG(85): debuggerd committing suicide to free the zombie!
I/DEBUG(24919): debuggerd: Jul  8 2011 06:16:01
I/ActivityManager(157): Process com.tse.newsreader (pid 24415) has died.
I/WindowManager(157): WIN DEATH: Window{4108f938 com.tse.newsreader/com.tse.newsreader.activities.StorefrontFragmentActivity paused=false}

com.tse.newsreader 是我们的进程。

我想知道这是否是由某处内存泄漏引起的,我希望将 HPROF 转储添加到全局异常处理程序中,有点如 有没有办法在应用程序崩溃时进行内存转储?但是如果没有异常或OutOfMemoryError 来捕获,我不知道这有什么帮助。

谁能建议我如何找出这些无声故障的原因?

I am debugging an Android application and one of the activities just failed silently; it popped off the back stack and I got the previous activity.

I've seen silent failures of this type that can be attributed to memory problems, but in this case I am testing without the debugger attached. The logcat shows virtually no information: after some output from our touch listeners, I get

I/DEBUG(85): debuggerd committing suicide to free the zombie!
I/DEBUG(24919): debuggerd: Jul  8 2011 06:16:01
I/ActivityManager(157): Process com.tse.newsreader (pid 24415) has died.
I/WindowManager(157): WIN DEATH: Window{4108f938 com.tse.newsreader/com.tse.newsreader.activities.StorefrontFragmentActivity paused=false}

com.tse.newsreader is our process.

I would like to know if this is caused by a memory leak somewhere and I was hoping to add an HPROF dump to a global exception handler, somewhat as described in Is there a way to take a memory dump on app crash? but if there is no exception or OutOfMemoryError to catch, I don't see how that will help.

Can anyone suggest how I can get at the cause of these silent failures?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑看君怀她人 2024-12-24 16:49:38

我不确定这是否是您的意思,但您可以考虑在您的应用程序中添加类似 bugsense 的内容。它将拾取未捕获的异常。

I'm not sure if this is what you mean, but you could consider adding something like bugsense to your app. It will pick up uncaught exceptions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文