我在跟踪克拉什。谁能告诉我这次崩溃的原因?
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18 23 CoreFoundation crash我没有使用线程。NSZombieEnabled和仪器根本没有澄清坠机的原因。请帮帮我。
0 libobjc.A.dylib 0x3b0805be objc_msgSend + 30
1 CoreFoundation 0x3332130c CFRelease + 96
2 CoreFoundation 0x333fc430 __CFBasicHashDrain + 256
3 CoreFoundation 0x333213ce CFRelease + 290
4 CoreFoundation 0x333fc430 __CFBasicHashDrain + 256
5 CoreFoundation 0x333213ce CFRelease + 290
6 ImageIO 0x34013008 _CGImagePlusFinalize + 48
7 CoreFoundation 0x333213ce CFRelease + 290
8 CoreFoundation 0x333fc430 __CFBasicHashDrain + 256
9 CoreFoundation 0x333213ce CFRelease + 290
10 ImageIO 0x34179bb2 releaseInfoPNG + 18
11 ImageIO 0x34029ae4 ImageProviderReleaseInfoCallback + 32
12 CoreGraphics 0x3346b1c8 image_provider_finalize + 32
13 CoreFoundation 0x333213ce CFRelease + 290
14 CoreGraphics 0x33464f48 image_finalize + 60
15 CoreFoundation 0x333213ce CFRelease + 290
16 QuartzCore 0x34fa44ce CA::Layer::State::~State() + 94
17 QuartzCore 0x34fa7a4e CA::Layer::~Layer() + 290
18 QuartzCore 0x34fa77ae -[CALayer dealloc] + 138
19 QuartzCore 0x34f97a70 CA::Layer::free_transaction(CA::Transaction*) + 68
20 QuartzCore 0x34f960a4 CA::Transaction::commit() + 400
21 QuartzCore 0x34f95eac CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
22 CoreFoundation 0x333b56ca __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
23 CoreFoundation 0x333b39bc __CFRunLoopDoObservers + 272
24 CoreFoundation 0x333b3d12 __CFRunLoopRun + 738
25 CoreFoundation 0x33326eb8 CFRunLoopRunSpecific + 352
26 CoreFoundation 0x33326d44 CFRunLoopRunInMode + 100
27 GraphicsServices 0x36eea2e6 GSEventRunModal + 70
28 UIKit 0x3523c2fc UIApplicationMain + 1116
发布于 2015-03-06 20:38:01
使用NSNotificationCenter时会发生此崩溃
您向已释放的对象注册了通知观察者,但未删除该观察者。因此,当它试图调用选择器时,它会崩溃。
如果您正在使用某种类型的ViewController,则可以添加
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"Notification" object:nil];到viewWillDisappear
如果它不是观察者,您可以使用-(void) dealloc取消注册观察者。
https://stackoverflow.com/questions/17969493
复制相似问题