2013-07-31 26 views
0

我有一个无用的异常,崩溃我的应用程序与最新的Simperium库。据我所知,我已经设置了一切,但每当它开始尝试和同步核心数据更改时,都会发生异常。与Simperium未处理的异常

这里是抛出的异常:

2013-07-31 15:02:00:234 Twitter Translator[28336:303] Simperium enqueuing 168 object requests (Tweet) 
2013-07-31 15:07:36.446 Twitter Translator[28336:303] -[AppDelegate handleManagedObjectContextChange:]: unrecognized selector sent to instance 0x102609120 
2013-07-31 15:07:36.446 Twitter Translator[28336:303] An uncaught exception was raised 
2013-07-31 15:07:36.446 Twitter Translator[28336:303] -[AppDelegate handleManagedObjectContextChange:]: unrecognized selector sent to instance 0x102609120 
2013-07-31 15:07:36.449 Twitter Translator[28336:303] (
0 CoreFoundation      0x00007fff95799b06 __exceptionPreprocess + 198 
1 libobjc.A.dylib      0x00007fff897bb3f0 objc_exception_throw + 43 
2 CoreFoundation      0x00007fff9583040a -[NSObject(NSObject) doesNotRecognizeSelector:] + 186 
3 CoreFoundation      0x00007fff9578802e ___forwarding___ + 414 
4 CoreFoundation      0x00007fff95787e18 _CF_forwarding_prep_0 + 232 
5 CoreFoundation      0x00007fff9574beda _CFXNotificationPost + 2554 
6 Foundation       0x00007fff8c7a27b6 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64 
7 CoreData       0x00007fff93b1b46f -[NSManagedObjectContext _mergeChangesFromDidSaveDictionary:usingObjectIDs:] + 3263 
8 Simperium-OSX      0x00000001001b5251 __34-[SPCoreDataStorage mergeChanges:]_block_invoke + 49 
9 libdispatch.dylib     0x00007fff94d11a2d _dispatch_barrier_sync_f_slow_invoke + 77 
10 libdispatch.dylib     0x00007fff94d0c0b6 _dispatch_client_callout + 8 
11 libdispatch.dylib     0x00007fff94d110c8 _dispatch_main_queue_callback_4CF + 275 
12 CoreFoundation      0x00007fff9573bb4c __CFRunLoopRun + 1644 
13 CoreFoundation      0x00007fff9573b0e2 CFRunLoopRunSpecific + 290 
14 HIToolbox       0x00007fff95247eb4 RunCurrentEventLoopInMode + 209 
15 HIToolbox       0x00007fff95247b94 ReceiveNextEventCommon + 166 
16 HIToolbox       0x00007fff95247ae3 BlockUntilNextEventMatchingListInMode + 62 
17 AppKit        0x00007fff8cc0e533 _DPSNextEvent + 685 
18 AppKit        0x00007fff8cc0ddf2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 
19 AppKit        0x00007fff8cc051a3 -[NSApplication run] + 517 
20 AppKit        0x00007fff8cba9bd6 NSApplicationMain + 869 
21 Twitter Translator     0x0000000100005932 main + 34 
22 libdyld.dylib      0x00007fff8a7a37e1 start + 0 
23 ???         0x0000000000000003 0x0 + 3 
) 
2013-07-31 15:07:36.449 Twitter Translator[28336:303] *** Terminating app due to uncaught exception  'NSInvalidArgumentException', reason: '-[AppDelegate handleManagedObjectContextChange:]: unrecognized selector  sent to instance 0x102609120' 
*** First throw call stack: 
(
0 CoreFoundation      0x00007fff95799b06 __exceptionPreprocess + 198 
1 libobjc.A.dylib      0x00007fff897bb3f0 objc_exception_throw + 43 
2 CoreFoundation      0x00007fff9583040a -[NSObject(NSObject)  doesNotRecognizeSelector:] + 186 
3 CoreFoundation      0x00007fff9578802e ___forwarding___ + 414 
4 CoreFoundation      0x00007fff95787e18 _CF_forwarding_prep_0 + 232 
5 CoreFoundation      0x00007fff9574beda _CFXNotificationPost + 2554 
6 Foundation       0x00007fff8c7a27b6 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64 
7 CoreData       0x00007fff93b1b46f -[NSManagedObjectContext _mergeChangesFromDidSaveDictionary:usingObjectIDs:] + 3263 
8 Simperium-OSX      0x00000001001b5251 __34-[SPCoreDataStorage mergeChanges:]_block_invoke + 49 
9 libdispatch.dylib     0x00007fff94d11a2d _dispatch_barrier_sync_f_slow_invoke + 77 
10 libdispatch.dylib     0x00007fff94d0c0b6 _dispatch_client_callout + 8 
11 libdispatch.dylib     0x00007fff94d110c8 _dispatch_main_queue_callback_4CF + 275 
12 CoreFoundation      0x00007fff9573bb4c __CFRunLoopRun + 1644 
13 CoreFoundation      0x00007fff9573b0e2 CFRunLoopRunSpecific + 290 
14 HIToolbox       0x00007fff95247eb4 RunCurrentEventLoopInMode + 209 
15 HIToolbox       0x00007fff95247b94 ReceiveNextEventCommon + 166 
16 HIToolbox       0x00007fff95247ae3 BlockUntilNextEventMatchingListInMode + 62 
17 AppKit        0x00007fff8cc0e533 _DPSNextEvent + 685 
18 AppKit        0x00007fff8cc0ddf2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 
19 AppKit        0x00007fff8cc051a3 -[NSApplication run] + 517 
20 AppKit        0x00007fff8cba9bd6 NSApplicationMain + 869 
21 Twitter Translator     0x0000000100005932 main + 34 
22 libdyld.dylib      0x00007fff8a7a37e1 start + 0 
23 ???         0x0000000000000003 0x0 + 3 
) 
libc++abi.dylib: terminate called throwing an exception 

我认为其中错误发生的线,这是一个:

 dispatch_sync(dispatch_get_main_queue(), ^{ 
    [__managedObjectContext mergeChangesFromContextDidSaveNotification:notification]; 
}); 

但我不是100%肯定是我的错误狩猎不是很大:(

任何人有什么想法?

感谢

加雷思

回答

1

这条线:

2013-07-31 15:07:36.446 Twitter Translator[28336:303] -[AppDelegate handleManagedObjectContextChange:]: unrecognized selector sent to instance 0x102609120 

告诉你,你需要知道的一切。您正尝试将消息handleManagedObjectContextChange:发送给您的应用程序委托,但它不实现该方法。因此,你需要做的是确定消息的发送位置,并确认它确实被发送到你想要发送给它的对象。

我意识到这个答案可能有点普遍,但你只提供了一行代码,它并没有告诉我们太多。从堆栈跟踪的外观中,确定您正在处理通知的区域;那可能是一个开始寻找的好地方。

+0

哦,这是一个愚蠢的领主,这是我执行的一个功能,当我移除图书馆时他们被删除。重新添加了库的最新版本,但没有重新实现该方法。 –