Login  Register

Re: Dealing with 3D crash in RHEL 8.4 with mesa driver

Posted by goodwilling on Aug 31, 2023; 2:12am
URL: https://forum.jogamp.org/Dealing-with-3D-crash-in-RHEL-8-4-with-mesa-driver-tp4042917p4042922.html

Thanks for the comments. The crash problem occurs for various software in various systems, either on a Virtual machine inside Windows or a real Linux server running RHEL 8.4. This problem is definitely regarded as the graphics driver issue, which can be solved by upgrading the RHEL system (and the driver) or downgrading of the driver only. For RHEL 8.4 inside VirtualBox, the problem can also be solved by enabling the 3D acceleration in the VirtualBox.

For users without available solutions as above, there seems to be a way of switching to Java 3D 1.5.2 as reported in the forum of Sweethome 3D:

Linux java3d not working with mesa 20.0.2
https://sourceforge.net/p/sweethome3d/bugs/945/

As a matter of fact, the old version of our software using Java3D 1.5 (with Java 8) can also run normally on RHEL 8.4 with mesa driver. However, presently it switches to Java3D 1.7 (JOGL 2.3.2) with Java 17, which is necessary for many systems such as Windows 11 and RHEL 9, and thus it cannot easily switch to Java3D 1.5.

For a test, we tried the following change in the initialization of 3D (with the inclusion of j3dcore-1.5.jar, j3dutils-1.5.jar, vecmath-1.5.jar, libj3dcore-ogl.so, together with Java3D 1.7):

if(useJava3D_15){
     GraphicsConfiguration gc = com.sun.j3d.utils.universe.SimpleUniverse.getPreferredConfiguration();
     canvas3d = new Canvas3D(gc);
}else{
     GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
     GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getBestConfiguration(template);
     canvas3d = new Canvas3D(gc);
}

then there comes out the following error if useJava3D_15 is true:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: 'void javax.media.j3d.NativeScreenInfo.createNativeScreenInfo()'
        at javax.media.j3d.NativePipeline.initialize(NativePipeline.java:108)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:151)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:926)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:280)

By the way, Java3D-1.7 in the deployment of Java3D (https://jogamp.org/deployment/java3d/) seems to give error if used with JOGL 2.5. I wonder what is the correct procedure to make Java3D work with JOGL 2.5.