2010-08-03 77 views
1

即使我在委托方法中注释了每一个单独的活动,每次我调用“managedobjectcontext save:nil”操作时,该应用程序都会崩溃,并显示以下错误:问题,但不知道在哪里。我得到EXC_BAD_ACCESS)NSFetchedResultsController在每次保存操作时崩溃

#0 0x02813a93 in objc_msgSend 
#1 0xbfffd5b0 in ?? 
#2 0x0236c1b2 in -[NSFetchedResultsController(PrivateMethods) _postprocessInsertedObjects:] 
#3 0x023721bc in -[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:] 
#4 0x00024c1d in _nsnote_callback 
#5 0x02690cf9 in __CFXNotificationPost_old 
#6 0x0261011a in _CFXNotificationPostNotification 
#7 0x0001a7c2 in -[NSNotificationCenter postNotificationName:object:userInfo:] 
#8 0x022ae519 in -[NSManagedObjectContext(_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:] 
#9 0x0231db33 in -[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes:] 
#10 0x02290f78 in -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] 
#11 0x022caa15 in -[NSManagedObjectContext save:] 
#12 0x00005147 in -[PostsViewController saveMOC:] at PostsViewController.m:254 
#13 0x00039e9a in __NSThreadPerformPerform 
#14 0x02699d7f in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 
#15 0x025f81dd in __CFRunLoopDoSources0 
#16 0x025f77c6 in __CFRunLoopRun 
#17 0x025f7280 in CFRunLoopRunSpecific 
#18 0x025f71a1 in CFRunLoopRunInMode 
#19 0x02f1d2c8 in GSEventRunModal 
#20 0x02f1d38d in GSEventRun 
#21 0x002c8b58 in UIApplicationMain 
#22 0x000028c0 in main at main.m:14 

回答

2

你最有可能改变的FRC当上下文被保存的属性。如果您有一个用作sectionNameKeyPath的属性,保存时更改属性可能会引发此问题。