Crash when using print in SwiftUI with Binding

I am looking for confirmation of a problem before I file a bug report with Apple.

I am on XCode Version 12.3 (12C33), on Big Sur (beta). It appears this update of XCode has a bug when using dianostic print statements that contain Bindings of NSAttributedStrings.

I am totally new to NSAttributedString and I am incorporating that into an NSRepresentable NSTextView for formatted text editing. So, being able to print is crucial to understanding what I am doing.

Could someone at the same level of release verify they can (or can't) print a @Binding<NSAttrributedString>, I would appreciate it.

Simple test:

Code Block
struct ARepresentableView: NSViewRepresentable {
@Binding var aString: NSAttributedString?
func updateNSView(_ view: AnNSView, context: Context) {
print("updateNSView: [\(aString)]")
view.aString = aString
}

This works with the passed in value of aString. When the value of aString is changed within ARepresentableView, and the udpateNSView is called to refresh it the print state crashes with this:

Code Block
2020-12-15 09:32:52.030427-0500 Hermes[77309:1627758] [General] *** -[NSBigMutableString substringWithRange:]: Range {27, 49} out of bounds; string length 60

Crash when using print in SwiftUI with Binding
 
 
Q