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
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…
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:
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.
It's dangerous, it's not a reliable solution, please stop using the forum to advertise this kind of "trick". The real solution consists in fixing the release of some resources that causes a crash under OS X + Java 1.9. The "trick" works around the real bug and has some nasty side effects, someone will complain about an abnormal high memory footprint... The fact that you don't see the problem in your particular case doesn't mean that it doesn't exist.
I advise you to switch back to the official build in production. Promoting a low quality workaround and encouraging people to use an unofficial self-made build not only for testing purposes don't help the community. Doug Lyon's build should be used only for test.
P.S: Doug Lyon's build doesn't contain a fix of mine affecting some GNU Linux users. You have what you deserve :)
The degree of negativity in your response seems a bit unnecessary - ‘You have what you deserve’?. I was clearly trying to be helpful and thank Java3D maintainers such as yourself.
The ‘official’ builds of Java3d 1.6.0 and JOGL 2.3.2 cause my application to crash on Mac OS X under JDK 9, while Doug’s build works. Thus, advising me switch back to the official version is not very helpful if I want to explore using JDK 9 or JDK 10 features.
Perhaps you could suggest when the official J3D / JOGL releases will incorporate a fix to the ‘real bug’?
In my humble opinion, Doug's build was useful only to confirm the root cause of the bug and should not be used in production as it may cause a memory leak in the native memory (not in the Java heap). That's why encouraging anyone to use his build is a very bad idea. If many developers use his build, discover an abnormal memory footprint and point out Java3D, it will harm our efforts and some people won't be smart enough to make the distinction between his unofficial build and the official build of Java3D 1.6.0-Final.
You want to use his build to work around a bug with Java 1.9 and OS X but then, you don't use another JAR not provided by Doug with a fix for a bug affecting some Linux users. When JOGL 2.3.3 is released, some developers will go on using the already obsolete JARs provided by Doug. If you really want to use Java 1.9 and 1.10 features not in production only to "explore", why not using another operating system? If it's just for development, what is wrong with that? If you don't absolutely need some Java 1.9 and 1.10 features, you can still ship your software with Java 1.8 and avoid relying on the JRE installed on the system.
It's a JOGL bug for sure. I know where the crash happens in the native code but I haven't found a fix yet and I have no Mac which doesn't help at all for a platform specific bug. What is really frustrating is that some developers who claimed to be willing to contribute content themselves with a dirty workaround with an highly probable nasty side effect and claimed to have fixed the bug whereas it's plain wrong and they could have spent a few days to investigate with me so that we fix the real bug once for all. All this only adds some confusion in the community. To make things clear, if they had provided a clean bug fix, we would have had accepted it.
We are seeing the JRE crash with java 3D 1.6.0 pre11 and Java 10. If we upgraded to 1.6.0 final or 1.7.0, might that solve the issue, or should we expect this to occur with those versions of Java3D and Java 9+.
Java3D on jre1.9 an 1.10 both work on windows, but are currently failing on OSX. Unfortunately I'm getting a server error trying to access the bugzilla entry you refer to above. I don't have a Mac to run this on and investigate.
The crash log Nick provided doesn't give me any clues about how to investigate this issue.
Do you have the original bugzilla details? Can you post them here?
I know that the Sweet Home 3D and ImageJ guys are going to be interested in getting this problem solved at some point in the near future, so if I can get a bit of a test case together I'm sure they'll run it on a Mac and give more information about what the issue is.
Nick ran the test, it seems to show that the bug doesn't come from JogAmp unlike what I thought but it's only true if he ensured to run it with Java >= 1.9. Nick, please can you post the logs of the working test?
As I said, I thought the problem came from JogAmp itself when releasing the native resources (the context and the display) with the latest version of OS X and Java >= 1.9.
I tried 'java -jar jogamp-fat-test.jar' again, I don't get a JRE crash in either case. However, if I try to close the window, it goes blank and hangs and I have to force quit. If I quit with command-Q, I get:
Exception in thread "main-AWTAnimator#00" com.jogamp.opengl.util.AnimatorBase$UncaughtAnimatorException: com.jogamp.opengl.GLException: Caught ThreadDeath: null on thread main-AWTAnimator#00
Caused by: com.jogamp.opengl.GLException: Caught ThreadDeath: null on thread main-AWTAnimator#00
... 3 more
Caused by: java.lang.ThreadDeath
at java.base/java.security.AccessController.doPrivileged(Native Method)
... 1 more
Hope this helps.
If I could get the details of the bug report, I could probably look into this further. Thanks.
Thank you. Your logs confirm that the problem comes from JOGL, when releasing the context:
Event: 7.964 Thread 0x00007fb1dab0b800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000011c2197e8 method=jogamp.opengl.GLContextImpl.release(Z)V @ 161 c2