Created attachment 304 [details]
In some test runs at ending the life of a NEWT Window (dispose) we experience:
- Assertion failure in -[NSThemeFrame lockFocus], /SourceCache/AppKit/AppKit-1138.23/AppKit.subproj/NSView.m:6053
- Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[NSThemeFrame(0x119ae50) lockFocus] failed with window=0x1185d20, windowNumber=1568, [self isHiddenOrHasHiddenAncestor]=0'
See the attached log file w/ detailed exception/assertion-failures,
as they happened multiple times in the same unit test run.
I assume this has something to do w/ NEWT's NSWindow / NSView management,
where we remove the NSView from the NSWindow and release it explicitly
before actually releasing the NSWindow destruction.
See src/newt/native/MacWindow.m - Line 654
It would be great if another person can review our 'NSObject' lifecycle usage,
This is also true for
CALayer Attachment: src/nativewindow/native/macosx/OSXmisc.m
.. since Applets seem to cause an exception after shutdown sometimes as well.
NEWT/OSX MacWindow.close(): More conservative closing approach.
- Java: Set handle to null
- Don't release the NSView explicit, but rely on NSWindow's release
- Don't use NSWindow close() but simply call release() instead.
The latter doesn't produce a crash SIGSEGV on exit in some cases.
OSX 10.7.2, NV GPU
jogl commit: 04707d3c1c628d6bf493d6916621d5e34dfefc30