目的:如何解析Umeng该错误?
方法:慢慢往下看!
- Umeng错误log
Application received signal SIGSEGV
(null)
((
0 CoreFoundation 0x00000001868425b8 <redacted> + 160
1 libobjc.A.dylib 0x0000000196f8c0e4 objc_exception_throw + 60
2 CoreFoundation 0x00000001868424dc <redacted> + 0
3 coboelafs 0x1003440ac coboelafs + 3424428
4 libsystem_platform.dylib 0x00000001977a894c _sigtramp + 52
5 coboelafs 0x10038e0b8 coboelafs + 3727544
6 UIKit 0x000000018b2c7138 <redacted> + 72
7 UIKit 0x000000018b00cef4 <redacted> + 500
8 UIKit 0x000000018b2c7e40 <redacted> + 864
9 UIKit 0x000000018b0c8fbc <redacted> + 400
10 UIKit 0x000000018b0c8de4 <redacted> + 44
11 UIKit 0x000000018afee1cc <redacted> + 448
12 coboelafs 0x10038cad0 coboelafs + 3721936
13 CoreFoundation 0x0000000186721228 CFRelease + 524
14 CoreFoundation 0x000000018672d7e8 <redacted> + 152
15 libobjc.A.dylib 0x0000000196fa5724 <redacted> + 564
16 CoreFoundation 0x0000000186724e44 _CFAutoreleasePoolPop + 28
17 CoreFoundation 0x00000001867f8054 <redacted> + 1500
18 CoreFoundation 0x00000001867250a4 CFRunLoopRunSpecific + 396
19 GraphicsServices 0x000000018f8bf5a4 GSEventRunModal + 168
20 UIKit 0x000000018b056aa4 UIApplicationMain + 1488
21 coboelafs 0x1001066d0 coboelafs + 1074896
22 libdyld.dylib 0x00000001975faa08 <redacted> + 4
)
dSYM UUID: 317EAB41-4847-3465-8B91-87678EDB62FD
CPU Type: arm64
Slide Address: 0x0000000100000000
Binary Image: coboelafs
Base Address: 0x0000000100024000
- 找到,这个是关键 。
5 coboelafs 0x10038e0b8 coboelafs + 3727544
- 获取本地对应该线上版本的Archives路径。
$ cd /Users/apple/Library/Developer/Xcode/Archives/2018-01-06/coboelafs\ 2018-1-6\ 上午11.50.xcarchive/dSYMs
- 然后获取该路径下dSYM UUID。
$ dwarfdump --uuid coboelafs.app.dSYM
- 运行(4)后得到以下内容:
UUID: A548B3E3-DB86-3021-A806-72CD14056C7C (armv7) coboelafs.app.dSYM/Contents/Resources/DWARF/coboelafs
UUID: 317EAB41-4847-3465-8B91-87678EDB62FD (arm64) coboelafs.app.dSYM/Contents/Resources/DWARF/coboelafs
正好和(1)中的dSYM UUID匹配。
-
查找(2)中0x10038e0b8地址所表示的含义:
运行以下代码:
# 注意0x10038e0b8与路径中间有个空格,否则会报not found错误
dwarfdump --arch=armv7 --lookup 0x10038e0b8 /Users/apple/Library/Developer/Xcode/Archives/2018-01-06/coboelafs\ 2018-1-6\ 上午11.50.xcarchive/dSYMs/coboelafs.app.dSYM/Contents/Resources/DWARF/coboelafs
- 得到结果
Looking up address: 0x000000010038e0b8 in .debug_info... found!
0x004a60f5: Compile Unit: length = 0x00005370 version = 0x0002 abbr_offset = 0x00000000 addr_size = 0x08 (next CU at 0x004ab469)
0x004a6100: TAG_compile_unit [115] *
AT_producer( "Apple LLVM version 9.0.0 (clang-900.0.38)" )
AT_language( DW_LANG_ObjC )
AT_name( "/Users/apple/Desktop/功途/Universal-iOS/coboelafs/Pods/SwipeView/SwipeView/SwipeView.m" )
AT_stmt_list( 0x001daa40 )
AT_comp_dir( "/Users/apple/Desktop/功途/Universal-iOS/coboelafs/Pods" )
AT_APPLE_optimized( 0x01 )
AT_APPLE_major_runtime_vers( 0x02 )
AT_low_pc( 0x000000010038c5e4 )
AT_high_pc( 0x0000000100390588 )
0x004a8bdc: TAG_subprogram [149] *
AT_low_pc( 0x000000010038e06c )
AT_high_pc( 0x000000010038e1a4 )
AT_frame_base( reg29 )
AT_object_pointer( {0x004a8bfd} )
AT_name( "-[SwipeView didScroll]" )
AT_decl_file( "/Users/apple/Desktop/功途/Universal-iOS/coboelafs/Pods/SwipeView/SwipeView/SwipeView.m" )
AT_decl_line( 609 )
AT_prototyped( 0x01 )
AT_APPLE_optimized( 0x01 )
Line table dir : '/Users/apple/Desktop/功途/Universal-iOS/coboelafs/Pods/SwipeView/SwipeView'
Line table file: 'SwipeView.m' line 618, column 10 with start address 0x000000010038e0b8
- 结果显而易见了。