我的代码中有这个崩溃:objc_retains。
我的项目是ARC。
然后我添加一个符号断点,其符号为“objc_retain”,模块为“libobjc.A.dylib”。
我发现它终于在这个“BlocksKit”文件中崩溃了:
+ (void)associateCopyOfValue:(id)value withKey:(const char *)key {
objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY_NONATOMIC);
}
如果我没有使用“BlocksKit”的“performBlock ...”功能,它可以工作:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
//if I delete the code below, it works
[self performBlock:^(id sender) {
NSLog(@"hit");
} afterDelay:0.3f];
}
我已经调试了几天,但我无法解决这个问题T_T有人可以帮助我吗?
这是我的项目: http://www.mediafire.com/download/hppnt7k491y5f1k/QQSDKDemo.zip
这是调用堆栈:
callStack :(
0 QQSDKDemo 0x00008b8e +[NSObject(A2BlockDelegateBlocksKitPrivate) bk_accessorsMap] + 142
1 QQSDKDemo 0x00008de1 +[NSObject(A2BlockDelegateBlocksKitPrivate) registerDynamicDelegateNamed:forProtocol:] + 81
2 QQSDKDemo 0x00009f58 +[MFMailComposeViewController(BlocksKit) load] + 136
3 libobjc.A.dylib 0x019657f5 call_load_methods + 437
4 libobjc.A.dylib 0x01967de5 load_images + 133
5 ??? 0x8fef0c32 0x0 + 2414808114
6 ??? 0x8feff252 0x0 + 2414867026
7 ??? 0x8feff0ba 0x0 + 2414866618
8 ??? 0x8fef0e05 0x0 + 2414808581
9 ??? 0x8fef4adb 0x0 + 2414824155
10 ??? 0x8fef0376 0x0 + 2414805878
11 ??? 0x8fef0077 0x0 + 2414805111
)