赞
踩
第一步把相关报错日志导入到本地文件
Android\sdk\platform-tools>adb logcat > D:\log.txt
第二步把上 面的错误日志文件用ndk-stack进行解读准确找到出错的c\c++文件和行数
Android\sdk\ndk-bundle\ndk-stack -sym app\build\intermediates\cmake\debug\obj\armeabi-v7a -dump D:\log.txt
原文如下所示:
-
- ********** Crash dump: **********
- Build fingerprint: 'OPPO/A77t/A77:7.1.1/NMF26F/1569163872:user/release-keys'
- #00 0x003ad70c /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (ff_h264_decode_mb_cabac+2027)
- ff_h264_decode_mb_cabac
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264_cabac.c:1958:0
- #01 0x003a331f /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so
- get_cabac_terminate
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\cabac_functions.h:180:0
- decode_slice
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264_slice.c:2594:0
- #02 0x003a4291 /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (ff_h264_execute_decode_slices+164)
- ff_h264_execute_decode_slices
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264_slice.c:2769:0
- #03 0x00395931 /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so
- decode_nal_units
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264dec.c:707:0
- h264_decode_frame
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264dec.c:993:0
- #04 0x0033f643 /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so
- decode_simple_internal
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\decode.c:409:0
- decode_simple_receive_frame
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\decode.c:594:0
- decode_receive_frame_internal
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\decode.c:612:0
- #05 0x00340f6f /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (avcodec_send_packet+126)
- avcodec_receive_frame
- /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\decode.c:716:0
- #06 0x002e10ef /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (_ZN12VideoChannel12video_decodeEv+86)
- VideoChannel::video_decode()
- G:\e\work\test\MyFfmpegVideo\app\.cxx\cmake\debug\armeabi-v7a\../../../../src/main/cpp\VideoChannel.cpp:105:17
- #07 0x002e108f /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (_Z17task_video_decodePv+14)
- VideoChannel::video_decode()
- G:\e\work\test\MyFfmpegVideo\app\.cxx\cmake\debug\armeabi-v7a\../../../../src/main/cpp\VideoChannel.cpp:75:12
- #08 0x000473d3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
- #09 0x00019d6d /system/lib/libc.so (__start_thread+6)
- Crash dump is completed
参考:
https://blog.csdn.net/momo0853/article/details/50889383
https://blog.csdn.net/u012815193/article/details/81489204
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。