如何调试"深"在崩溃的Andr​​oid? [英] how to debug "deep" crashes in Android?

查看:83
本文介绍了如何调试"深"在崩溃的Andr​​oid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图调试是没有一个Java堆栈跟踪发生的机器人崩溃... Java堆栈跟踪错误是很容易的,我修复......但这个错误我越来越似乎里面崩溃在NDK或不管它是Android的深层内部被称作......我做任何的修改对NDK顺便说一句...我只是不知道还有什么调用层嘿嘿。

反正我主要是寻找深调试方法的建议,而不是帮助这一特定问题的...因为我怀疑我可以张贴涉及的所有源$ C ​​$ C ......所以我真的只需要知道如何在深层设置断点或任何其他的方法有很跟踪深崩溃其来源...所以我将简要介绍了错误,然后张贴LogCat中。

我有7活动的应用程序

  Activity_INTRO
Activity_EULA
Activity_MAIN
Activity_Contact
Activity_News
Activity_Library
Activity_More

INTRO是发起一层...它消失在一些公司的标志......他们展示它跳到EULA活动设定的时间......用户接受EULA后,就跳转到主后...主要然后创建一个TabHost,并与其余4个活动填充它。

现在继承人的事情...当我点击比方说,TabHost的更多选项卡,应用程序停顿了几秒钟,然后硬崩溃...没有Java堆栈跟踪,但实际的ASM水平与跟踪寄存器和IP和堆栈...同样的事情发生,无论我选择哪个选项卡,联系人,新闻,图书馆,详细信息...所有的人都崩溃具有相同的硬崩溃

如果然而,我设定的清单,开始在Activity_MAIN应用程序,绕过前奏和最终用户许可协议,那么这些事故就不会发生......所以东西是从这些开业活动以某种方式冲水的TabHost'ed活动挥之不去.. 。我想知道到底这可能是什么......因为我使用这些activites完成(),当他们需要跳转......其实这里我如何做它让我知道,如果你看到任何错误:

从INTRO跳跃到最终用户许可协议时,我做的:

  //显示EULA意图newIntent =新意图(AVI,Activity_EULA.class);startActivity(newIntent);完();和EULA到MAIN:意图newIntent =新意图(这一点,Activity_Main.class);startActivity(newIntent);完();

反正这里是硬盘崩溃日志...请让我知道如果有什么办法可以进行反向工程
/system/lib/libcutils.so /system/lib/libandroid_runtime.so ,因为我认为飞机坠毁发生在其中的一个......我认为它在事实上libandroid_runtime发生....反正到日志:

  00 12-25:56:07.322:信息/ DEBUG(551):*** *** *** *** *** *** *** * ** *** *** *** *** *** *** *** ***12-25 00:56:07.332:信息/ DEBUG(551):建立指纹:通用/ SDK /通用/ 1.5 / CUPCAKE / 150240:主机/测试键12-25 00:56:07.362:信息/ DEBUG(551):PID:722,TID:723>>> com.killerapps.chokes<<<12-25 00:56:07.362:信息/ DEBUG(551):11(SIGSEGV),故障地址0000000412-25 00:56:07.362:信息/ DEBUG(551):R0,R1 00000004 40021800 00000004 R2 R3 ad3296c512-25 00:56:07.372:信息/ DEBUG(551):R4 00000000 00000000 R5 R6 R7 ad342da5 41039fb812-25 00:56:07.372:信息/ DEBUG(551):R8 100ffcb0 R9 41039fb0 10 41e014a0 FP 0000107112-25 00:56:07.382:信息/ DEBUG(551):IP ad35b874 SP 100ffc98 LR ad3296cf PC afb045a8 CPSR 0000001012-25 00:56:07.552:信息/ DEBUG(551):#00件000045a8 /system/lib/libcutils.so12-25 00:56:07.572:信息/ DEBUG(551):#01 LR ad3296cf /system/lib/libandroid_runtime.so12-25 00:56:07.582:信息/ DEBUG(551):堆栈:12-25 00:56:07.582:信息/ DEBUG(551):100ffc58 0000000012-25 00:56:07.592:信息/ DEBUG(551):100ffc5c 001c5278 [堆]12-25 00:56:07.602:信息/ DEBUG(551):100ffc60 000000da12-25 00:56:07.602:信息/ DEBUG(551):100ffc64 0016c778 [堆]12-25 00:56:07.602:信息/ DEBUG(551):100ffc68 100ffcc812-25 00:56:07.602:信息/ DEBUG(551):100ffc6c 001c5278 [堆]12-25 00:56:07.612:信息/ DEBUG(551):100ffc70 427d1ac012-25 00:56:07.612:信息/ DEBUG(551):100ffc74 000000c112-25 00:56:07.612:信息/ DEBUG(551):100ffc78 4002180012-25 00:56:07.612:信息/ DEBUG(551):100ffc7c 000000C212-25 00:56:07.612:信息/ DEBUG(551):100ffc80 0000000012-25 00:56:07.612:信息/ DEBUG(551):100ffc84 0000000012-25 00:56:07.622:信息/ DEBUG(551):100ffc88 0000000012-25 00:56:07.622:信息/ DEBUG(551):100ffc8c 0000000012-25 00:56:07.622:信息/ DEBUG(551):100ffc90 df00277712-25 00:56:07.632:信息/ DEBUG(551):100ffc94 e3a070ad12-25 00:56:07.632:信息/ DEBUG(551):#00 100ffc98 0000000012-25 00:56:07.632:信息/ DEBUG(551):100ffc9c ad3296cf /system/lib/libandroid_runtime.so12-25 00:56:07.632:信息/ DEBUG(551):100ffca0 100ffcd012-25 00:56:07.642:信息/ DEBUG(551):100ffca4 ad342db5 /system/lib/libandroid_runtime.so12-25 00:56:07.642:信息/ DEBUG(551):100ffca8 410a79d012-25 00:56:07.642:信息/ DEBUG(551):100ffcac ad00e3b8 /system/lib/libdvm.so12-25 00:56:07.652:信息/ DEBUG(551):100ffcb0 410a79d012-25 00:56:07.652:信息/ DEBUG(551):100ffcb4 0016bac0 [堆]12-25 00:56:07.662:信息/ DEBUG(551):100ffcb8 ad342da5 /system/lib/libandroid_runtime.so12-25 00:56:07.662:信息/ DEBUG(551):100ffcbc 4002180012-25 00:56:07.662:信息/ DEBUG(551):100ffcc0 410a79d012-25 00:56:07.662:信息/ DEBUG(551):100ffcc4 afe39dd012-25 00:56:07.662:信息/ DEBUG(551):100ffcc8 100ffcd012-25 00:56:07.662:信息/ DEBUG(551):100ffccc ad040a8d /system/lib/libdvm.so12-25 00:56:07.672:信息/ DEBUG(551):100ffcd0 41039fb012-25 00:56:07.672:信息/ DEBUG(551):100ffcd4 420000f812-25 00:56:07.672:信息/ DEBUG(551):100ffcd8 ad342da5 /system/lib/libandroid_runtime.so12-25 00:56:07.672:信息/ DEBUG(551):100ffcdc 100ffd4812-25 00:56:07.852:DEBUG / dalvikvm(722):GC释放367对象/在210ms 15144字节12-25 00:56:08.081:DEBUG / InetAddress类(722):www.akillerapp.com:74.86.47.202(家庭2,原6)12-25 00:56:08.242:DEBUG / dalvikvm(722):GC释放62的对象/在122ms 2328字节12-25 00:56:08.771:DEBUG / dalvikvm(722):GC释放245对象​​/在179ms 11744字节12-25 00:56:09.131:信息/ ActivityManager(577):进程com.killerapps.chokes(PID 722)已经死亡。12-25 00:56:09.171:信息/窗口管理器(577):WIN DEATH:窗口{43719320
com.killerapps.chokes / com.killerapps.chokes.Activity_Main暂停= FALSE}12-25 00:56:09.251:信息/ DEBUG(551):debuggerd自杀释放僵尸!12-25 00:56:09.291:DEBUG /受精卵(553):由信号终止进程722(11)12-25 00:56:09.311:信息/ DEBUG(781):debuggerd:2009年6月30日17点00分51秒12-25 00:56:09.331:WARN / InputManagerService(577​​):GOT的RemoteException发送
SETACTIVE(假)的通知为PID 722 UID 10020


解决方案

这崩溃似乎是从Android固件。它不应该是可能的一个SDK开发造成其中之一,因此它意味着要么是在Android或设备中的错误。

如果你可以创建一个测试项目,可靠地重现此崩溃,打开一个问题上 http://b.android.com 并重视它,上面显示你的核心转储跟踪和任何其他有用的信息。通常情况下,我会说你应该先搜索b.android.com,但我不知道是什么轨迹的位是十分明显的,以确定您的崩溃之前已经或没有报告。

I've been trying to debug an android crash that is occurring without a Java Stack Trace... Java Stack Trace bugs are very easy for me to fix... but this bug I'm getting seems to be crashing inside the "NDK" or whatever it is the deep internals of Android are called... I've made no modifications to the NDK btw... I just dunno what else to call that layer hehe.

Anyway I'm mainly looking for advice on deep-debug methods, rather than help with this specific problem... because I doubt I can post all the source code involved... so really I just need to know how to set breakpoints at the deep layers or whatever other methods there are to trace deep-crashes to their source... so I will briefly describe the bug and then post a LogCat.

I have an app with 7 Activities

Activity_INTRO
Activity_EULA
Activity_MAIN
Activity_Contact
Activity_News
Activity_Library
Activity_More

INTRO is the initiating one... it fades in some company logos... after displaying them for a set time it jumps to the EULA activity... after the user accepts the EULA, it jumps to MAIN... MAIN then creates a TabHost and populates it with the 4 remaining activities

now heres the thing... when I click on say, the More tab of the TabHost, the app pauses for a few seconds and then hard-crashes... no java stack trace, but an actual ASM level trace with the registers and IP and stack... the same thing occurs no matter which tab I select, Contact, News, Library, More... all of them crash with the same hard-crash

if however I set the manifest to start the app at Activity_MAIN, bypassing the INTRO and EULA, then these crashes do not occur... so something is lingering from those opening activities that is somehow hosing the TabHost'ed Activities... and I'm wondering what the hell that could be... because I'm using finish() on those activites when they need to jump... in fact here is how I'm doing it let me know if you see any bugs:

when jumping from INTRO to EULA I do:

//Display the EULA

Intent newIntent = new Intent (avi, Activity_EULA.class);

startActivity (newIntent);

finish();



and EULA to MAIN:

Intent newIntent = new Intent (this, Activity_Main.class);

startActivity (newIntent);

finish();

anyway, here is the hard crash log... please let me know if there is some way I can reverse engineer either /system/lib/libcutils.so or /system/lib/libandroid_runtime.so, because I think the crash is happening in one of them... i think its happening in the libandroid_runtime in fact.... anyway on to the log:

12-25 00:56:07.322: INFO/DEBUG(551): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

12-25 00:56:07.332: INFO/DEBUG(551): Build fingerprint: 'generic/sdk/generic/:1.5/CUPCAKE/150240:eng/test-keys'

12-25 00:56:07.362: INFO/DEBUG(551): pid: 722, tid: 723  >>> com.killerapps.chokes <<<

12-25 00:56:07.362: INFO/DEBUG(551): signal 11 (SIGSEGV), fault addr 00000004

12-25 00:56:07.362: INFO/DEBUG(551):  r0 00000004  r1 40021800  r2 00000004  r3 ad3296c5

12-25 00:56:07.372: INFO/DEBUG(551):  r4 00000000  r5 00000000  r6 ad342da5  r7 41039fb8

12-25 00:56:07.372: INFO/DEBUG(551):  r8 100ffcb0  r9 41039fb0  10 41e014a0  fp 00001071

12-25 00:56:07.382: INFO/DEBUG(551):  ip ad35b874  sp 100ffc98  lr ad3296cf  pc afb045a8  cpsr 00000010

12-25 00:56:07.552: INFO/DEBUG(551):          #00  pc 000045a8  /system/lib/libcutils.so

12-25 00:56:07.572: INFO/DEBUG(551):          #01  lr ad3296cf  /system/lib/libandroid_runtime.so

12-25 00:56:07.582: INFO/DEBUG(551): stack:

12-25 00:56:07.582: INFO/DEBUG(551):     100ffc58  00000000  

12-25 00:56:07.592: INFO/DEBUG(551):     100ffc5c  001c5278  [heap]

12-25 00:56:07.602: INFO/DEBUG(551):     100ffc60  000000da  

12-25 00:56:07.602: INFO/DEBUG(551):     100ffc64  0016c778  [heap]

12-25 00:56:07.602: INFO/DEBUG(551):     100ffc68  100ffcc8  

12-25 00:56:07.602: INFO/DEBUG(551):     100ffc6c  001c5278  [heap]

12-25 00:56:07.612: INFO/DEBUG(551):     100ffc70  427d1ac0  

12-25 00:56:07.612: INFO/DEBUG(551):     100ffc74  000000c1  

12-25 00:56:07.612: INFO/DEBUG(551):     100ffc78  40021800  

12-25 00:56:07.612: INFO/DEBUG(551):     100ffc7c  000000c2  

12-25 00:56:07.612: INFO/DEBUG(551):     100ffc80  00000000  

12-25 00:56:07.612: INFO/DEBUG(551):     100ffc84  00000000  

12-25 00:56:07.622: INFO/DEBUG(551):     100ffc88  00000000  

12-25 00:56:07.622: INFO/DEBUG(551):     100ffc8c  00000000  

12-25 00:56:07.622: INFO/DEBUG(551):     100ffc90  df002777  

12-25 00:56:07.632: INFO/DEBUG(551):     100ffc94  e3a070ad  

12-25 00:56:07.632: INFO/DEBUG(551): #00 100ffc98  00000000  

12-25 00:56:07.632: INFO/DEBUG(551):     100ffc9c  ad3296cf  /system/lib/libandroid_runtime.so

12-25 00:56:07.632: INFO/DEBUG(551):     100ffca0  100ffcd0  

12-25 00:56:07.642: INFO/DEBUG(551):     100ffca4  ad342db5  /system/lib/libandroid_runtime.so

12-25 00:56:07.642: INFO/DEBUG(551):     100ffca8  410a79d0  

12-25 00:56:07.642: INFO/DEBUG(551):     100ffcac  ad00e3b8  /system/lib/libdvm.so

12-25 00:56:07.652: INFO/DEBUG(551):     100ffcb0  410a79d0  

12-25 00:56:07.652: INFO/DEBUG(551):     100ffcb4  0016bac0  [heap]

12-25 00:56:07.662: INFO/DEBUG(551):     100ffcb8  ad342da5  /system/lib/libandroid_runtime.so

12-25 00:56:07.662: INFO/DEBUG(551):     100ffcbc  40021800  

12-25 00:56:07.662: INFO/DEBUG(551):     100ffcc0  410a79d0  

12-25 00:56:07.662: INFO/DEBUG(551):     100ffcc4  afe39dd0  

12-25 00:56:07.662: INFO/DEBUG(551):     100ffcc8  100ffcd0  

12-25 00:56:07.662: INFO/DEBUG(551):     100ffccc  ad040a8d  /system/lib/libdvm.so

12-25 00:56:07.672: INFO/DEBUG(551):     100ffcd0  41039fb0  

12-25 00:56:07.672: INFO/DEBUG(551):     100ffcd4  420000f8  

12-25 00:56:07.672: INFO/DEBUG(551):     100ffcd8  ad342da5  /system/lib/libandroid_runtime.so

12-25 00:56:07.672: INFO/DEBUG(551):     100ffcdc  100ffd48  

12-25 00:56:07.852: DEBUG/dalvikvm(722): GC freed 367 objects / 15144 bytes in 210ms

12-25 00:56:08.081: DEBUG/InetAddress(722): www.akillerapp.com: 74.86.47.202 (family 2, proto 6)

12-25 00:56:08.242: DEBUG/dalvikvm(722): GC freed 62 objects / 2328 bytes in 122ms

12-25 00:56:08.771: DEBUG/dalvikvm(722): GC freed 245 objects / 11744 bytes in 179ms

12-25 00:56:09.131: INFO/ActivityManager(577): Process com.killerapps.chokes (pid 722) has died.

12-25 00:56:09.171: INFO/WindowManager(577): WIN DEATH: Window{43719320 
com.killerapps.chokes/com.killerapps.chokes.Activity_Main paused=false}

12-25 00:56:09.251: INFO/DEBUG(551): debuggerd committing suicide to free the zombie!

12-25 00:56:09.291: DEBUG/Zygote(553): Process 722 terminated by signal (11)

12-25 00:56:09.311: INFO/DEBUG(781): debuggerd: Jun 30 2009 17:00:51

12-25 00:56:09.331: WARN/InputManagerService(577): Got RemoteException sending 
setActive(false) notification to pid 722 uid 10020

解决方案

That crash appears to be from the Android firmware. It should not be possible for an SDK developer to cause one of these, and so it means there is a bug either in Android or your device.

If you can create a test project that reliably reproduces this crash, open an issue on http://b.android.com and attach it, along with your core dump trace shown above and any other useful information. Ordinarily, I would say you should search b.android.com first, but I don't know what bits of the trace are sufficiently distinctive to determine if your crash has been reported before or not.

这篇关于如何调试&QUOT;深&QUOT;在崩溃的Andr​​oid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆