需要帮助阅读堆栈跟踪 [英] Need help reading the stack traces

查看:196
本文介绍了需要帮助阅读堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跑我的应用程序,它崩溃的时候得到这些堆栈跟踪。我得到了它必须做一些事情ANR keyDispatchingTimedOut。我在Android开发新的,我需要一些帮扶阅读的痕迹。

  DALVIK主题:
主PRIO = 5 TID = 1 NATIVE
  |组=主SCOUNT = 1 dsCount = 0 S = N = OBJ自我0x40028ae0 = 0xcd58
  | sysTid = 7787 =不错附表0 = 0/0 = CGRP默认手柄= -1345021904
  | schedstat =(12266998315 6628478984 2116)
  在android.database.sqlite.SQLiteQuery.native_fill_window(本机方法)
  在android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:70)
  在android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:299)
  在android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:280)
  在android.database.AbstractCursor.moveToPosition(AbstractCursor.java:171)
  在android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)
  在george.android.eortologioAlpha.EortologioAlpha.statheresPlhrhsGiortes(EortologioAlpha.java:171)
  在george.android.eortologioAlpha.EortologioAlpha.giortazei(EortologioAlpha.java:265)
  在george.android.eortologioAlpha.EortologioAlpha.eortazomenhEpafh(EortologioAlpha.java:281)
  在george.android.eortologioAlpha.EortologioAlpha.onCreate(EortologioAlpha.java:474)
  在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1065)
  在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2745)
  在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2797)
  在android.app.ActivityThread.access $ 2300(ActivityThread.java:135)
  在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:2132)
  在android.os.Handler.dispatchMessage(Handler.java:99)
  在android.os.Looper.loop(Looper.java:143)
  在android.app.ActivityThread.main(ActivityThread.java:4914)
  在java.lang.reflect.Method.invokeNative(本机方法)
  在java.lang.reflect.Method.invoke(Method.java:521)
  在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:858)
  在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  在dalvik.system.NativeStart.main(本机方法)捆扎线#2PRIO = 5 TID = 5 NATIVE
  |组=主SCOUNT = 1 dsCount = 0 S = N = OBJ自我0x447cdb78 = 0x130b40
  | sysTid = 7791 =不错附表0 = 0/0 = CGRP默认手柄= 1248000
  | schedstat =(6164551 6774901 9)
  在dalvik.system.NativeStart.run(本机方法)捆扎线#1PRIO = 5 TID = 4 NATIVE
  |组=主SCOUNT = 1 dsCount = 0 S = N = OBJ自我0x447c9b18 = 0x139258
  | sysTid = 7790 =不错附表0 = 0/0 = CGRP默认手柄= 1271880
  | schedstat =(12756347 35614013 13)
  在dalvik.system.NativeStart.run(本机方法)信号守望者守护PRIO = 5 TID = 3 RUNNABLE
  |组=系统SCOUNT = 0 dsCount = 0 S = N = OBJ自我0x447c81e8 = 0x136948
  | sysTid = 7789 =不错附表0 = 0/0 = CGRP默认手柄= 1249544
  | schedstat =(4150389 20233155 9)
  在dalvik.system.NativeStart.run(本机方法)HeapWorker守护PRIO = 5 TID = 2 VMWAIT
  |组=系统SCOUNT = 1 dsCount = 0 S = N = OBJ自我0x43a1c590 = 0x136708
  | sysTid = 7788 =不错附表0 = 0/0 = CGRP默认手柄= 1248984
  | schedstat =(247253419 294708251 77)
  在dalvik.system.NativeStart.run(本机方法)


解决方案

ANR keyDispatchingTimedOut意味着你的活动被卡做的事情,不能到下一个用户的输入做出反应。

要阅读堆栈跟踪只是扫描它,直到你看到你的包名,也就是要专注于该位。

我已经回答了这个前一次:<一href=\"http://stackoverflow.com/questions/5513457/anr-keydispatchingtimedout-error/5513623#5513623\">ANR keyDispatchingTimedOut错误


  

ANR错误


  
  

活动没有响应。


您的活动走上长期要说到的是Android OS'嘿,我还活着! (这是UI线程做什么)。

http://developer.android.com/guide/practices/design/ responsiveness.html

基本上,如果你让UI线程做一些复杂的任务,它太忙着做你的任务是告诉操作系统,它仍然是'活着'。

http://developer.android.com/resources/articles/painless- threading.html

您应该将你的数据库中选择/更新/删除code到另一个线程,然后使用一个回调来告诉UI线程在完成和做的结果的东西。

http://developer.android.com/resources/articles/定时-UI-updates.html

I'm getting these stack traces when running my app which crash. I get that it has to do something with "ANR keyDispatchingTimedOut". I'm new in Android development and I need some helping reading the traces.

DALVIK THREADS:
"main" prio=5 tid=1 NATIVE
  | group="main" sCount=1 dsCount=0 s=N obj=0x40028ae0 self=0xcd58
  | sysTid=7787 nice=0 sched=0/0 cgrp=default handle=-1345021904
  | schedstat=( 12266998315 6628478984 2116 )
  at android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
  at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:70)
  at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:299)
  at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:280)
  at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:171)
  at android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)
  at george.android.eortologioAlpha.EortologioAlpha.statheresPlhrhsGiortes(EortologioAlpha.java:171)
  at george.android.eortologioAlpha.EortologioAlpha.giortazei(EortologioAlpha.java:265)
  at george.android.eortologioAlpha.EortologioAlpha.eortazomenhEpafh(EortologioAlpha.java:281)
  at george.android.eortologioAlpha.EortologioAlpha.onCreate(EortologioAlpha.java:474)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1065)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2745)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2797)
  at android.app.ActivityThread.access$2300(ActivityThread.java:135)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2132)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:143)
  at android.app.ActivityThread.main(ActivityThread.java:4914)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  at dalvik.system.NativeStart.main(Native Method)

"Binder Thread #2" prio=5 tid=5 NATIVE
  | group="main" sCount=1 dsCount=0 s=N obj=0x447cdb78 self=0x130b40
  | sysTid=7791 nice=0 sched=0/0 cgrp=default handle=1248000
  | schedstat=( 6164551 6774901 9 )
  at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #1" prio=5 tid=4 NATIVE
  | group="main" sCount=1 dsCount=0 s=N obj=0x447c9b18 self=0x139258
  | sysTid=7790 nice=0 sched=0/0 cgrp=default handle=1271880
  | schedstat=( 12756347 35614013 13 )
  at dalvik.system.NativeStart.run(Native Method)

"Signal Catcher" daemon prio=5 tid=3 RUNNABLE
  | group="system" sCount=0 dsCount=0 s=N obj=0x447c81e8 self=0x136948
  | sysTid=7789 nice=0 sched=0/0 cgrp=default handle=1249544
  | schedstat=( 4150389 20233155 9 )
  at dalvik.system.NativeStart.run(Native Method)

"HeapWorker" daemon prio=5 tid=2 VMWAIT
  | group="system" sCount=1 dsCount=0 s=N obj=0x43a1c590 self=0x136708
  | sysTid=7788 nice=0 sched=0/0 cgrp=default handle=1248984
  | schedstat=( 247253419 294708251 77 )
  at dalvik.system.NativeStart.run(Native Method)

解决方案

ANR keyDispatchingTimedOut means your activity was stuck doing something and couldn't react to the next user input.

To read a stacktrace just scan it until you see your package name, that is the bit you want to concentrate on.

I've answered this once before: ANR keyDispatchingTimedOut error

ANR Error

Activity Not Responding.

Your activity took to long to say to the Android OS 'hey i'm still alive'! (This is what the UI thread does).

http://developer.android.com/guide/practices/design/responsiveness.html

Basically if you make the UI thread do some complex task it's too busy doing your task to tell the OS that it is still 'alive'.

http://developer.android.com/resources/articles/painless-threading.html

You should move your Database select/update/delete code to another thread, then use a callback to tell the UI thread you have finished and to do something with the result.

http://developer.android.com/resources/articles/timed-ui-updates.html

这篇关于需要帮助阅读堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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