There is a crash in multi-window Catalyst Mac apps (iPad apps built for Mac). Steps to reproduce:
1, Download Apple's multi-window sample code (https://developer.apple.com/documentation/uikit/app_and_environment/scenes/supporting_multiple_windows_on_ipad)
2, Enable the Mac platform and build
3, Launch app
4, Open another window from File->New
5, Close new window
6, Open another new window from File->New
7, The app crashes.
Error Messages:
Unable to create a new scene. Error: Error Domain=BSServiceConnectionErrorDomain Code=3 "(null)" UserInfo={BSErrorCodeDescription=OperationFailed}
When I build with Address Sanitizer and Zombie objects enabled, I see the following error message:
Gallery[15640:3666137] *** -[UIWindow isProxy]: message sent to deallocated instance 0x618000072c80
I have tested other multi-window Catalyst apps including my own and see the same crash in all of the apps.
I have submitted a bug using Apple's feedback assistant(FB7571990). I am seeing this in Catalina 10.15.3.
Are there any workarounds for this problem?
I've seen problems with multiple windows in my own app. It seemed like using File->New was more likely to work than my own button to create a new scene, but that could just be a coincidence. Bizarelly, I found that if I run the app directly (not through Xcode), I could never make it crash!
Spotlight wouldn't always find the app to launch manually. I found it myself by expanding the "Products" folder in the Xcode project hierarchy, right clicked on the target and chose Show in Finder. Double-clicking on the app in the Finder window launched it outside of Xcode and I could create and destroy windows without any problems.