我有一个React Native应用,有时会崩溃,这使我可以选择发送反馈。当我从Google Play控制台访问ANR和崩溃时,我收到了一堆日志,但是我不确定那是什么意思。
在简历中,主题为
"main" tid=1 Native
"Jit thread pool worker thread 0" tid=2 Native
"ReferenceQueueDaemon" tid=4 Waiting
"FinalizerDaemon" tid=5 Waiting
"FinalizerWatchdogDaemon" tid=6 Waiting
"Binder:24455_1" tid=8 Native
"Binder:24455_2" tid=9 Native
"Profile Saver" tid=10 Native
"queued-work-looper" tid=11 Native
"Queue" tid=13 Waiting
"Queue" tid=14 Waiting
"Queue" tid=15 Waiting
"Queue" tid=16 Waiting
"Queue" tid=17 Waiting
"Queue" tid=18 Waiting
"Queue" tid=19 Waiting
"Queue" tid=20 Waiting
"Queue" tid=21 Waiting
"Crashlytics Exception Handler1" tid=22 Waiting
"Answers Events Handler1" tid=23 Waiting
"OkHttp ConnectionPool" tid=26 TimedWaiting
"RenderThread" tid=28 Native
"HybridData DestructorThread" tid=29 Waiting
"Binder:24455_3" tid=30 Native
"mqt_js" tid=31 Native
"mqt_native_modules" tid=32 Native
"OSH_WritePrefs" tid=33 Native
"Signal Catcher" tid=3 Runnable
"HeapTaskDaemon" tid=7 Blocked
我不会提供所有日志,因为它太多了。但是第一个"main" tid=1 Native
具有:
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 flags=1 obj=0x73e2a870 self=0x796e8c0a00
| sysTid=24455 nice=-10 cgrp=default sched=0/0 handle=0x797309b9b0
| state=S schedstat=( 62495905795 17738489601 195362 ) utm=5213 stm=1036 core=4 HZ=100
| stack=0x7fcb7ee000-0x7fcb7f0000 stackSize=8MB
| held mutexes=
#00 pc 000000000001dd6c /system/lib64/libc.so (syscall+28)
#01 pc 0000000000065d44 /system/lib64/libc.so (pthread_cond_wait+96)
#02 pc 0000000001da88dc /data/app/com.android.chrome-YPgu5fbzu8Na_XBkB4z-ag==/base.apk (???)
at org.chromium.ui.base.WindowAndroid.nativeOnVSync (Native method)
at org.chromium.ui.base.WindowAndroid.a (PG:220)
at cKD.a (PG:16)
at cKm.doFrame (PG:24)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:964)
at android.view.Choreographer.doCallbacks (Choreographer.java:778)
at android.view.Choreographer.doFrame (Choreographer.java:710)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:952)
at android.os.Handler.handleCallback (Handler.java:789)
at android.os.Handler.dispatchMessage (Handler.java:98)
at android.os.Looper.loop (Looper.java:169)
at android.app.ActivityThread.main (ActivityThread.java:6595)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:767)
那么,这个或以上任何其他主题是否有任何有价值的信息?
答案 0 :(得分:0)
这些“主题”是线程列表以及这些线程上的堆栈跟踪。所以第一个列表显示您有线程:
等
您引用的第二部分是堆栈跟踪。这向您显示线程在做什么,在本例中为主线程。 ANR(应用程序无响应)通常是由主线程上运行缓慢导致的,因此很有用。
从中您可以看到代码在org.chromium.ui.base.WindowAndroid.nativeOnVSync (Native method)
中。因此,这表明您在反应中创建的某些东西在WebView中的渲染速度非常慢。