NSManagedObjectContext save doesn't crash but breaks on objc_exception_throw

后端 未结 5 818
一向
一向 2021-01-05 10:23

I am having the same issue described at this address http://www.cocoabuilder.com/archive/cocoa/288659-iphone-nsmanagedobjectcontext-save-doesn-crash-but-breaks-on-objc-excep

5条回答
  •  时光说笑
    2021-01-05 11:19

    • First, when using multithread with CoreData I had few problems when passing NSManagedObject around the app. Instead, as documented by Apple, I end up passing NSManagedObjectID and reconstruct the full object.
    • Second, when you don't have anything logged, it is likely related to memory issues, try to run the profiler especially, but not only, looking for 'Zombie', it should tell you more.
    • Finally, make sure you have initialized the context correctly, I had similiar problem because the model from momd file was not found and not loaded.

提交回复
热议问题