Re: getAWTgraphicsconfiguration() causes NPE error
Posted by
philjord on
Nov 03, 2021; 9:46pm
URL: https://forum.jogamp.org/getAWTgraphicsconfiguration-causes-NPE-error-tp4041439p4041440.html
Hi,
Thanks for posting the question.
This is a config issue, which I'll see if I can give you some debug code for to find out what's happening.
In the mean time your code works fine, I've cut and paste and it runs "out of the box" for me.
You can do it in a single java file just put the main method at the bottom of tuval7 class.
Also you'll want to add the noerasebackground property to stop awt from blocking the 3d view like so:
public static void main(String[] args) {
System.setProperty("sun.awt.noerasebackground", "true");
new tuval7();
}

Your bug is happening here (as you've provided)
https://github.com/hharrison/java3d-core/blob/master/src/javax/media/j3d/JoglPipeline.java#L8291so the cause is a null coming from the config table above, either
GraphicsConfiguration gconfig is no good,
or
Canvas3D.graphicsConfigTable has nothing compatible in it
Given that you have the jogamp-fat.jar file, can you run it with java and paste the output in a reply below
So just run a command like this in the folder that jogamp-fat is in
java -jar jogamp-fat2.4.0.jar 2> output.txtIt should spew out a bunch of config settings available on your machine (or perhaps an error)
Thanks