JOGL on Mojave, Mac OS 10.14

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

JOGL on Mojave, Mac OS 10.14

Andy Skinner
When we run on Mac OS 10.14, we get the following error:
2018-07-16 15:35:15.551 java[13184:1406845] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
0   AppKit                              0x00007fff3b8ae743 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 253
1   AppKit                              0x00007fff3b8a5d30 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
2   AppKit                              0x00007fff3b8a575a -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
3   libnativewindow_macosx.jnilib       0x0000000119bb0485 Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 421
4   ???                                 0x0000000105671758 0x0 + 4385609560
)

I'd report it in bugzilla if I could.  I think any JOGL app on this version of Mac OS would do it.

thanks
andy
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

Andy Skinner
A suggestion I was given:
 Maybe the window initialization needs to go on the main event thread, via libdispatch, like this:

#include <dispatch/dispatch.h>

/* ... later on... */

dispatch_sync(dispatch_get_main_queue(), ^{ /* ...[[NSWindow alloc] init...] */ });

If the caller doesn't need to wait for the block to execute, dispatch_async could be used instead.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

gouessej
Administrator
Thank you for the feedback and the suggestion.

By the way, we have some problems under OS X and it's difficult to know whether it comes from JOGL or from another engine. Do you succeed in running this simple example under Mac OS 10.14 with Java >= 1.9?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

Andy Skinner
On 10.12, with Java 10, it runs, gives expected warnings, and throws some kind of exception when I close the window.

I will try 10.14 next.

Is there anyone who can look into the problem I reported?

thanks

andy
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

Andy Skinner
Output with Java 10 on OS 10.14 is below.  It did open the window and spin the quad around.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/mathworks/devel/sandbox/askinner/JOGL/JOGLQuad/gluegen-rt.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018-07-17 11:37:28.081 java[40647:1786978] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
0   AppKit                              0x00007fff3b8ae743 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 253
1   AppKit                              0x00007fff3b8a5d30 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
2   AppKit                              0x00007fff3b8a575a -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
3   libnativewindow_macosx.jnilib       0x000000013a427485 Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 421
4   ???                                 0x000000011c96fad0 0x0 + 4774623952
)
2018-07-17 11:37:44.237 java[40647:1787091] -[NSPersistentUIWindowSnapshotter writeWindowSnapshot:length:width:height:bytesPerRow:toFile:inDirectory:encryptingWithKey:uuid:checksum:fd:]: 0 == fsetxattr(fd, kNSPersistentUIWindowImageMetadata, &fileMetadata, sizeof fileMetadata, 0, 0) failed on line 895: Operation not permitted

Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

Andy Skinner
Looking at code, I don't know if we'd use the dispatch call that was suggested to me (in the .m file) or if we'd instead use RunOnMainThread in Java.

I believe this is called once in MacOSXJAWTWindow.java and once in OSXDummyUpstreamSurfaceHook.java.  I will have to debug to find out which is called in my case.

andy
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

gouessej
Administrator
In reply to this post by Andy Skinner
Andy Skinner wrote
Is there anyone who can look into the problem I reported?
Sven?
Julien Gouesse | Personal blog | Website