I loaded your app and ran with XCode 12GM / MacOS 10.15.6.
It crashes systematically.
I once succeeded to run with XCode 11.6, and it seemed to work OK when you quit with Quit but crash after an XCode Stop.
Code Block func applicationDidFinishLaunching(_ notification: Notification) { |
print("launched") |
} |
And it worked.
I commented applicationDidFinishLaunching out, then app launched but crashed after a few seconds
I repeated several times (uncommenting applicationDidFinishLaunching, then commenting out again), always the same.
I changed the value from 5 to 3 in:
Code Block func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int { |
return item == nil ? 5 : 0 |
} |
And it crashed.
But after disabling IBAction, does not crash anymore.
So I disabled IBAction and removed didFinishLaunching:
No crash effectively.
So, there may be some memory management issue, like zombie. Requires more investigation.
Note I once got the following error log (but not causing crash):
2020-09-25 19:24:19.778052+0200 problem[53542:4126339] [Layout] Unable to simultaneously satisfy constraints:
(
"<NSLayoutConstraint:0x60000212c0a0 V:|-(5)-[NSTextField:0x101817f30] (active, names: filename:0x101818270, '|':filename:0x101818270 )>",
"<NSLayoutConstraint:0x60000212c0f0 V:[NSTextField:0x101817f30]-(57)-| (active, names: filename:0x101818270, '|':filename:0x101818270 )>",
"<NSLayoutConstraint:0x60000212c550 'NSView-Encapsulated-Layout-Height' filename.height == 17 (active, names: filename:0x101818270 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000212c0f0 V:[NSTextField:0x101817f30]-(57)-| (active, names: filename:0x101818270, '|':filename:0x101818270 )>
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, set a symbolic breakpoint on LAYOUT
CONSTRAINTSNOT
SATISFIABLE to catch this in the debugger.
2020-09-25 19:24:19.779542+0200 problem[53542:4126339] [Layout] Unable to simultaneously satisfy constraints:
(
"<NSLayoutConstraint:0x60000212ca00 V:|-(5)-[NSTextField:0x10181d020] (active, names: filename:0x10181d360, '|':filename:0x10181d360 )>",
"<NSLayoutConstraint:0x60000212ca50 V:[NSTextField:0x10181d020]-(57)-| (active, names: filename:0x10181d360, '|':filename:0x10181d360 )>",
"<NSLayoutConstraint:0x60000212cd70 'NSView-Encapsulated-Layout-Height' filename.height == 17 (active, names: filename:0x10181d360 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000212ca50 V:[NSTextField:0x10181d020]-(57)-| (active, names: filename:0x10181d360, '|':filename:0x10181d360 )>
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, set a symbolic breakpoint on LAYOUTCONSTRAINTS
NOTSATISFIABLE to catch this in the debugger.
2020-09-25 19:24:19.780800+0200 problem[53542:4126339] [Layout] Unable to simultaneously satisfy constraints:
(
"<NSLayoutConstraint:0x60000212d1d0 V:|-(5)-[NSTextField:0x101821040] (active, names: filename:0x101821380, '|':filename:0x101821380 )>",
"<NSLayoutConstraint:0x60000212d220 V:[NSTextField:0x101821040]-(57)-| (active, names: filename:0x101821380, '|':filename:0x101821380 )>",
"<NSLayoutConstraint:0x60000212d540 'NSView-Encapsulated-Layout-Height' filename.height == 17 (active, names: filename:0x101821380 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000212d220 V:[NSTextField:0x101821040]-(57)-| (active, names: filename:0x101821380, '|':filename:0x101821380 )>
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, set a symbolic breakpoint on LAYOUT
CONSTRAINTSNOT
SATISFIABLE to catch this in the debugger.
2020-09-25 19:24:19.781907+0200 problem[53542:4126339] [Layout] Unable to simultaneously satisfy constraints:
(
"<NSLayoutConstraint:0x60000212d9a0 V:|-(5)-[NSTextField:0x101823c50] (active, names: filename:0x101823f90, '|':filename:0x101823f90 )>",
"<NSLayoutConstraint:0x60000212d9f0 V:[NSTextField:0x101823c50]-(57)-| (active, names: filename:0x101823f90, '|':filename:0x101823f90 )>",
"<NSLayoutConstraint:0x60000212dd10 'NSView-Encapsulated-Layout-Height' filename.height == 17 (active, names: filename:0x101823f90 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000212d9f0 V:[NSTextField:0x101823c50]-(57)-| (active, names: filename:0x101823f90, '|':filename:0x101823f90 )>
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, set a symbolic breakpoint on LAYOUTCONSTRAINTS
NOTSATISFIABLE to catch this in the debugger.