1

I am trying to figure out this problem.

Many answers say that the cause is that I tried to access data that is already deleted. I never delete anything in coredata.

Yet I look DELETE FROM ZGAIHIT WHERE Z_PK = ? AND Z_OPT = ? in the log.

What could possibly be the problem

2014-06-26 18:44:20.968 isikota[2626:4403] CoreData: sql: BEGIN EXCLUSIVE
2014-06-26 18:44:20.968 isikota[2626:4403] CoreData: sql: DELETE FROM ZGAIHIT WHERE Z_PK = ? AND Z_OPT = ?
2014-06-26 18:44:20.968 isikota[2626:4403] CoreData: sql: COMMIT
2014-06-26 18:44:24.256 isikota[2626:60b] <0xd042b70 newIsiKotaAppDelegate.m:(77)> nav.tabBarItem.title: Catalogs
2014-06-26 18:44:24.258 isikota[2626:4403] CoreData: sql: BEGIN EXCLUSIVE
2014-06-26 18:44:24.258 isikota[2626:4403] CoreData: sql: COMMIT
2014-06-26 18:44:24.259 isikota[2626:4403] CoreData: sql: SELECT COUNT( DISTINCT t0.Z_PK) FROM ZGAIHIT t0 
2014-06-26 18:44:24.259 isikota[2626:4403] CoreData: annotation: total count request execution time: 0.0006s for count of 0.
2014-06-26 18:44:24.260 isikota[2626:4403] CoreData: sql: BEGIN EXCLUSIVE
2014-06-26 18:44:24.260 isikota[2626:4403] CoreData: sql: COMMIT
2014-06-26 18:44:24.260 isikota[2626:4403] CoreData: sql: BEGIN EXCLUSIVE
2014-06-26 18:44:24.261 isikota[2626:4403] CoreData: sql: INSERT INTO ZGAIHIT(Z_PK, Z_ENT, Z_OPT, ZPARAMETERS, ZTIMESTAMP) VALUES(?, ?, ?, ?, ?)
2014-06-26 18:44:24.263 isikota[2626:4403] CoreData: sql: COMMIT
2014-06-26 18:44:25.857 isikota[2626:4907] *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0x1632fc80 <x-coredata://7D64D938-3117-4EF6-84F3-A6CB4E249B54/Business/p779>''
*** First throw call stack:
(
    0   CoreFoundation                      0x05e271e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x02bfc8e5 objc_exception_throw + 44
    2   CoreData                            0x0279dbeb _PFFaultHandlerLookupRow + 2715
    3   CoreData                            0x027cfe88 -[NSFaultHandler fulfillFault:withContext:] + 40
    4   CoreData                            0x027ac8b9 -[NSManagedObject(_NSInternalMethods) _newPropertiesForRetainedTypes:andCopiedTypes:preserveFaults:] + 73
    5   CoreData                            0x027ac85c -[NSManagedObject(_NSInternalMethods) _newAllPropertiesWithRelationshipFaultsIntact__] + 124
    6   CoreData                            0x027d5ea1 -[NSManagedObjectContext(_NSInternalAdditions) _committedSnapshotForObject:] + 65
    7   CoreData                            0x0284c4f6 -[NSManagedObjectContext(_NSInternalAdditions) _currentEventSnapshotForObject:] + 70
    8   CoreData                            0x027d85a2 -[NSManagedObjectContext(_NestedContextSupport) _copyChildObject:toParentObject:fromChildContext:] + 130
    9   CoreData                            0x027d81e8 -[NSManagedObjectContext(_NestedContextSupport) _parentProcessSaveRequest:inContext:error:] + 1480
    10  CoreData                            0x02850a14 __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 676
    11  CoreData                            0x027d2b81 internalBlockToNSManagedObjectContextPerform + 17
    12  libdispatch.dylib                   0x02eba4d0 _dispatch_client_callout + 14
    13  libdispatch.dylib                   0x02ea7740 _dispatch_barrier_sync_f_invoke + 58
    14  libdispatch.dylib                   0x02ea73ea dispatch_barrier_sync_f + 89
    15  CoreData                            0x027d2b02 _perform + 114
    16  CoreData                            0x027d29ae -[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:] + 238
    17  CoreData                            0x027ad56c -[NSManagedObjectContext save:] + 764
    18  isikota                             0x0002a0c0 __49+[BGMDCRManagedObjectContextThreadHandler commit]_block_invoke + 176
    19  CoreData                            0x027d284f developerSubmittedBlockToNSManagedObjectContextPerform + 95
    20  libdispatch.dylib                   0x02eba4d0 _dispatch_client_callout + 14
    21  libdispatch.dylib                   0x02ea7740 _dispatch_barrier_sync_f_invoke + 58
    22  libdispatch.dylib                   0x02ea73ea dispatch_barrier_sync_f + 89
    23  CoreData                            0x027d277f -[NSManagedObjectContext performBlockAndWait:] + 127
    24  isikota                             0x00029a76 +[BGMDCRManagedObjectContextThreadHandler commit] + 2758
    25  isikota                             0x00032507 +[BGFetchClass getObjectWithStringOfValue:fromTable:withAttribut:] + 935
    26  isikota                             0x0003201e +[BGFetchClass getObjectWithStringOfValue:fromTable:] + 222
    27  isikota                             0x00031ea3 __54+[BGFetchClass getObjectWithStringOfValues:fromTable:]_block_invoke + 99
    28  isikota                             0x000d8410 -[NSArray(variousDebuggingTools) convertEachElementToAnother:] + 400
    29  isikota                             0x00031dca +[BGFetchClass getObjectWithStringOfValues:fromTable:] + 154
    30  isikota                             0x000d9255 -[NSArray(variousDebuggingTools) convertDefaultSelectorsToManagedObjectWithClass:] + 69
    31  isikota                             0x0001acc6 -[BGGrabClass saveDataWithData:andIdToRequest:withDictToSave:Heavy:] + 5318
    32  isikota                             0x00020a9c -[BGGrabClass saveDataWithDataAfterGetBiz1:Heavy:] + 796
    33  isikota                             0x000210a2 -[BGGrabClass SaveDataAfterGetBiz1:] + 722
    34  isikota                             0x000212e8 -[BGGrabClass SaveDataAfterGetBiz:] + 456
    35  isikota                             0x00024444 -[BGGrabClass SaveDataWithNSArrayThatContainsID:] + 708
    36  isikota                             0x00159f84 +[BGBusinessGrabber arParseReturnID:] + 724
    37  isikota                             0x001596df +[BGBusinessGrabber vLoadObjectsWithID:] + 127
    38  isikota                             0x0007974d -[BGSearchParameter arGrabAndEncodeIDOfBusinesses] + 157
    39  isikota                             0x000792ae -[BGSearchParameter executeGrabWithCompletionBlock:] + 590
    40  isikota                             0x0007885d -[BGSearchParameter resetStartFromWithCompletionBlock:] + 541
    41  isikota                             0x00045bfa __39-[BGNearbyShortcut reloadButtonPressed]_block_invoke + 330
    42  Foundation                          0x021d4d65 -[NSBlockOperation main] + 88
    43  Foundation                          0x0222dc79 -[__NSOperationInternal _start:] + 671
    44  Foundation                          0x021aa9c8 -[NSOperation start] + 83
    45  Foundation                          0x0222ff44 __NSOQSchedule_f + 62
    46  libdispatch.dylib                   0x02eba4d0 _dispatch_client_callout + 14
    47  libdispatch.dylib                   0x02ea6fe0 _dispatch_async_redirect_invoke + 202
    48  libdispatch.dylib                   0x02eba4d0 _dispatch_client_callout + 14
    49  libdispatch.dylib                   0x02ea8eb7 _dispatch_root_queue_drain + 291
    50  libdispatch.dylib                   0x02ea9127 _dispatch_worker_thread2 + 39
    51  libsystem_pthread.dylib             0x031e9dab _pthread_wqthread + 336
    52  libsystem_pthread.dylib             0x031edcce start_wqthread + 30
)
libc++abi.dylib: terminating with uncaught exception of type _NSCoreDataException

The error happens here:

    PO1(arUpdatedObjects); // some objects are updated
    PO1(moc.insertedObjects);

    [moc performBlockAndWait:^{
        @synchronized([BGFetchClass class])
        {
            saveSuccesfully = [moc save:&error];
            if (!saveSuccesfully) {
                CLog(@"Error in Saving %@", error); //Error here
            }
            else{
            }
        }
    }];
user4951
  • 32,206
  • 53
  • 172
  • 282
  • That error can come from objects that were deleted, or from data that was never inserted in the first place (e.g. inserting on one context, trying to use the object ID on a different context without first saving changes). The error says it's related to an instance of the `Business` entity. Some detail about how you handle those is necessary to figure out what's wrong. – Tom Harrington Jun 26 '14 at 17:09

1 Answers1

0

First of all, DELETE FROM ZGAIHIT ~ logging statement is from Google Analytics update events under the hood. So it is not/or may be relate to your own core data problem since Google Analytics uses their own sql record. For your problem of Not Fullfil Fault Error, this thread might help. CoreData could not fulfill a fault for.

Community
  • 1
  • 1
Yoon Lee
  • 2,029
  • 22
  • 27