Seam3
Seam3 copied to clipboard
Crash in 2nd app launch
First launch everything looks good, always crash in 2nd launch.

Can you provide more information on how I can reproduce the issue? A minimum example project would help.
I try and avoid force unwraps; those are there from a PR that I accepted. If I remove the force unwraps then it isn't clear how the situation can be handled anyway; If a managed object result type has been requested and managed object ids can't be found, what can be done?
I just ran into this issue. I created a reproduction project here
For me, the issue seems to come up when you create a child context of the container that seam is a part of, and then save both the child and the seam container.
Here is the relevant code:
let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext
let newContext = NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType)
newContext.parent = context
let newItem = Item(context: newContext)
newItem.name = "something"
newItem.status = 0
try? newContext.save()
try? newContext.parent?.save()