我的班级对象有一个非常奇怪的问题,在一个区块a中有一个我的View Controller的弱引用,该区块中的部分代码是
__weak typeof(self) weakSelf = self;
[weakSelf performSelector:@selector(reloadItems) withObject:nil afterDelay:0];
[weakSelf.view setUserInteractionEnabled:YES];
if (weakSelf.shouldPresentNotification) {
[[LLAPI sharedInstance] presentLatestNotification];
weakSelf.shouldPresentNotification = NO;
}
问题是我的几个用户可能遇到过此次崩溃 [__NSCFNumber shouldPresentNotification]:无法识别的选择器发送到实例0xbb3c1937855f68da
现在,我知道崩溃报告告诉我,weakSelf是一个NSNumber对象,但这并没有任何意义,如果这是真的,为什么崩溃只会被提升到变量&# 34; shouldPresentNotification"被访问?
修改 这是完整的堆栈跟踪:
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x0000000182154f5c __exceptionPreprocess
1 libobjc.A.dylib 0x0000000196d4bf80 objc_exception_throw
2 CoreFoundation 0x000000018215bc6c
__methodDescriptionForSelector
3 CoreFoundation 0x0000000182158c14 ___forwarding___
4 CoreFoundation 0x000000018205cdcc _CF_forwarding_prep_0
5 Laclud 0x00000001001109c4 __38-[LLMainVC processLacludSession]_block_invoke424 (LLMainVC.m:467)
6 Laclud 0x000000010011055c -[LLMainVC processLacludSession] (LLMainVC.m:516)
7 Laclud 0x000000010013ff30 __32-[LLGFVC sendFeedback]_block_invoke (LLGiveFeedbackVC.m:137)
8 Laclud 0x000000010014a40c __41-[LLAPI rateLonJet:like:success:failure:]_block_invoke (LLAPI.m:189)
9 Laclud 0x000000010034349c __66-[RKObjectRequestOperation setCompletionBlockWithSuccess:failure:]_block_invoke236 (RKObjectRequestOperation.m:481)
10 libdispatch.dylib 0x00000001975457b0 _dispatch_call_block_and_release
11 libdispatch.dylib 0x0000000197545770 _dispatch_client_callout
12 libdispatch.dylib 0x000000019754ae20 _dispatch_main_queue_callback_4CF
13 CoreFoundation 0x000000018210c258 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
14 CoreFoundation 0x000000018210a0c0 __CFRunLoopRun
15 CoreFoundation 0x0000000182038dc0 CFRunLoopRunSpecific
16 GraphicsServices 0x000000018d18c088 GSEventRunModal
17 UIKit 0x0000000187712f44 UIApplicationMain
18 Laclud 0x0000000100178900 main (main.m:15)
19 libdyld.dylib 0x00000001975768b8 start
任何帮助表示赞赏。
由于