Crash on Macos using Java 9

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

Crash on Macos using Java 9

rchimiak

Dear Sir,

 

When running the following code:

 

    public Canvas3D createCanvas3D(boolean offscreen) {

 

        GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();

        GraphicsDevice d = e.getDefaultScreenDevice();

        GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();

        GraphicsConfiguration c = d.getBestConfiguration(template);

        template.setSceneAntialiasing(GraphicsConfigTemplate.PREFERRED);

 

        Canvas3D c3d = new Canvas3D(c, offscreen);

        return c3d;

    }

 

Using jdk-9.0.1 (latest) , jogl v2.3.2, and java3d 1,6,0-final

Works well on Windows and Linux, but crashes on Mac  OS X at GraphicsConfiguration c = d.getBestConfiguration(template);

Debugging with latest Netbeans, it seems that the Override of   

GraphicsConfiguration

getBestConfiguration(GraphicsConfiguration[] gc) in GraphicsConfigTemplate3D returns null.

 

Added information: it works on all platforms using latest and earlier versions of java 8 and java 7. 

Thank you for your consideration,  please let me know if there is something else  I should be sending you or trying on my side.  I was trying to avoid going to java 3d 1.7 due to the package name change, but if needs be…

 

Cheers,

Reine Chimiak

 

Reply | Threaded
Open this post in threaded view
|

Re: Crash on Macos using Java 9

gouessej
Administrator
Hi

Java3D 1.6.0 relies on JOGL 2.3.2, the latter needs some complementary settings to work correctly with Java 1.9:
https://jogamp.org/bugzilla/show_bug.cgi?id=1317#c9
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Crash on Macos using Java 9

rchimiak
 I added --add-exports=java.desktop/sun.java2d=ALL-UNNAMED which I did not have originally, but unfortunately it did not help and the application still crashes under the same conditions (mac OS, java 9...).
This is a link to the application that I am working on which relies extensively on java3d:
https://sscweb.gsfc.nasa.gov/tipsod/

Your help is greatly appreciated
Reply | Threaded
Open this post in threaded view
|

Re: Crash on Macos using Java 9

gouessej
Administrator
Please be more accurate and post the full stack trace. Which version of OS X do you use?

Keep in mind that this problem might be caused by a bug in AWT under OS X with a specific version.

P.S: Please try with Java 1.8.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Crash on Macos using Java 9

rchimiak
(1) The  mac Version is : macOS Sierra (Version 10.12.6)

(2) The stack trace is  at (for the next 10 days) :
https://opendrive.gsfc.nasa.gov/shortauth/r/NQei9Oyb

(3) The application works with java 8 on all platforms including this mac
Reply | Threaded
Open this post in threaded view
|

Re: Crash on Macos using Java 9

gouessej
Administrator
Thanks. I know that it's unpleasant but since Oracle bought Java, we usually have to wait for some months to get a really "stable" major version. I still use Java 1.8 in production and I won't switch before 2019. We'll have to revisit this problem later.
Julien Gouesse | Personal blog | Website