NSManagedObjectContext save doesn't crash but breaks on objc_exception_throw

后端 未结 5 863
一向
一向 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 10:55

    Recently I ran into the same issue: app crashing without any log, when trying to save managedObjectContext.

    In my case there was a completely different cause from mentioned above:
    Make sure you do not have DB Manager open on your mac, that could be locking the persistent data store.

    This will (apparently) also kill the Core Date stack, without throwing any visible errors in code or in log.

    Turned out I had some unsaved changes, which made the DB Manager lock the store. Closing the DB Manager fixed the issue. Simple and stupid error, but took me hours to figure out.

提交回复
热议问题