首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >UIKit -[UIApplication sendAction:to:from:forEvent:] UIApplication

UIKit -[UIApplication sendAction:to:from:forEvent:] UIApplication
EN

Stack Overflow用户
提问于 2014-03-07 04:31:03
回答 2查看 8K关注 0票数 10

我遇到了一个非常不寻常的问题。我在UIKit上坠毁了..。我第一次面对这样的事情..。请任何人指点我的..。

这是我拿到的坠机日志。

代码语言:javascript
复制
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)
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-03-07 04:54:42

你在objc_msgSend上崩溃了。这意味着(如本famous article中所解释的)接收器失踪了。在这种情况下,用户似乎已经点击了一个向目标发送动作消息的按钮,但目标对象已不复存在。

票数 7
EN

Stack Overflow用户

发布于 2014-09-08 23:53:05

确保接收者或接收事件的对象声明为强。您甚至可能无法从崩溃日志中找出到底出了什么问题:)

如果您正在获得类似于上面的内容,请检查该对象是否声明为强。这应该能解决这个问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22241484

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档