I have had this same issue, after hearing you say about cpu maxing I checked my own program and saw that was the same case for me.
After some playing around here's what I noticed:
Clicking the NavigationLink caused my app to stop responding
Clicking the NavigationLink caused my CPU to constantly be at 99-100%
Clicking the NavigationLink caused my App Memory to steadily increase in about the same increment it took to load the page in another view
Calling the destination view that was causing an error in a different parent view no longer causes an error and the destination view loads
The NavigationLink doesn't work anywhere within the view, I tested in multiple places in the ViewBuilder
The destination view was tested with a newly generated object, JobFile(), to rule out it being unable to locate the custom object job from the list it originally comes from
Some notes about the destination view:
The body of the destination view was a simple body of Hello, World!, so the error is probably happening upon initialization or in the NavigationLink itself
The destination view only has 2 properties: var body: some view and @Binding var job: JobFile, where JobFile is a small, simple, and Identifiable object
The destination view is using the default initializer, there is not a custom init() implemented
Parent view notes:
The parent view originates from a NavigationStack
The parent view is consistently located at a 3rd level in its parent NavigationStack
It seems there is something that may be wrong with the parent view itself, or how it is working in tandem with the navigation stack. Any help would be appreciated.
Post
Replies
Boosts
Views
Activity
Additional Parent view notes:
The parent view contained an @Enviornment(\.presentationMode) var presentationMode