Objective c 删除行时出现核心数据错误

Objective c 删除行时出现核心数据错误,objective-c,core-data,Objective C,Core Data,我有一个UITableViewController来管理分组的tableView。tableView是从fetchedResultsController填充的 如果单击导航栏中的“编辑”按钮,然后选择一行并单击“删除”按钮,则该行将被删除,并且所有内容都会结束 但是,如果我滑动显示一行中的“删除”按钮并单击“删除”按钮,应用程序将崩溃,并出现以下错误: CoreData:错误:严重的应用程序错误。异常被捕获 在核心数据更改处理期间。这通常是一个内部错误 NSManagedObjectContex

我有一个UITableViewController来管理分组的tableView。tableView是从fetchedResultsController填充的

如果单击导航栏中的“编辑”按钮,然后选择一行并单击“删除”按钮,则该行将被删除,并且所有内容都会结束

但是,如果我滑动显示一行中的“删除”按钮并单击“删除”按钮,应用程序将崩溃,并出现以下错误:

CoreData:错误:严重的应用程序错误。异常被捕获 在核心数据更改处理期间。这通常是一个内部错误 NSManagedObjectContextObjectsIDChangeNotification的观察者<强>* -[\uu NSPlaceholderArray initWithObjects:计数:]:尝试从具有userInfo(null)的对象[0]插入nil对象2017-05-05 10:02:11.780 bibleapp[844:18560]*由于未捕获的异常而终止应用程序 “NSInvalidArgumentException”,原因:“***-[\uu NSPlaceholderArray” initWithObjects:count::尝试从对象[0]插入nil对象

我正在使用此删除的代码是

-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
 {

    if (editingStyle == UITableViewCellEditingStyleDelete) {
    // Delete the managed object for the given index path
    NSManagedObjectContext *context = [fetchedResultsController managedObjectContext];
    [context deleteObject:[fetchedResultsController objectAtIndexPath:indexPath]];

    // Save the context.
    NSError *error = nil;
    if (![context save:&error]) {
        /*
         Replace this implementation with code to handle the error appropriately.

         abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button.
         */
        NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
        abort();
    }
  }   
}

请您可能会找到一个有帮助的答案。保存上下文时会出现错误。我被搜索到这个错误,但我没有找到一个合适的解决方案。你能告诉我如何解决这个错误吗。您可能会找到一个有帮助的答案。保存上下文时会出现错误。我被搜索到这个错误,但我没有找到一个合适的解决方案。你能告诉我如何解决这个错误吗。?