iPad app now crashing on Mac. layoutSubtreeIfNeeded ?

My ipAd app is now crashing when being run on a Mac (with designed for iPad emulator). It. has been working a month ago, today was first time I tried in awhile.

I get a warning "It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out. If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug. This will be logged only once. This may break in the future."

shortly after that the App Crashes. Thread 1: EXC_BAD_ACCESS (code=1, address=0x14a0839653d0)

The crash happens when my main view (in a Tab view) goes to a DetailView. I stripped out all functionality in my code and it still happens

mainView NavigationLink{ ImageDetailView2 () } label: { img }

struct ImageDetailView2: View {

var body: some View {
    Text("Hello, World!")
}

}

Any help would be appreciated

Could you file a bug report via Feedback Assistant and include the OS version, Xcode version and a sample project that reproduces the issue.

Please post the Feedback Number here for the record.

FB16023943

I'm working on a minimal standalone program to duplicate the crash, but so far I have not been able to (i.e. it works).

The crash is only on a Mac running as an emulated iPad app, and is recent to the last 30 days. The app works fine on iPhone and iPad.

I found the issues adding .alert(isPresented: $showAlert) { Alert( causes the app to crash when running on Mac Emulator for iPad everything worked fine until I copied that piece of code over from my project.

struct ContentView: View {

var body: some View {
    NavigationStack(path: $path) {
        ZStack(alignment: .bottom) {
            
            HStack {
                TabView(
                    selection: $currentTab.onUpdate {}
                ) {
                    FriendsView()
                       .tabItem { Label("Follow",  systemImage: "person.3.fill") }
                       .tag(TabPages.FriendTab)
                       .buttonStyle(.plain)
                }
            }
            VStack {
                Spacer().frame(minHeight: UIScreen.main.bounds.size.height * 0.70)
                Text("Test")
                Spacer().frame(minHeight: UIScreen.main.bounds.size.height * 0.15)
            }
        }
    }
    .toolbar(.hidden) 
    //
    // The Alert Will cause a crash on Mac emulator
    //
    .alert(isPresented: $showAlert) {
        Alert(
            title: Text("Problem"),
            message: Text(badMessage),
            dismissButton: .default(Text("Dismiss"), action: {
                fatalError("An error occurred. Exiting the app.")
            })
        )
    }
iPad app now crashing on Mac. layoutSubtreeIfNeeded ?
 
 
Q