On OSX 10.14.3 Mojave, we get the following warning: +++ 2019-04-04 17:01:23.778 java[4098:282573] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from ( 0 AppKit 0x00007fff4139cccc -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386 1 AppKit 0x00007fff4139a07c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488 2 AppKit 0x00007fff41399aa6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45 3 libnativewindow_macosx.dylib 0x0000000119da7509 Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 377 4 ??? 0x000000011aff1667 0x0 + 4747892327 ) +++ Investigate and resolve this issue.
We may consider this tool here https://developer.apple.com/documentation/code_diagnostics/main_thread_checker as found in a comment on this SDL thread: https://discourse.libsdl.org/t/crash-on-macos-10-14-mojave-with-sdl-showmessagebox/25100 +++ The Jaamsim group has also encountered this issues, which I found by duck duck go'ing the warning ;-) https://groups.google.com/d/topic/jaamsim-users/JGqmj9CRXcU/discussion
Call from Main-Thread: NW's OSXUtil.CreateNSWindow0(..) and NEWT's WindowDriver.createWindow0(..) OSX 10.14.3 Mojave issues a WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. The complaint about NativeWindow (NW)'s OSXUtil.CreateNSWindow0(..) might be valid, which does create a NS Window instance w/ NSView and framebuffer initialized. However, the complaint about NEWT's WindowDriver.createWindow0(..) is not, since the initialization incl framebuffer happened later on the main thread. Regardless, encapsulated both construction fully to run on the Main-Thread. +++ Originally the Main-Thread design spec was like: Must run on Main-Thread when or after making visible. +++ Locally run all test on OSX 10.14.4 (another Mojave update) with jdk1.8.0_192.jdk: all tests passed.