Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First, what is the crash?</p> <p>Second, Core Data generally is a single threaded API. There are things you can do in multiple threads but creating a <code>NSMappingModel</code> is most likely not one of them. Why <em>must</em> you create the mapping model dynamically? If the MOMs are a known quantity then the mapping can be a known quantity as well.</p> <h2>update</h2> <p>First, the threading issue. Core Data is meant to be single threaded. However, the <code>NSManagedObjectContext</code> knows how to lock the <code>NSPersistentStoreCoordinator</code> correctly therefore you can have one <code>NSManagedObjectContext</code> per thread because they know how to lock correctly. However this is not the case when you are working with and creating a mapping model. </p> <p>However, the error you provided is not a Core Data error <em>per se</em>. That error indicates that somewhere in your code you are trying to stick a nil into a set. Without seeing the code that is generating the mapping model though it is difficult to guess as to exactly where.</p> <p>Have you put a breakpoint at objc_throw_exception and see what line in your code is causing this crash? If it is in something non-obvious then I would suggest there is some point in your building of the mapping model that is giving Core Data an unexpected nil.</p> <p>One thing you can try is locking the <code>NSPersistentStore</code> and/or the <code>NSManagedObjectContext</code> yourself to see if that resolves the crash. However I suspect when you do that you are going to again deal with performance issues.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload