最近我在iPhone,OS 9.2中遇到了一些随机崩溃。奇怪的是,我无法在调试版本中重现我的崩溃,它只发生在发布版本中。而且它不是一贯可重复的。我做了相同的操作(通过打开URL打开我的应用程序)几次,大约十分之一,应用程序崩溃。
崩溃线程不包含与我的应用程序相关的代码。我搜索了我的应用程序,当它们被释放时我删除了所有的KVO观察者,所以我无法在调试版本中重现它。
有没有人遇到类似的问题?这是我的代码中的iOS问题还是缺陷?
崩溃日志如下:
Date/Time: 2016-03-01 15:24:21.21 +0800
Launch Time: 2016-03-01 14:20:05.05 +0800
OS Version: iOS 9.2.1 (13D15)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000200015a03c700
Triggered by Thread: 0
Filtered syslog:
None found
Global Trace Buffer (reverse chronological seconds):
3.636040 CFNetwork 0x0000000184c182e4 NSURLSessionTask finished with error - code: -999
10.973538 CFNetwork 0x0000000184c182e4 NSURLSessionTask finished with error - code: -1002
11.010070 CFNetwork 0x0000000184c182e4 NSURLSessionTask finished with error - code: -1002
14.318051 CFNetwork 0x0000000184c182e4 NSURLSessionTask finished with error - code: -999
20.328646 CFNetwork 0x0000000184c182e4 NSURLSessionTask finished with error - code: -1002
20.349845 CFNetwork 0x0000000184c182e4 NSURLSessionTask finished with error - code: -1002
22.382139 CFNetwork 0x0000000184c47104 TCP Conn 0x14f6399e0 complete. Fd: 22, err: 0
22.382727 CFNetwork 0x0000000184c48630 TCP Conn 0x14f6399e0 event 1. Err: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000183c4dbdc objc_msgSend + 28
1 Foundation 0x0000000184ea28e4 -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey: ] + 324
2 QuartzCore 0x0000000186cbf374 CA::Layer::set_delegate(objc_object*) + 72
3 UIKit 0x00000001892c2538 -[UIView _createLayerWithFrame: ] + 580
4 UIKit 0x00000001892c1ff8 UIViewCommonInitWithFrame + 688
5 UIKit 0x00000001892c1ce8 -[UIView initWithFrame: ] + 140
6 UIKit 0x000000018931be60 -[UIActivityIndicatorView initWithActivityIndicatorStyle: ] + 116
7 UIKit 0x000000018931bbd0 -[UIStatusBarActivityItemView updateContentsAndWidth] + 148
8 UIKit 0x000000018931ba80 -[UIStatusBarItemView initWithItem: data: actions: style: ] + 432
9 UIKit 0x000000018931b80c +[UIStatusBarItemView createViewForItem: withData: actions: foregroundStyle: ] + 144
10 UIKit 0x000000018931b604 -[UIStatusBarLayoutManager _createViewForItem: withData: actions: ] + 172
11 UIKit 0x00000001892b4330 -[UIStatusBarLayoutManager _prepareEnabledItemType: withEnabledItems: withData: actions: itemAppearing: itemDisappearing: ] + 332
12 UIKit 0x00000001892b416c -[UIStatusBarLayoutManager prepareEnabledItems: withData: actions: ] + 112
13 UIKit 0x00000001892b3f98 -[UIStatusBarForegroundView _setStatusBarData: actions: animated: ] + 836
14 UIKit 0x00000001892b3a18 -[UIStatusBarForegroundView setStatusBarData: actions: animated: ] + 688
15 UIKit 0x00000001892b2af4 -[UIStatusBar statusBarServer: didReceiveStatusBarData: withActions: ] + 188
16 UIKit 0x00000001892b29f0 _UIStatusBarReceivedStatusBarDataAndActions + 76
17 UIKit 0x00000001892b295c _XReceivedStatusBarDataAndActions + 96
18 AppSupport 0x00000001859d0270 migHelperRecievePortCallout + 212
19 CoreFoundation 0x0000000184585634 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
20 CoreFoundation 0x0000000184584d6c __CFRunLoopDoSource1 + 436
21 CoreFoundation 0x0000000184582ac4 __CFRunLoopRun + 1800
22 CoreFoundation 0x00000001844b1680 CFRunLoopRunSpecific + 384
23 GraphicsServices 0x00000001859c0088 GSEventRunModal + 180
24 UIKit 0x0000000189328d90 UIApplicationMain + 204
25 MYAPP 0x000000010000f454 main (main.m:13)
26 libdyld.dylib 0x00000001840528b8 start + 4