【问题标题】:How to analyse stack trace of the exceptions which comes in the case of crashes in android如何分析android崩溃时出现的异常的堆栈跟踪
【发布时间】:2013-02-06 17:30:59
【问题描述】:

我正在使用 crittercism 工具获取崩溃报告。发生崩溃时我会收到邮件,但我没有了解显示崩溃日志的堆栈跟踪的含义。 例如:

0       java.util.ConcurrentModificationException
1   at  java.util.ArrayList$ArrayListIterator.next(ArrayList.java:607)
2   at  com.webaroo.replyall.utils.ah.d(Unknown Source)
3   at  com.webaroo.replyall.utils.ah.b(Unknown Source)
4   at  com.webaroo.privatechat.ui.f.getView(Unknown Source)
5   at  android.widget.AbsListView.obtainView(AbsListView.java:1448)
6   at  android.widget.ListView.makeAndAddView(ListView.java:1786)
7   at  android.widget.ListView.fillSpecific(ListView.java:1325)
8   at  android.widget.ListView.layoutChildren(ListView.java:1617)
9   at  com.webaroo.replyall.controls.CustomListView.layoutChildren(Unknown Source)
10  at  android.widget.AbsListView.onLayout(AbsListView.java:1299)
11  at  com.webaroo.replyall.controls.CustomListView.onLayout(Unknown Source)
12  at  android.view.View.layout(View.java:7225)
13  at  android.widget.RelativeLayout.onLayout(RelativeLayout.java:943)
14  at  android.view.View.layout(View.java:7225)
15  at  android.widget.FrameLayout.onLayout(FrameLayout.java:369)
16  at  android.view.View.layout(View.java:7225)
17  at  android.widget.FrameLayout.onLayout(FrameLayout.java:369)
18  at  android.view.View.layout(View.java:7225)
19  at  android.view.ViewRoot.performTraversals(ViewRoot.java:1189)
20  at  android.view.ViewRoot.handleMessage(ViewRoot.java:1914)
21  at  android.os.Handler.dispatchMessage(Handler.java:130)
22  at  android.os.Looper.loop(SourceFile:351)
23  at  android.app.ActivityThread.main(ActivityThread.java:3833)
24  at  java.lang.reflect.Method.invokeNative(Native Method)
25  at  java.lang.reflect.Method.invoke(Method.java:538)
26  at  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
27  at  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:659)
28  at  dalvik.system.NativeStart.main(Native Method)

在上面的日志中,我无法得到上面的哪一行正是导致崩溃或引发异常。所有这些行到底指向什么?还有每行末尾的括号()中写的什么意思?

【问题讨论】:

    标签: android exception crash


    【解决方案1】:

    从上到下扫描跟踪并尝试查看您识别为代码的内容。在这种情况下,android.widget.AbsListView.obtainView 似乎在1448 行抛出了ConcurrentModificationException

    【讨论】:

      【解决方案2】:

      您的异常是“ConcurrentModificationException”,这意味着有两个或多个线程试图使用 ArrayList....您的代码被混淆了,但它似乎是 ListAdapter 的错误。

      “brackets()”中写的是source:codeLine ... 但是“Unknown Source”表示他无法指定或找到源,可能导致你使用的混淆。

      【讨论】:

        【解决方案3】:

        逐行跟踪,您将看到您的应用程序的哪个类有问题以及实际发生崩溃的行号。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2011-01-05
          • 2018-11-27
          • 1970-01-01
          • 1970-01-01
          • 2011-07-27
          • 1970-01-01
          • 2010-10-10
          相关资源
          最近更新 更多