NSViewController, awakeFromNib, Tahoe and hangs

Mostly a heads up, maybe this will help other people. I had a very simple test app for MacOS, just a ViewController with an OutlineView that had two columns, and the column data was initialized in awakeFromNib of the NSViewController like this:

override func awakeFromNib() {
    if dataArray.count == 0 {
        dataArray.append( Node( firstname: "John", lastname: "Doe" ) )
        dataArray.append( Node( firstname: "Mary", lastname: "Smith" ) )
    }
    self.content = dataArray
}

There's also a toolbar with a button and a search field.

This worked perfectly fine on Sequoia and Xcode 16, but since I updated to Tahoe and Xcode 26, if I try to run/debug the app from Xcode it hangs and eventually crashes. If Debug Executable is enabled in the scheme the crash is in libMainThreadChecker with EXC_BAD_ACCESS, and without debug it's a crash report with "Thread stack size exceeded due to excessive recursion".

I found that if I moved the self.content assignment inside the if block the problems went away:

override func awakeFromNib() {
    if dataArray.count == 0 {
        dataArray.append( Node( firstname: "John", lastname: "Doe" ) )
        dataArray.append( Node( firstname: "Mary", lastname: "Smith" ) )
        self.content = dataArray
    }
}

There's a good chance I was abusing awakeFromNib() and shouldn't have been doing the assignment in there, etc. It was just a local test app, no big deal for me. But maybe something changed between Sequoia and Tahoe with respect to that function and how/when it's triggered?

NSViewController, awakeFromNib, Tahoe and hangs
 
 
Q