0

My app crashes sometimes because of the RestKit, then I looked at the Crashlytics record. It shows the following errors:

Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x181c52014 __pthread_kill + 8
1  libsystem_pthread.dylib        0x181d19460 pthread_kill + 112
2  libsystem_c.dylib              0x181bc63f4 abort + 140
3  libsystem_malloc.dylib         0x181c96a38 _nano_vet_and_size_of_live + 330
4  libsystem_malloc.dylib         0x181c9804c nano_realloc + 648
5  libsystem_malloc.dylib         0x181c8a258 malloc_zone_realloc + 180
6  Foundation                     0x1836a7e28 -[NSString quotedStringRepresentation] + 732
7  Foundation                     0x183687cfc -[NSString _stringRepresentation] + 376
8  CoreFoundation                 0x182bacc9c -[NSDictionary descriptionWithLocale:indent:] + 1028
9  Foundation                     0x1836623a4 _NSDescriptionWithLocaleFunc + 76
10 CoreFoundation                 0x182c45958 __CFStringAppendFormatCore + 7996
11 CoreFoundation                 0x182c439e4 _CFStringCreateWithFormatAndArgumentsAux2 + 244
12 CoreData                       0x184fbaa78 PFLog + 168
13 CoreData                       0x184f885ec -[NSManagedObjectContext(_NSInternalAdditions) _didSaveChanges] + 2824
14 CoreData                       0x184f74a0c -[NSManagedObjectContext save:] + 3440
15 RestKit                        0x101939228 __84-[RKManagedObjectRequestOperation saveContextToPersistentStore:failedContext:error:]_block_invoke (RKManagedObjectRequestOperation.m:800)
16 CoreData                       0x184ff7b68 developerSubmittedBlockToNSManagedObjectContextPerform + 152
17 libdispatch.dylib              0x181b0d1c0 _dispatch_client_callout + 16
18 libdispatch.dylib              0x181b1e0c4 _dispatch_barrier_sync_f_slow_invoke + 320
19 libdispatch.dylib              0x181b0d1c0 _dispatch_client_callout + 16
20 libdispatch.dylib              0x181b11d6c _dispatch_main_queue_callback_4CF + 1000
21 CoreFoundation                 0x182c31f2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
22 CoreFoundation                 0x182c2fb18 __CFRunLoopRun + 1660
23 CoreFoundation                 0x182b5e048 CFRunLoopRunSpecific + 444
24 GraphicsServices               0x1845e1198 GSEventRunModal + 180
25 UIKit                          0x188b38628 -[UIApplication _run] + 684
26 UIKit                          0x188b33360 UIApplicationMain + 208
27 WayfairApp                     0x100169fbc main (main.m:22)
28 libdispatch.dylib              0x181b405b8 (Missing)

This almost happens on ios10. I don't know what's the underlying problem of this so I searched online but can't find any answer. Can anybody who's familiar with RestKit help me?

ybxsnail
  • 11
  • 1
  • Looks like a threading issue. Are you trying to do some UI work in the background, or while trying to access CoreData? – WrightsCS Nov 08 '16 at 22:05
  • I'm trying to access the coreData. And this not happening to all of my data requests only part of it. – ybxsnail Nov 08 '16 at 22:09
  • Make sure you are jumping back to the main thread when updating the UI. `dispatch_async` – WrightsCS Nov 08 '16 at 22:11

0 Answers0