Coredata Crash: _PFObjectIDFastHash64 - ios

We have been facing a weird crash from core data from long time and haven't found anything what to do. Below is the crash stack to get more insight on it. It is a production issue and not replicate at our end.
Crashed: NSManagedObjectContext 0x2810fd450
0 CoreData 0x6f8d8 _PFObjectIDFastHash64 + 40
1 CoreFoundation 0xef54 __CFBasicHashRehash + 948
2 CoreFoundation 0xe76c CFBasicHashRemoveValue + 2412
3 CoreFoundation 0x45ce0 CFDictionaryRemoveValue + 336
4 CoreData 0x10781c -[NSManagedObjectContext(_NSInternalAdditions) _forgetObject:propagateToObjectStore:removeFromRegistry:] + 132
5 CoreData 0x29554 -[_PFManagedObjectReferenceQueue _processReferenceQueue:] + 916
6 CoreData 0xa284c __90-[NSManagedObjectContext(_NSInternalNotificationHandling) _registerAsyncReferenceCallback]_block_invoke + 80
7 CoreData 0x1f754 developerSubmittedBlockToNSManagedObjectContextPerform + 156
8 libdispatch.dylib 0x4660 _dispatch_client_callout + 20
9 libdispatch.dylib 0xbde4 _dispatch_lane_serial_drain + 672
10 libdispatch.dylib 0xc958 _dispatch_lane_invoke + 392
11 libdispatch.dylib 0x171a8 _dispatch_workloop_worker_thread + 656
12 libsystem_pthread.dylib 0x10f4 _pthread_wqthread + 288
13 libsystem_pthread.dylib 0xe94 start_wqthread + 8

Looks like the problem could be in NSManagedObjectContext performing some work. Maybe integrating some data-collection lib, as Crashlytics can help.
Regarding stack trace: could you please send the original error message (as shown on screenshot)?.
For now I can draw only bare suggestions that are not so relevant.

Related

Coredata crash dispose object : -[NSManagedObjectContext _dispose:]

Hi we are getting the frequent crash related with Core data managed object context in production and which is not replicate on our end, and we got stuck what to do.
The stack trace is below:
Crashed: NSManagedObjectContext 0x2807e5ad0
0 CoreData 0x380ec -[NSManagedObjectContext _dispose:] + 488
1 CoreData 0x43184 -[NSManagedObjectContext _dealloc__] + 648
2 CoreData 0x49220 __internalBlockToDeallocNSManagedObjectContext_block_invoke + 52
3 CoreData 0x22dac developerSubmittedBlockToNSManagedObjectContextPerform + 148
4 libdispatch.dylib 0x642f0 _dispatch_client_callout + 16
5 libdispatch.dylib 0xa54c _dispatch_lane_serial_drain$VARIANT$mp + 644
6 libdispatch.dylib 0xaff0 _dispatch_lane_invoke$VARIANT$mp + 408
7 libdispatch.dylib 0x14ae4 _dispatch_workloop_worker_thread + 632
8 libsystem_pthread.dylib 0xf38 _pthread_wqthread + 284
9 libsystem_pthread.dylib 0xaa4 start_wqthread + 8
enter image description here
Core Data crashes can occur when doing modifications on different threads or contexts.
Here's an article about debugging these issues.
Here's an SO answer about context issues.

iOS 13, crashes with Photos framework, PHCompositeMediaResult class

After new iOS release in our app become crashing with PHCompositeMediaResult. What I see in Crashlytics.
[PHCompositeMediaResult isPlaceholder]
[PHCompositeMediaResult isDegraded]
[PHCompositeMediaResult isCancelled]
Any idea what can we do with this?
Edit
Stacktrace:
Crashed: com.apple.photos.imageManagerCache
0 libobjc.A.dylib 0x1b12b8190 objc_msgSend + 16
1 CoreFoundation 0x1b146ec04 -[__NSDictionaryM objectForKeyedSubscript:] + 180
2 Photos 0x1bc7f385c -[PHCompositeMediaResult isPlaceholder] + 36
3 Photos 0x1bc84b978 -[PHCachingImageManager _canPopulateCacheForResult:] + 56
4 Photos 0x1bc84e588 __90-[PHCachingImageManager additionalWorkForImageRequestCompletedWithResult:request:context:]_block_invoke + 64
5 libdispatch.dylib 0x1b1260658 _dispatch_call_block_and_release + 24
6 libdispatch.dylib 0x1b12611cc _dispatch_client_callout + 16
7 libdispatch.dylib 0x1b120d524 _dispatch_lane_serial_drain$VARIANT$mp + 608
8 libdispatch.dylib 0x1b120df18 _dispatch_lane_invoke$VARIANT$mp + 420
9 libdispatch.dylib 0x1b1217400 _dispatch_workloop_worker_thread + 588
10 libsystem_pthread.dylib 0x1b12b0fa8 _pthread_wqthread + 276
11 libsystem_pthread.dylib 0x1b12b3ae4 start_wqthread + 8
This appears to just happen in iOS 13.0.0. I don't have any instances of it happening on 13.1, 13.1.1, or 13.1.2... So it was probably a bug in the OS that they quickly figured out and fixed. Hopefully not many users stay on 13.0.0 for long. Maybe the "what to do about this?" answer is just to do nothing.

App crash After core data update on [RKManagedObjectRequestOperation obtainPermanentObjectIDsForInsertedObjects:]

Some users are reporting crashes in my app when I checked it from crittercism. It is giving me below stack trace. I have update my core data with new model version( Using light weight migration). I am using Restkit and Magical Records in my app. I didn't get what is the problem ?
>>0 libobjc.A.dylib 0x353a16ba objc_retain + 8
! 1 Provider 0x00aeb701 __78-[RKManagedObjectRequestOperation obtainPermanentObjectIDsForInsertedObjects:]_block_invoke (RKManagedObjectRequestOperation.m:885)
2 CoreData 0x26c7496b developerSubmittedBlockToNSManagedObjectContextPerform + 180
3 libdispatch.dylib 0x35917c6f _dispatch_client_callout + 20
4 libdispatch.dylib 0x35921559 _dispatch_barrier_sync_f_invoke + 46
5 CoreData 0x26c74857 -[NSManagedObjectContext performBlockAndWait:] + 200
6 Provider 0x00aeb555 -[RKManagedObjectRequestOperation obtainPermanentObjectIDsForInsertedObjects:] (RKManagedObjectRequestOperation.m:882)
7 Provider 0x00ae8c67 __79-[RKManagedObjectRequestOperation performMappingOnResponseWithCompletionBlock:]_block_invoke348 (RKManagedObjectRequestOperation.m:645)
8 Provider 0x00b15961 -[RKResponseMapperOperation willFinish] (RKResponseMapperOperation.m:325)
9 Provider 0x00b1609d -[RKResponseMapperOperation main] (RKResponseMapperOperation.m:412)
10 Foundation 0x27b7cb0d -[__NSOperationInternal _start:] + 766
11 Foundation 0x27c21d93 __NSOQSchedule_f + 184
12 libdispatch.dylib 0x359224d3 _dispatch_queue_drain$VARIANT$mp + 1460
13 libdispatch.dylib 0x35921da1 _dispatch_queue_invoke$VARIANT$mp + 82
14 libdispatch.dylib 0x35924491 _dispatch_root_queue_drain + 386
15 libdispatch.dylib 0x359258a3 _dispatch_worker_thread3 + 104
16 libsystem_pthread.dylib 0x35a99d9d _pthread_wqthread + 666
17 libsystem_pthread.dylib 0x35a99af0 start_wqthread + 6

Coredata _clearRawPropertiesWithHint crash ios9

I have been stuck with this crash for few days and seem to be going nowhere.
Crashed: NSManagedObjectContext 0x14f016920
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000000000010
Thread : Crashed: NSManagedObjectContext 0x14f016920
0 libobjc.A.dylib 0x000000019953dbd0 objc_msgSend + 16
1 CoreFoundation 0x0000000184969c84 __CFBasicHashDrain + 276
2 CoreFoundation 0x0000000184814da4 CFRelease + 256
3 CoreData 0x0000000184632cf0 -[_NSFaultingMutableSet dealloc] + 68
4 CoreData 0x00000001845f8d3c -[_CDSnapshot dealloc] + 84
5 CoreData 0x00000001846068e0 -[NSManagedObject(_NSInternalMethods) _clearRawPropertiesWithHint:] + 388
6 CoreData 0x00000001846066bc -[NSFaultHandler turnObject:intoFaultWithContext:] + 448
7 CoreData 0x0000000184603e10 -[NSManagedObject dealloc] + 104
8 CoreData 0x0000000184603428 -[_PFManagedObjectReferenceQueue _processReferenceQueue:] + 1076
9 CoreData 0x0000000184681678 __89-[NSManagedObjectContext(_NSInternalNotificationHandling) _registerAyncReferenceCallback]_block_invoke + 104
10 CoreData 0x000000018467bc20 developerSubmittedBlockToNSManagedObjectContextPerform + 196
11 libdispatch.dylib 0x0000000199d25770 _dispatch_client_callout + 16
12 libdispatch.dylib 0x0000000199d3175c _dispatch_queue_drain + 864
13 libdispatch.dylib 0x0000000199d29274 _dispatch_queue_invoke + 464
14 libdispatch.dylib 0x0000000199d25770 _dispatch_client_callout + 16
15 libdispatch.dylib 0x0000000199d33bb0 _dispatch_root_queue_drain + 2140
16 libdispatch.dylib 0x0000000199d3334c _dispatch_worker_thread3 + 112
17 libsystem_pthread.dylib 0x0000000199f39478 _pthread_wqthread + 1092
Any pointers on how I can debug this crash? The same didn't crash in iOS 8. Could it be a iOS 9 crash and hopefully it will be fixed in the subsequent iOS versions?
Any help would be much appreciated.

RestKit crash -- RKManagedObjectRequestOperation.m line 873

I am getting a crash report from my app in production. The stack trace doesn't include any of my code, rather points to code in RestKit itself where it is crashing. The crash itself is hard to reproduce on my side, and seems like some user in production is hitting an edge case. Below is the stack trace:
Thread : Crashed: NSManagedObjectContext 0x1743ecd00
0 libobjc.A.dylib 0x000000019361c0b4 objc_retain + 20
1 MyApp 0x00000001001e64c4 __78-[RKManagedObjectRequestOperation obtainPermanentObjectIDsForInsertedObjects:]_block_invoke (RKManagedObjectRequestOperation.m:873)
2 CoreData 0x0000000181b7d218 developerSubmittedBlockToNSManagedObjectContextPerform + 200
3 libdispatch.dylib 0x0000000193c55954 _dispatch_client_callout + 16
4 libdispatch.dylib 0x0000000193c5f1e4 _dispatch_barrier_sync_f_invoke + 76
5 CoreData 0x0000000181b7d0d8 -[NSManagedObjectContext performBlockAndWait:] + 244
6 MyApp 0x00000001001e62d8 -[RKManagedObjectRequestOperation obtainPermanentObjectIDsForInsertedObjects:] (RKManagedObjectRequestOperation.m:870)
7 MyApp 0x00000001001e34e4 __79-[RKManagedObjectRequestOperation performMappingOnResponseWithCompletionBlock:]_block_invoke345 (RKManagedObjectRequestOperation.m:643)
8 MyApp 0x000000010021c31c -[RKResponseMapperOperation willFinish] (RKResponseMapperOperation.m:317)
9 MyApp 0x000000010021c980 -[RKResponseMapperOperation main] (RKResponseMapperOperation.m:404)
10 Foundation 0x0000000182c601cc -[__NSOperationInternal _start:] + 636
11 Foundation 0x0000000182d21f28 __NSOQSchedule_f + 228
12 libdispatch.dylib 0x0000000193c55954 _dispatch_client_callout + 16
13 libdispatch.dylib 0x0000000193c600a4 _dispatch_queue_drain + 1448
14 libdispatch.dylib 0x0000000193c58a5c _dispatch_queue_invoke + 132
15 libdispatch.dylib 0x0000000193c62318 _dispatch_root_queue_drain + 720
16 libdispatch.dylib 0x0000000193c63c4c _dispatch_worker_thread3 + 108
17 libsystem_pthread.dylib 0x0000000193e3522c _pthread_wqthread + 816
18 libsystem_pthread.dylib 0x0000000193e34ef0 start_wqthread + 4
The crash message itself is:
Crashed: NSManagedObjectContext 0x17198900
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x915da43f
Any hints/directions as to how I can go about debugging this issue?
Thanks.
Ran into this, had setup the core data stack twice on accident, removing the second initialization fixed the issue.

Resources