IOS友盟統計Bug追蹤

IOS友盟統計Bug追蹤 app


項目開發之初安卓和IOS都是使用Bugly來統計bug的後期IOS上線過程當中被退回提示一個關於Bugly的upload的一個方法衝突,而後IOS就改用友盟的,不過比較頭疼的是捕獲的IOS問題並不像安卓同樣可以清晰,只顯示內存地址,前期沒有經驗致使IOS打包人員沒有保存xcarchive文件,也就沒法定位了。最新的版本上線了讓其發給我當前版本的xcarchive來定位分析bug,在網上搜索了一下,使用一個工具(dSYM文件分析工具)來分析。ide

一、準備內容工具

dSYM文件分析工具,當前發佈版本的xcarchive文件,當前發佈版本的友盟Bug記錄oop

二、操做說明spa

打開dSYM文件分析工具(圖1),將xcarchive文件拖到「請將dSYM文件拖拽到窗口中並選中任意一個版本進行分析」,而後點擊拖拽的文件,會出現圖2會自動填寫選中dSYM文件的UUID。.net


圖1code


圖2blog

打開友盟選擇一個bug記錄,以下:
ip

[objc] view plaincopyprint?在CODE上查看代碼片派生到個人代碼片內存

  1. -[NSNull rangeOfCharacterFromSet:]: unrecognized selector sent to instance 0x197941e70  

  2. (null)  

  3. (  

  4.     0   CoreFoundation                      0x00000001854802f4 <redacted> + 160  

  5.     1   libobjc.A.dylib                     0x0000000196ca40e4 objc_exception_throw + 60  

  6.     2   CoreFoundation                      0x00000001854873a4 <redacted> + 0  

  7.     3   CoreFoundation                      0x0000000185484154 <redacted> + 928  

  8.     4   CoreFoundation                      0x0000000185386ccc _CF_forwarding_prep_0 + 92  

  9.     5   UIKit                               0x000000018a236c44 <redacted> + 104  

  10.     6   UIKit                               0x000000018a3a52c0 <redacted> + 76  

  11.     7   UIKit                               0x000000018a3a5380 <redacted> + 56  

  12.     8   UIKit                               0x000000018a3a5464 <redacted> + 36  

  13.     9   QuartzCore                          0x0000000189800884 <redacted> + 320  

  14.     10  UIKit                               0x0000000189ed1f94 <redacted> + 160  

  15.     11  UIKit                               0x0000000189f973d0 <redacted> + 348  

  16.     12  UIKit                               0x000000018a1b5be8 <redacted> + 3220  

  17.     13  UIKit                               0x0000000189fa1268 <redacted> + 172  

  18.     14  UIKit                               0x0000000189ebd760 <redacted> + 580  

  19.     15  QuartzCore                          0x0000000189805e1c <redacted> + 152  

  20.     16  QuartzCore                          0x0000000189800884 <redacted> + 320  

  21.     17  QuartzCore                          0x0000000189800728 <redacted> + 32  

  22.     18  QuartzCore                          0x00000001897ffebc <redacted> + 276  

  23.     19  QuartzCore                          0x00000001897ffc3c <redacted> + 528  

  24.     20  QuartzCore                          0x00000001897f9364 <redacted> + 80  

  25.     21  CoreFoundation                      0x00000001854382a4 <redacted> + 32  

  26.     22  CoreFoundation                      0x0000000185435230 <redacted> + 360  

  27.     23  CoreFoundation                      0x0000000185435610 <redacted> + 836  

  28.     24  CoreFoundation                      0x00000001853612d4 CFRunLoopRunSpecific + 396  

  29.     25  GraphicsServices                    0x000000018eb776fc GSEventRunModal + 168  

  30.     26  UIKit                               0x0000000189f26fac UIApplicationMain + 1488  

  31.     27  ?????????                           0x00000001000450c4 ????????? + 200900  

  32.     28  libdyld.dylib                       0x0000000197322a08 <redacted> + 4  

  33. )  

  34.   

  35. dSYM UUID95B2009C-C988-****-****-8393E7003FA8  

  36. CPU Type: arm64  

  37. Slide Address0x0000000100000000  

  38. Binary Image: ???  

  39. Base Address0x0000000100014000  

首先對應bug中的dSYM UUID跟dSYM文件分析工具中的UUID是否同樣。

在Bug記錄中通常帶有項目名稱的或者因爲亂碼致使???的那行代碼就是項目錯誤行拷貝內存地址

[objc] view plaincopyprint?在CODE上查看代碼片派生到個人代碼片

  1. 0x00000001000450c4  

[objc] view plaincopyprint?在CODE上查看代碼片派生到個人代碼片

  1. Slide Address0x0000000100000000  

dSYM文件分析工具中,點擊分析按鈕,在有可能錯誤的地方就會顯示當前內存地址對應的代碼行。



最後到項目中找到對應的行查找問題就能夠了。

相關文章
相關標籤/搜索