UIKit – crash

我遇到了一个非常不寻常的问题..我得到了UIKit的崩溃..第一次我面对这样的事情..请任何人都可以指导我在这..

这是我得到的崩溃日志。

Crashed: com.apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x1161a18c Thread : Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x386fcb66 objc_msgSend + 5 1 UIKit 0x30b5dda3 -[UIApplication sendAction:to:from:forEvent:] + 90 2 UIKit 0x30cc5615 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 120 3 UIKit 0x30b5dda3 -[UIApplication sendAction:to:from:forEvent:] + 90 4 UIKit 0x30b5dd3f -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 38 5 UIKit 0x30b5dd13 -[UIControl sendAction:to:forEvent:] + 46 6 UIKit 0x30b49743 -[UIControl _sendActionsForEvents:withEvent:] + 374 7 UIKit 0x30b5d75b -[UIControl touchesEnded:withEvent:] + 594 8 UIKit 0x30b5d425 -[UIWindow _sendTouchesForEvent:] + 528 9 UIKit 0x30b58451 -[UIWindow sendEvent:] + 832 10 UIKit 0x30b2dd79 -[UIApplication sendEvent:] + 196 11 UIKit 0x30b2c569 _UIApplicationHandleEventQueue + 7116 12 CoreFoundation 0x2e36ff1f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14 13 CoreFoundation 0x2e36f3e7 __CFRunLoopDoSources0 + 206 14 CoreFoundation 0x2e36dbd7 __CFRunLoopRun + 630 15 CoreFoundation 0x2e2d8471 CFRunLoopRunSpecific + 524 16 CoreFoundation 0x2e2d8253 CFRunLoopRunInMode + 106 17 GraphicsServices 0x330122eb GSEventRunModal + 138 18 UIKit 0x30b8d845 UIApplicationMain + 1136 19 TradeMate 0x0008f2bf main (main.m:16) 

你正在崩溃在objc_msgSend 。 这意味着(正如这篇着名的文章所解释的)接收器已经失踪。 在这种情况下,用户似乎已经点击了一个button,该button向目标发送一个动作消息,但目标对象已经不存在。

确保接收器或接收事件的对象被声明为强。 你甚至可能没有得到崩溃日志找出什么错了:)

在这里输入图像说明

如果你正在得到上面的东西,检查对象是否被声明为强壮的。 这应该解决这个问题