0

有时,我会看到源自-deallocin的崩溃SPTrack

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xb1e8ded2
Crashed Thread:  13

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_c.dylib               0x39bb8d5c memset$VARIANT$CortexA9 + 100
1   CoreFoundation                  0x35e1a7fc __CFAllocateObjectArray + 176
2   CoreFoundation                  0x35d62118 _CFXNotificationRemoveObservers + 420
3   Foundation                      0x33834490 -[NSNotificationCenter removeObserver:name:object:] + 228
4   MyAppName                       0x00179fd0 -[SPTrack dealloc] (SPTrack.m:291)
5   MyAppName                       0x0017993a __destroy_helper_block_141 (SPTrack.m:223)
6   libsystem_blocks.dylib          0x352adab0 _Block_release + 220
7   libdispatch.dylib               0x34b064b4 _dispatch_client_callout + 20
8   libdispatch.dylib               0x34b0b1b8 _dispatch_main_queue_callback_4CF$VARIANT$mp + 220
9   CoreFoundation                  0x35de9f36 __CFRunLoopRun + 1286
10  CoreFoundation                  0x35d5ceb8 CFRunLoopRunSpecific + 352
11  CoreFoundation                  0x35d5cd44 CFRunLoopRunInMode + 100
12  GraphicsServices                0x362992e6 GSEventRunModal + 70
13  UIKit                           0x3713b2fc UIApplicationMain + 1116
14  MyAppName                       0x0005e986 main (main.m:14)
15  MyAppName                       0x0001d8e4 start + 36

这是 #291 中的内容SPTrack

[[NSNotificationCenter defaultCenter] removeObserver:self name:SPSessionDidUpdateMetadataNotification object:self.session];

当我将应用程序从后台恢复时,通常会发生这种情况。

任何想法可能是什么原因?它是否试图多次移除观察者?或者可能self.session无效?(无法用调试器捕获它。)

4

1 回答 1

0

在CocoaLibSpotify 中挑选此提交后(根据 iKenndac 的建议),我不再遇到这些崩溃。

于 2012-09-30T21:52:06.973 回答