当前位置:   article > 正文

用ndk-stack快速定位jni问题_ndk callstack log

ndk callstack log

第一步把相关报错日志导入到本地文件

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

 

原文如下所示:

  1. ********** Crash dump: **********
  2. Build fingerprint: 'OPPO/A77t/A77:7.1.1/NMF26F/1569163872:user/release-keys'
  3. #00 0x003ad70c /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (ff_h264_decode_mb_cabac+2027)
  4. ff_h264_decode_mb_cabac
  5. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264_cabac.c:1958:0
  6. #01 0x003a331f /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so
  7. get_cabac_terminate
  8. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\cabac_functions.h:180:0
  9. decode_slice
  10. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264_slice.c:2594:0
  11. #02 0x003a4291 /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (ff_h264_execute_decode_slices+164)
  12. ff_h264_execute_decode_slices
  13. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264_slice.c:2769:0
  14. #03 0x00395931 /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so
  15. decode_nal_units
  16. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264dec.c:707:0
  17. h264_decode_frame
  18. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\h264dec.c:993:0
  19. #04 0x0033f643 /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so
  20. decode_simple_internal
  21. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\decode.c:409:0
  22. decode_simple_receive_frame
  23. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\decode.c:594:0
  24. decode_receive_frame_internal
  25. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\decode.c:612:0
  26. #05 0x00340f6f /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (avcodec_send_packet+126)
  27. avcodec_receive_frame
  28. /mnt/hgfs/share-2/ffmpeg-4.0.2\libavcodec\decode.c:716:0
  29. #06 0x002e10ef /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (_ZN12VideoChannel12video_decodeEv+86)
  30. VideoChannel::video_decode()
  31. G:\e\work\test\MyFfmpegVideo\app\.cxx\cmake\debug\armeabi-v7a\../../../../src/main/cpp\VideoChannel.cpp:105:17
  32. #07 0x002e108f /data/app/com.example.myffmpeg-2/lib/arm/libplayer.so (_Z17task_video_decodePv+14)
  33. VideoChannel::video_decode()
  34. G:\e\work\test\MyFfmpegVideo\app\.cxx\cmake\debug\armeabi-v7a\../../../../src/main/cpp\VideoChannel.cpp:75:12
  35. #08 0x000473d3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
  36. #09 0x00019d6d /system/lib/libc.so (__start_thread+6)
  37. Crash dump is completed

参考:

https://www.jianshu.com/p/e9dbc8ea733b?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

https://blog.csdn.net/momo0853/article/details/50889383

https://blog.csdn.net/u012815193/article/details/81489204

 

 

 

 

 

 

 

 

 

 

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/158507?site
推荐阅读
相关标签
  

闽ICP备14008679号