macOS 26: NSTokenField crashes due to NSGenericException caused by too many Update Constraints

This example application crashes when entering any text to the token field with

FAULT: NSGenericException: The window has been marked as needing another Update Constraints in Window pass, but it has already had more Update Constraints in Window passes than there are views in the window.

The app uses controlTextDidChange to update a live preview where it accesses the objectValue of the token field.

If one character is entered, it also looks like the NSTokenFieldDelegate methods

tokenField(_:styleForRepresentedObject:) tokenField(_:editingStringForRepresentedObject:) tokenField(_:representedObjectForEditing:)

are called more than 10000 times until the example app crashes on macOS Tahoe 26 beta 6.

I've reported this issue with beta 1 as FB18088608, but haven't heard back so far.

I have multiple occurrences of this issue in my app, which is working fine on previous versions of macOS. I haven't found a workaround yet, and I’m getting anxious of this issue persisting into the official release.

macOS 26: NSTokenField crashes due to NSGenericException caused by too many Update Constraints
 
 
Q