magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.8k forks source link

Assertion failure in +[NSManagedObjectContext MR_defaultContext] #1253

Closed kjmaior closed 5 years ago

kjmaior commented 7 years ago

Ever since I applied OS X El Capitan Update (Version 10.11.6 - https://support.apple.com/en-us/HT206770) my app is crashing when attempting to build to simulator, phone, etc. I attempted same build on another machine, without update, and it is working fine.

Any ideas?

2016-08-15 07:05:10.937 OBTIM-Debug[226:6403] * Assertion failure in +[NSManagedObjectContext MR_defaultContext], /Users/kjm/Development/obtim/OBTIM/Libraries/MagicalRecord-2.3.0/MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalRecord.m:47 2016-08-15 07:05:10.938 OBTIM-Debug[226:6403] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Default context is nil! Did you forget to initialize the Core Data Stack?' *\ First throw call stack: (0x180deadb0 0x18044ff80 0x180deac80 0x181770154 0x10039e1a0 0x1003a23b0 0x10039741c 0x10028f7a0 0x100293c08 0x10006021c 0x10005e33c 0x1864206b0 0x186544438 0x186544180 0x186420354 0x186544438 0x1865445b0 0x186544180 0x18641f688 0x18668cb84 0x18668cce4 0x1861f36d8 0x185fbe638 0x1861f249c 0x1861ef764 0x18278b7ac 0x18278b618 0x18278b9c8 0x180da109c 0x180da0b30 0x180d9e830 0x180cc8c50 0x185fb794c 0x185fb2088 0x100028728 0x1808668b8) libc++abi.dylib: terminating with uncaught exception of type NSException

chriswunsch00 commented 7 years ago

I also have this issue, however only when I test my app...

alexszilagyi commented 6 years ago

@kjmaior : I see that you're facing this issue on version 2.3.0. I'm having the same issue with the latest version (v2.3.3)

Have you managed to solve it?

Coeur commented 5 years ago

On master branch (MagicalRecord 2.4.0), all the tests are passing from macOS 10.11 (El Capitan) to 10.14 (Mojave): https://travis-ci.org/magicalpanda/MagicalRecord/builds/546834652

If anything fails for you, we need a Minimal, Reproducible Example.