2013-07-31 69 views
2

我收到以下崩潰。有誰能告訴我這次事故的原因嗎?__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 18 23 CoreFoundation崩潰

__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 

+0

請添加其餘的堆棧跟蹤 – JustSid

+0

我已經更新了我的文章。請檢查。 –

回答

6

這個崩潰使用NSNotificationCenter

時,您註冊的通知觀察員已被釋放,並沒有刪除觀察者對象時發生。所以當它試圖調用選擇器時,它會崩潰。

如果您正在使用某種形式的視圖控制器,你可以添加

[[NSNotificationCenter defaultCenter] removeObserver:self name:@"Notification" object:nil]; 

viewWillDisappear

,如果它不是一個視圖控制器,你可以使用-(void) dealloc註銷觀察。