KVO观察者在iOS 11上崩溃

时间:2018-05-28 11:26:32

标签: ios objective-c crash crash-reports key-value-observing

我在App Store中有一个应用程序,它在iOS 10上运行良好。但是最近我收到了很多崩溃报告,并且所有日志都指向KVO崩溃,所有这些都发生在iOS 11上,下面是崩溃日志。

.pdf

崩溃已超过200次崩溃,所有都是相同的日志。我无法重现这次崩溃,并且有点如何继续下去。我的整个项目是用Objective-C编写的,当我检查时,我只使用一种方法来使用KVO。下面是我如何使用它的方法模型。

Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x181e7a858 object_isClass + 16
1  Foundation                     0x1836d72bc KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 68
2  Foundation                     0x1836d5ad0 NSKeyValueWillChangeWithPerThreadPendingNotifications + 300
3  QuartzCore                     0x186e35024 -[CALayer setDelegate:] + 108
4  UIKit                          0x18c866698 -[UIView dealloc] + 708
5  UIKit                          0x18c93f08c -[UILabel dealloc] + 192
6  libobjc.A.dylib                0x181e9a13c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
7  UIKit                          0x18c86678c -[UIView dealloc] + 952
8  CoreFoundation                 0x182b911b4 -[__NSArrayM dealloc] + 140
9  libobjc.A.dylib                0x181e9a13c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
10 UIKit                          0x18c86678c -[UIView dealloc] + 952
11 libobjc.A.dylib                0x181e9a13c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
12 UIKit                          0x18c86678c -[UIView dealloc] + 952
13 libobjc.A.dylib                0x181e9a13c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
14 UIKit                          0x18c86678c -[UIView dealloc] + 952
15 UIKit                          0x18cbd3248 -[UINavigationTransitionView dealloc] + 96
16 libobjc.A.dylib                0x181e9a13c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
17 UIKit                          0x18c86678c -[UIView dealloc] + 952
18 UIKit                          0x18cbd319c -[UILayoutContainerView dealloc] + 60
19 libobjc.A.dylib                0x181e9a13c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
20 CoreFoundation                 0x182b88aac _CFAutoreleasePoolPop + 28
21 UIKit                          0x18cc705fc _prepareForCAFlush + 132
22 UIKit                          0x18cb555b8 _afterCACommitHandler + 236
23 CoreFoundation                 0x182c6a910 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
24 CoreFoundation                 0x182c68238 __CFRunLoopDoObservers + 412
25 CoreFoundation                 0x182c68884 __CFRunLoopRun + 1436
26 CoreFoundation                 0x182b88da8 CFRunLoopRunSpecific + 552
27 GraphicsServices               0x184b6b020 GSEventRunModal + 100
28 UIKit                          0x18cb6978c UIApplicationMain + 236
29 MyApp                      0x1009bf748 main (main.m:14)
30 libdyld.dylib                  0x182619fc0 start + 4

我在项目中添加的所有其他观察者都是NSNotificationCenter观察者,是否会导致此类崩溃日志?

0 个答案:

没有答案