Previews crash frequently with NSInternalInconsistencyException

Originator:alain
Number:rdar://FB9569368 Date Originated:2021-08-27
Status:Open Resolved:No
Product:Xcode Product Version:Version 13.0 beta 5 (13A5212g)
Classification: Reproducible:
 
Please describe the issue:

When trying to update previews, Xcode will show the error "Cannot preview in this file – target crashed due to an uncaught exception". 

Please list the steps you took to reproduce the issue:

1. Open my project in Xcode
2. Open a view that includes SwiftUI previews
3. Reload previews by clicking "try again"

What did you expect to happen?

I expected the preview to load

What actually happened?

The preview did not load. Xcode showed an error "Cannot preview in this file – target crashed due to an uncaught exception". The exception is described as:
"Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Rect height (228) is too short to fit corners (required height: 432).'

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!