This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable,
visit the help center。
9年前关闭。
我的应用偶尔崩溃,当我看到崩溃日志时,这就是我所看到的,我将其余部分都截断了,因为其余的内容根据我的应用崩溃的位置而变化。
0 libobjc.A.dylib 0x32da1c98 objc_msgSend + 16
1 Foundation 0x338530ac NSKVOPendingNotificationCreate + 184
2 Foundation 0x33852fc8 NSKeyValuePushPendingNotificationPerThread + 56
3 Foundation 0x33831e5c NSKeyValueWillChange + 544
4 Foundation 0x3381e53c -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] + 120
我现在会给一些背景
我有两个类,其中A有两个变量,B有3个变量我正在观察C和D类中的那些变量由于应用程序中的业务逻辑流不同,类A和B中的变量保持更改
有两个C类实例,它们在应用程序的整个生命周期中都可以生存,因为它们是tabBarcontroller应用程序中两个选项卡的rootController。 基于用户单击应用程序的次数,D的对象被频繁创建和销毁。 我正在init中添加观察者,并在dealloc中移除观察者。 到目前为止,我已经意识到的是,只要确保不初始化D,我想我就不会看到崩溃,但是我也不是100%确信,我将进行更多测试,以了解是否是这种情况。
但是与此同时,如果有人可以提供一些建议,那将是很好的