博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
线上应用bug跟踪查找-友盟统计
阅读量:4656 次
发布时间:2019-06-09

本文共 3612 字,大约阅读时间需要 12 分钟。

  线上的应用只要用心点点都能发现些bug,连微信,QQ也不列外。但是bug中最严重的算是闪退了,这导致了用户直接不能使用我们的app。

  我们公司是特别注重用户反馈和体验的,我们会定期打电话咨询用户的使用情况。我们也有自己的天使用户群,这些用户会跟我们及时的反馈应用的使用情况,bug情况,还有他们的需求。

  用户不是技术人员他无法跟你清楚的描述怎么产生闪退的,于是我们需要一个bug统计的功能,我们公司采用友盟统计实现bug的记录。我们在iOS应用中植入友盟统计的功能,我也经常在查看友盟的错误统计和错误趋势排除项目中不稳定的点。用过友盟统计的都知道,我们只能看到一些16进制的地址,并不能清楚的知道到底哪里出现问题了。

  友盟上的bug日志:

Application received signal SIGSEGV(null)((    0   CoreFoundation                      0x2d539feb 
+ 154 1 libobjc.A.dylib 0x37db2ccf objc_exception_throw + 38 2 CoreFoundation 0x2d539f15
+ 0 3 TheFirstClass 0x2928a1 TheFirstClass + 2680993 4 libsystem_platform.dylib 0x383d9f8b _sigtramp + 34 5 libsystem_malloc.dylib 0x3839c267
+ 2270 6 libsqlite3.dylib 0x3805bc67 sqlite3_exec + 2322 7 libsqlite3.dylib 0x3805b9b5 sqlite3_exec + 1632 8 libsqlite3.dylib 0x38094c6b sqlite3_prepare_v2 + 30 9 TheFirstClass 0xc020d TheFirstClass + 770573 10 TheFirstClass 0xc0689 TheFirstClass + 771721 11 TheFirstClass 0x103457 TheFirstClass + 1045591 12 TheFirstClass 0x103331 TheFirstClass + 1045297 13 TheFirstClass 0x18889d TheFirstClass + 1591453 14 libdispatch.dylib 0x382a07cb
+ 26 15 TheFirstClass 0x188831 TheFirstClass + 1591345 16 TheFirstClass 0x10325d TheFirstClass + 1045085 17 TheFirstClass 0x1031e9 TheFirstClass + 1044969 18 TheFirstClass 0x10319d TheFirstClass + 1044893 19 libdispatch.dylib 0x382a260f
+ 46 20 TheFirstClass 0x103157 TheFirstClass + 1044823 21 TheFirstClass 0x1209d TheFirstClass + 57501 22 TheFirstClass 0x115a3 TheFirstClass + 54691 23 TheFirstClass 0x10acf TheFirstClass + 51919 24 TheFirstClass 0x16c03f TheFirstClass + 1474623 25 TheFirstClass 0x293ef TheFirstClass + 152559 26 TheFirstClass 0x79d5b TheFirstClass + 482651 27 libdispatch.dylib 0x3829a833
+ 10 28 libdispatch.dylib 0x3829a81f
+ 22 29 libdispatch.dylib 0x382a149f
+ 278 30 CoreFoundation 0x2d5048f1
+ 8 31 CoreFoundation 0x2d5031c5
+ 1300 32 CoreFoundation 0x2d46df0f CFRunLoopRunSpecific + 522 33 CoreFoundation 0x2d46dcf3 CFRunLoopRunInMode + 106 34 GraphicsServices 0x323c6663 GSEventRunModal + 138 35 UIKit 0x2fdb916d UIApplicationMain + 1136 36 TheFirstClass 0x122f01 TheFirstClass + 1175297 37 libdyld.dylib 0x382bfab7
+ 2)dSYM UUID: 1ED274B4-8D63-3247-8168-FB884B9E88DACPU Type: armv7Slide Address: 0x00004000Binary Image: TheFirstClassBase Address: 0x000bc000

 

  bug查找步骤如下:

  1.为了跟踪友盟的bug日志,我们必须在应用打包的时候同时保存打包的“XX.xcarchive”,显示XX.xcarchive的包内容,然后找到dSYMs文件夹下的“项目名.app.dSYM”放到桌面。

  2.显示“项目名.app.dSYM”的包内容,找到“项目名”文件同样拷贝到桌面。

  3.打开终端

    a. 输入 cd deskTop

    b. dwarfdump --1ED274B4-8D63-3247-8168-FB884B9E88DA(这是dSYM UUID) 项目名.app.dSYM

      c. dwarfdump --arch= armv7(armv7这是CPU Type) --lookup 0xc020d0xc020d这是错误信息的地址) /Users/你的电脑/Desktop/项目名

 

  通过上述的步骤就能定位到崩溃的代码,至于为什么这行代码产生崩溃,这就需要自己去分析解决了。这是我总结的查找友盟上bug的简便方法,使用终端不用下载解析bug的图像化插件,简单几句终端代码也不麻烦。

 

  

转载于:https://www.cnblogs.com/hong-gnonl/p/5667671.html

你可能感兴趣的文章