我收到崩潰報告,崩潰線程的調用堆棧都顯示Apple的代碼。從它的外觀來看,Core Data的撤銷管理器正在訪問-[NSManagedObject(_NSInternalMethods) _newSnapshotForUndo__] + 356
中的無效指針。我搜索了一下崩潰點,我發現的唯一一個類似的崩潰日誌是從Sequel Pro crash log。核心數據內部方法崩潰(SIGSEGV)
這是我正在看的特定的崩潰日誌。我有什麼希望能解決這個問題嗎?怎麼樣?我無法複製這個問題。
Code Type: X86-64 (Native)
Parent Process: launchd [184]
Date/Time: 2010-07-16 18:23:38.505 -0800
OS Version: Mac OS X 10.6.4 (10F569)
Report Version: 6
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Application Specific Information:
objc[27141]: garbage collection is ON
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 com.apple.CoreData 0x00007fff8602a7c4 -[NSManagedObject(_NSInternalMethods) _newSnapshotForUndo__] + 356
1 com.apple.CoreData 0x00007fff8602a3da - [NSManagedObjectContext(_NSInternalChangeProcessing) _registerUndoForOperation:withObjects:withExtraArguments:] + 218
2 com.apple.CoreData 0x00007fff8602a2f2 -[NSManagedObjectContext(_NSInternalChangeProcessing) _registerUndoForModifiedObjects:] + 34
3 com.apple.CoreData 0x00007fff85ff9933 -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 1155
4 com.apple.CoreData 0x00007fff86035e72 -[NSManagedObjectContext processPendingChanges] + 18
5 com.apple.CoreData 0x00007fff8604ca1c - [NSManagedObjectContext(_NSInternalNotificationHandling) _processEndOfEventNotification:] + 108
6 com.apple.CoreData 0x00007fff86029c6e -[NSManagedObjectContext(_NSInternalChangeProcessing) _undoManagerCheckpoint:] + 30
7 com.apple.Foundation 0x00007fff8460784e _nsnote_callback + 167
8 com.apple.CoreFoundation 0x00007fff842d0a90 __CFXNotificationPost + 1008
9 com.apple.CoreFoundation 0x00007fff842bd008 _CFXNotificationPostNotification + 200
10 com.apple.Foundation 0x00007fff845fe7b8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 101
11 com.apple.Foundation 0x00007fff8466f557 -[NSUndoManager _postCheckpointNotification] + 74
12 com.apple.Foundation 0x00007fff8466f3b9 -[NSUndoManager _endUndoGroupRemovingIfEmpty:] + 86
13 com.apple.Foundation 0x00007fff8461ea71 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 455
14 com.apple.AppKit 0x00007fff82819945 -[NSApplication run] + 509
15 com.apple.AppKit 0x00007fff828125f8 NSApplicationMain + 364
在此先感謝。
請注意,這來自用戶的機器,我似乎無法複製該問題。 – adib 2010-07-20 17:44:20
似乎這發生(有時,並不總是)在剛剛在主線程中創建一個NSManagedObjectContext並將其傳遞給後臺工作線程(技術上,NSOperation子類)之後。新的上下文有可能以某種方式獲取主線程上下文的撤銷管理器嗎?我是否應該將NSPersistentStoreCoordinator實例傳遞給工作線程,並讓它創建自己的上下文? – adib 2010-07-25 17:38:12