Crashed: NSManagedObjectContext +[ALAssetsLibrary _library]

231 views Asked by At

My app is crashing randomly with some users. It looks like the crash happens when the app tries to save video and photos to gallery. It's the only point I used ALAssetsLibrary.

This is the crash report I'm receiving on Crashlytics:

Crashed: NSManagedObjectContext 0x106be1be0: +[ALAssetsLibrary _library]
0  libobjc.A.dylib                0x1860a4430 objc_msgSend + 16
1  CoreData                       0x1895e9d24 -[_PFManagedObjectReferenceQueue _processReferenceQueue:] + 1880
2  CoreData                       0x1895f043c -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 132
3  CoreData                       0x18968a710 -[NSManagedObjectContext _mergeChangesFromDidSaveDictionary:usingObjectIDs:] + 4944
4  PhotoLibraryServices           0x1947187bc -[PLManagedObjectContext _mergeChangesFromDidSaveDictionary:usingObjectIDs:] + 468
5  CoreData                       0x189695570 __90+[NSManagedObjectContext(_NSCoreDataSPI) _mergeChangesFromRemoteContextSave:intoContexts:]_block_invoke.1514 + 72
6  CoreData                       0x18968aea4 developerSubmittedBlockToNSManagedObjectContextPerform + 156
7  libdispatch.dylib              0x1867c5048 _dispatch_client_callout + 16
8  libdispatch.dylib              0x1867cdae8 _dispatch_queue_barrier_sync_invoke_and_complete + 56
9  CoreData                       0x18968ada8 -[NSManagedObjectContext performBlockAndWait:] + 304
10 CoreData                       0x189694be4 +[NSManagedObjectContext(_NSCoreDataSPI) _mergeChangesFromRemoteContextSave:intoContexts:] + 3404
11 PhotoLibraryServices           0x194715f00 __108+[PLManagedObjectContext mergeChangesFromRemoteContextSave:intoAllContextsNotIdenticalTo:completionHandler:]_block_invoke + 160
12 AssetsLibraryServices          0x194350d98 __pl_dispatch_async_block_invoke + 36
13 libdispatch.dylib              0x1867c5088 _dispatch_call_block_and_release + 24
14 libdispatch.dylib              0x1867c5048 _dispatch_client_callout + 16
15 libdispatch.dylib              0x1867cee48 _dispatch_queue_serial_drain$VARIANT$mp + 528
16 libdispatch.dylib              0x1867cf7d8 _dispatch_queue_invoke$VARIANT$mp + 340
17 libdispatch.dylib              0x1867d0200 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 400
18 libdispatch.dylib              0x1867d84a0 _dispatch_workloop_worker_thread$VARIANT$mp + 644
19 libsystem_pthread.dylib        0x186a6afd0 _pthread_wqthread + 932
20 libsystem_pthread.dylib        0x186a6ac20 start_wqthread + 4

Any idea why this is happening?

0

There are 0 answers