JOGL on Mojave, Mac OS 10.14

classic Classic list List threaded Threaded
14 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
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

MJ Schnieders
Any news on this issue? I'm seeing the same thing with our program Force Field X.

Thanks,
- Mike

Details:
MacOS 10.14 Mojava
JDK 8 through JDK 10
Java3D 1.6.0
JOGL 2.3.2

2018-10-07 09:57:17.840 java[41660:2571505] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
        0   AppKit                              0x00007fff444cd2e3 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
        1   AppKit                              0x00007fff444ca68c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
        2   AppKit                              0x00007fff444ca0b6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
        3   libnativewindow_macosx.jnilib       0x00000001787c53fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
        4   ???                                 0x0000000111aecb50 0x0 + 4591635280
)
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

gouessej
Administrator
Hello

By the way, you use an obsolete version of Java3D. Please switch to Java3D 1.6.1 or Java3D 1.7.0 (note that the package names are different but it works a lot better under OS X).

The bug is in this method:
https://github.com/sgothel/jogl/blob/347271ffdd09153a2334fda593774d49050f84e0/src/nativewindow/native/macosx/OSXmisc.m#L335

Actually, OSXUtil.CreateNSWindow should always be called in a Runnable by OSXUtil.RunOnMainThread(true, false, Runnable) to solve this bug.

P.S: I really have to make a manually aggregated build with tons of fixes.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

MJ Schnieders
Hi Julien,

It would be wonderful if you could "make a manually aggregated build with tons of fixes." I know you're busy, but this would be super helpful.

Thanks,
- Mike

btw, with Java3D 1.6.1 (rather than 1.6.0), our application crashes in addition to the WARNING message.

2018-10-08 08:30:38.565 java[45910:3106469] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
        0   AppKit                              0x00007fff444cd2e3 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
        1   AppKit                              0x00007fff444ca68c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
        2   AppKit                              0x00007fff444ca0b6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
        3   libnativewindow_macosx.jnilib       0x000000012c4733fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
        4   ???                                 0x0000000117266b50 0x0 + 4683361104
)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000012baccf4e, pid=45910, tid=775
#
# JRE version: Java(TM) SE Runtime Environment (10.0.2+13) (build 10.0.2+13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0.2+13, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C  [libosxapp.dylib+0x2f4e]  -[NSApplicationAWT sendEvent:]+0x179
 
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

gouessej
Administrator
I have to get back the Mac Mini Sven gave me and I have no computer under Microsoft Windows at home, it will be a bit cumbersome :s

Please report this bug to Harvey and I advise you to give a try to Java3D 1.7.0. Could you post the full crash log?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

hharrison
As an aside, have you got a git repo anywhere that you've been collecting bugfix patches for jogl/gluegen?

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

gouessej
Administrator
Not yet but I'm going to make one probably on Sourceforge as my own server is still in use for something that drives it insecure. I'll start from Sven's repo and then I'll commit the numerous fixes planned for JOGL 2.3.3 (and some others like the one above). The problem is that some fixes are stored into bug reports whereas our bug tracker hasn't been working for months :(
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on Mojave, Mac OS 10.14

gouessej
Administrator
This post was updated on .
In reply to this post by hharrison
https://sourceforge.net/p/jogl/code/ci/890efa2cbabaf2b99ecb37fb8c066d8fef172fdc/

Be patient. I'll take care of the other bugs.

P.S: Please note that you have to name the directory of JogAmp's JCPP fork "jcpp" even though the project is named "jogampjcpp" so that GlueGen finds the sub-module.

P.S 2: The sequel: http://forum.jogamp.org/JOGL-2-3-3-state-of-progress-tp4039264.html
Julien Gouesse | Personal blog | Website