我通過核心數據工具在http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreDataUtilityTutorial/Articles/00_introduction.html#//apple_ref/doc/uid/TP40001800-CH202-TP1核心數據實用程序崩潰
,我無意中發現了就行了相當惡劣的崩潰SIG_ABRT讀取工作:
[moc save:&error]
這是在輸出調試:
2010-07-25 22:24:01.665 CoreDataUtilityTutorial[1607:a0f] -[NSCFNumber timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x200022100
2010-07-25 22:24:01.666 CoreDataUtilityTutorial[1607:a0f] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFNumber timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x200022100'
*** Call stack at first throw:
(
0 CoreFoundation 0x00007fff87e71cc4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x00007fff840ee0f3 objc_exception_throw + 45
2 CoreFoundation 0x00007fff87ecb140 +[NSObject(NSObject) doesNotRecognizeSelector:] + 0
3 CoreFoundation 0x00007fff87e43cdf ___forwarding___ + 751
4 CoreFoundation 0x00007fff87e3fe28 _CF_forwarding_prep_0 + 232
5 CoreData 0x00007fff881baede -[NSXMLDocumentMap getXMLAttributeValueFromObject:forAttribute:] + 478
6 CoreData 0x00007fff881be7c8 -[NSXMLDocumentMap nodeFromManagedObject:objectIDMap:] + 1160
7 CoreData 0x00007fff881bb67c -[NSXMLDocumentMap addObject:objectIDMap:] + 140
8 CoreData 0x00007fff8817d400 -[NSMappedObjectStore _addObject:objectIDMap:] + 32
9 CoreData 0x00007fff8817c98f -[NSMappedObjectStore executeSaveChangesRequest:withContext:] + 1343
10 CoreData 0x00007fff88177599 -[NSMappedObjectStore executeRequest:withContext:] + 105
11 CoreData 0x00007fff88145051 -[NSPersistentStoreCoordinator(_NSInternalMethods) executeRequest:withContext:] + 545
12 CoreData 0x00007fff88179123 -[NSManagedObjectContext save:] + 323
13 CoreDataUtilityTutorial 0x00000001000015b7 main + 303
14 CoreDataUtilityTutorial 0x0000000100000cac start + 52
15 ??? 0x0000000000000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
任何人有想法嗎?我重新檢查了代碼,看看我是否錯誤輸入了一些內容,但沒有錯誤...
在此先感謝。
就是這樣!當它應該被設置爲整數32時,processID字段被設置爲日期類型。我的錯。 :) 謝謝! – pedroremedios 2010-07-26 14:14:50