Since upgrading to Xcode11/Catalina Macos Beta 7, programs that use ObservableObject and @ObservedObject crash with memory access error. The programs worked with previous betas and compile on beta 7. I created a simple macos test program to isolate the problem and only modified the Xcode generated ContentView.swift to be:import SwiftUIpublic class TestClass: ObservableObject { @Published public var str: String = "Goodbye"}struct ContentView: View { @ObservedObject public var testObject: TestClass var body: some View { Text(testObject.str) .frame(maxWidth: .infinity, maxHeight: .infinity) }}This also crashes with the same error. Anyone else seeing this problem? It seems a well used construct that would be creating problems for others.
Post
Replies
Boosts
Views
Activity
I have a SwiftUI based program that has compiled and run consistently on previous macos versions. After upgrading to 15.2 beta 4 to address a known issue with TabView in 15.1.1, my app is now entering a severe hang and crashing with:
"The window has been marked as needing another Update Contraints in Window pass, but it has already had more Update Constraints in Window passes than there are views in the window. .<SwiftUI.AppKitWindow: 0x11d82a800> 0x87 (2071) {{44,0},{1468,883}} en"
Is there a known bug that could be causing this crash or known change in the underlying layout model?