I think I found what causes the problem. I manually manage the context state, I use save and transaction methods on mainContext. I can't remember why I started doing so in the first place, but I had some strange problem when I was accessing newly created object and manual save helped in that case. Now I removed all manual operations and all crashes, warnings and errors disappeared. I still however don't understand why manual saves cause such strange behaviors.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: