SwiftUI intermittent Background and Launch crashes on iOS 15 TabView

Hi I'm hoping that somebody here can help me.

We recently released an update to one of our apps in which added a TabView. The app is using SwiftUI with no launch view.

Since this version was released there are a lot of crashes being reported through the app store and organiser. These seem to all be on iOS 15.x. We have users on both 14 and 15. When we have seen this ourselves it is crashing in the background(TestFlight dialog pops up on home screen saying app has crashed, send feedback) or immediately on launch. Opening it again after a crash everything seems fine and it behaves as normal.

Looking through the Apple crash logs I can see that it's a SIGSEGV error trying to access an invalid address, so something is uninitialised. My suspicion is that there are some .environmentObject objects that are being injected from the App class which are somehow uninitialised in these crashes, but I can't see how to remedy this as they are all marked as @StateObject in the root App class and injected as environmentObjects. So to my understanding this is correct and the subviews should never exist without these having first been initialised.

I also noticed that the Launch time is often long before the DateTime of the crash. Which is surprising since I know when its happened to me that I had not opened the app at all in that time, it does go some way to explaining the background crashes.

I've included a crash log below if it helps in diagnosing.

Thanks in advance

SwiftUI intermittent Background and Launch crashes on iOS 15 TabView
 
 
Q