0xdead10cc & NSPersistentCloudKitContainer

We're receiving crash reports where our app is killed by the system because of 0xdead10cc.

If I understand correctly this is happening because our app has a file lock or SQLite database lock.

Our app is using NSPersistentCloudKitContainer and is indexing the data to Core Spotlight. In my naiveté I assumed that NSPersistentCloudKitContainer and Core Spotlight would release any locks when app is suspended.

What is the best way to solve this? Asking for more background time doesn't feel like a solution, that will just postpone the crash.

HI,

Asking for more background time doesn't feel like a solution, that will just postpone the crash.

Actually, that is the answer, at least partly. The reason this can't really happen:

In my naiveté I assumed that NSPersistentCloudKitContainer and Core Spotlight would release any locks when app is suspended.

...is that the system can't really "know" in advance what you're going to ask it to do. They actually take out some of their own tasks, but that doesn't really help if the suspension process is starting at roughly the same time you're asking them to do work.

That solution here is to create your own background task for the larger "job" that you're trying to finish ("Add some stuff to my CoreSpotlight index") and end it once the work is done.

-Kevin Elliott

DTS Engineer, CoreOS/Hardware

0xdead10cc & NSPersistentCloudKitContainer
 
 
Q