Created attachment 304 [details] OSX-Crash-DisposeNEWTWindow 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 http://jogamp.org/git/?p=jogl.git;a=blob;f=src/newt/native/MacWindow.m;hb=HEAD#l654 It would be great if another person can review our 'NSObject' lifecycle usage, ie. retain/release/dealloc/.. This is also true for CALayer Attachment: src/nativewindow/native/macosx/OSXmisc.m NSOpenGLLayer: src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m .. since Applets seem to cause an exception after shutdown sometimes as well.
NEWT/OSX MacWindow.close(): More conservative closing approach. Closing: - Java: Set handle to null - Native: - 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 http://jogamp.org/git/?p=jogl.git;a=commit;h=04707d3c1c628d6bf493d6916621d5e34dfefc30