崩溃在_CFAutoreleasePoolPop

时间:2015-10-29 15:19:39

标签: ios block release nsautoreleasepool runloop

我从igroups发生了崩溃,堆栈如下:

Fabric

我不知道Thread : Crashed: com.apple.main-thread 0 libobjc.A.dylib 6806634868 objc_release + 20 1 libsystem_blocks.dylib 6813456656 _Block_release + 256 2 libobjc.A.dylib 6806640420 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 564 3 CoreFoundation 6529519172 _CFAutoreleasePoolPop + 28 4 UIKit 6605817924 _wrapRunLoopWithAutoreleasePoolHandler + 76 5 CoreFoundation 6530394704 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 6 CoreFoundation 6530382300 __CFRunLoopDoObservers + 360 7 CoreFoundation 6530383292 __CFRunLoopRun + 836 8 CoreFoundation 6529519780 CFRunLoopRunSpecific + 396 9 GraphicsServices 6682260900 GSEventRunModal + 168 10 UIKit 6606283712 UIApplicationMain + 1488 11 Spec 4297532060 main (main.m:15) 12 libdyld.dylib 6813280776 start + 4 之后为什么会_Block_release。是否有可能将块添加到autoreleasepool?如果可能的话,为什么块在发布时崩溃并且在调用时没有崩溃?

1 个答案:

答案 0 :(得分:1)

好的,我已经解决了这个错误。崩溃的原因是我为NSMutableArray挂了函数objectAtIndex。如果用户从后台切换,应用程序会崩溃-[UIKeyboardLayoutStar release]: message sent to deallocated

因此删除钩子代码将解决此错误。