当前位置:网站首页>ANR问题--相机相关的debug
ANR问题--相机相关的debug
2022-06-28 20:19:00 【专业开发者】
一般来说,ANR相关问题,需要结合ANR发生时产生的trace文件(可以从/data/anr目录下获得), 分析logcat的log。 以下是两个相机相关ANR问题的分析举例。
问题1:
【问题描述】stopPreview 卡住,导致ANR
从logcat log可以看到'stopPreview(): E'后面没跟着 'stopPreview(): X' 导致了ANR
的发生:
01-03 01:55:49.724 8466 8476 D QCamera2HWI: int qcamera::
QCamera2HardwareInterface::stopPreview(): E
01-03 01:57:34.894 1431 1450 E ActivityManager: ANR in com.android.camera (
com.android.camera/.CameraActivity)
我们来检查trace文件。通常相机相关的ANR,我们首先会检查mediaserver的call stack
。在trace文件中搜索 'camera' 看一下有没有可疑的地方。我们发现stopPreview
是卡在等待某个线程结束的时候:
"Binder_2" sysTid=8476
#00 pc 0000f9b8 /system/lib/libc.so (syscall+28)
#01 pc 000138b3 /system/lib/libc.so (pthread_join+90)
#02 pc 00029e1b /system/lib/hw/camera.msm8916.so (qcamera::QCameraCmdThread::exit()+46)
#03
边栏推荐
- Windows 64 bit download install my SQL
- Is it safe for CICC fortune to open an account? Let's talk about CICC fortune
- 2022 P cylinder filling test exercises and online simulation test
- ThreadLocal principle
- ref属性,props配置,mixin混入,插件,scoped样式
- odoo15 Module operations are not possible at this time, please try again later or contact your syste
- 市值1200亿美金,老牌财税巨头Intuit是如何做到的?
- 算力时代怎么「算」?「算网融合」先发优势很重要!
- 2022年T电梯修理考试题库模拟考试平台操作
- redisTemplate
猜你喜欢
随机推荐
Shell reads the value of the JSON file
Average score of 100 people
Bluecmsv1.6 code audit
JSP to get the value in the session
Compression and decompression commands
2022年T电梯修理考试题库模拟考试平台操作
28 rounds of interviews with 10 companies in two and a half years
How strong a mathematical foundation does deep learning need?
head、tail查看文件
Pyinstaller打包pikepdf失败的问题排查
Keyword long
Risc-v instruction set
odoo15 Module operations are not possible at this time, please try again later or contact your syste
电子科大(申恒涛团队)&京东AI(梅涛团队)提出用于视频问答的结构化双流注意网络,性能SOTA!优于基于双视频表示的方法!...
ThreadLocal principle
Employee salary management system
Input and output character data
2022 tea master (intermediate) examination simulated 100 questions and simulated examination
Relevant calculation of sphere, etc
2837. The total number of teams








