我正在分析Crashlytics中的以下堆栈跟踪。我无法在手机上重现这个问题。下面是崩溃的线程。堆栈跟踪在64位和32位CPU之间略有不同。
唯一有趣的信息是有另一个线程在后台调整图像大小(不涉及UI操作)。
由于调整图像大小可能会给手机的内存带来一些压力,我怀疑这是一个与内存相关的错误,但在这种情况下我不希望看到堆栈跟踪,我也看不到任何内存警告在日志中。那有意义吗?或者我应该寻找完全不同的东西?任何建议都会有所帮助。
你对那里可能发生的事情有什么建议吗?
在iPhone 5S,iPad Air上,崩溃线程如下:
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000001e256bec8
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x000000018f65a984 objc_object::release() + 8
1 libsystem_blocks.dylib 0x000000018fc5f908 _Block_release + 256
2 libdispatch.dylib 0x000000018fc17fd4 _dispatch_client_callout + 16
3 libdispatch.dylib 0x000000018fc1b1dc _dispatch_main_queue_callback_4CF + 336
4 CoreFoundation 0x00000001830f6ddc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
5 CoreFoundation 0x00000001830f511c __CFRunLoopRun + 1452
6 CoreFoundation 0x0000000183035dd0 CFRunLoopRunSpecific + 452
7 GraphicsServices 0x0000000188d1dc0c GSEventRunModal + 168
在高优先级线程中执行时:
Thread : com.apple.root.high-priority
0 CoreGraphics 0x00000001831cef88 resample_byte_h_4cpp_armv7 + 420
1 CoreGraphics 0x00000001831cec74 resample_band + 1188
2 CoreGraphics 0x00000001831cd9b0 img_interpolate_read + 816
3 CoreGraphics 0x00000001831c94cc img_data_lock + 4440
4 CoreGraphics 0x00000001831c7944 CGSImageDataLock + 148
5 libRIP.A.dylib 0x0000000183573dec ripc_AcquireImage + 160
6 libRIP.A.dylib 0x0000000183573460 ripc_DrawImage + 624
7 CoreGraphics 0x00000001831c7674 CGContextDrawImage + 408
8 My App 0x00000001005105a4 -[UIImage(Async) scaleWithMaxSize:quality:scale:] (UIImage+Async.m:50)
9 My App 0x0000000100144244 __38-[ViewController viewDidAppear:]_block_invoke (ViewController.m:79)
10 libdispatch.dylib 0x000000018fc18014 _dispatch_call_block_and_release + 24
11 libdispatch.dylib 0x000000018fc17fd4 _dispatch_client_callout + 16
12 libdispatch.dylib 0x000000018fc1f2b8 _dispatch_root_queue_drain + 556
13 libdispatch.dylib 0x000000018fc1f4fc _dispatch_worker_thread2 + 76
14 libsystem_pthread.dylib 0x000000018fdad6bc _pthread_wqthread + 356
在iPhone 5,4S,4上,它略有不同
Crashed: com.apple.root.default-priority
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x2146c7cf
Thread : Crashed: com.apple.root.default-priority
0 libobjc.A.dylib 0x382af66a objc_release + 9
1 libsystem_blocks.dylib 0x387caac5 _Block_release + 216
2 libsystem_blocks.dylib 0x387caac5 _Block_release + 216
3 libxpc.dylib 0x388d9e71 _xpc_connection_call_reply + 32
4 libdispatch.dylib 0x3878fad7 _dispatch_root_queue_drain + 222
5 libdispatch.dylib 0x3878fd29 _dispatch_worker_thread2 + 56
6 libsystem_pthread.dylib 0x388cabd3 _pthread_wqthread + 298
同时在高优先级线程中执行:
Thread : com.apple.root.high-priority
0 CoreGraphics 0x2d6749e6 resample_byte_h_4cpp_armv7 + 117
1 ??? 0x00000002
2 CoreGraphics 0x2d67487d resample_band + 884
3 CoreGraphics 0x2d673a47 img_interpolate_read + 562
4 CoreGraphics 0x2d6701d3 img_data_lock + 4514
5 CoreGraphics 0x2d66e82d CGSImageDataLock + 88
6 libRIP.A.dylib 0x2d9bae67 ripc_AcquireImage + 98
7 libRIP.A.dylib 0x2d9ba20d ripc_DrawImage + 588
8 CoreGraphics 0x2d66e743 CGContextDelegateDrawImage + 50
9 CoreGraphics 0x2d66e5d9 CGContextDrawImage + 284
10 My App 0x0050f469 -[UIImage(Async) scaleWithMaxSize:quality:scale:] (UIImage+Async.m:50)
11 My App 0x00153fc7 __38-[ViewController viewDidAppear:]_block_invoke (ViewController.m:79)
12 libdispatch.dylib 0x38788833 _dispatch_call_block_and_release + 10
13 libdispatch.dylib 0x3878fad7 _dispatch_root_queue_drain + 222
14 libdispatch.dylib 0x3878fd29 _dispatch_worker_thread2 + 56
15 libsystem_pthread.dylib 0x388cabd3 _pthread_wqthread + 298