Re: Jogl/Jogamp on Java 8 building from source
Posted by Predrag Bokšić on Dec 27, 2017; 5:12pm
URL: https://forum.jogamp.org/Jogl-Jogamp-on-Java-9-tp4038012p4038447.html
People! Listen to me very carefully.
I know the exact spot where the JVM 9 crashes.
In the file j3d/j3d-core/src/javax/media/j3d/GraphicsConfigTemplate3D.java, in the method...
@Override
public GraphicsConfiguration getBestConfiguration(GraphicsConfiguration[] gc) {
if ((gc == null) || (gc.length == 0) || (gc[0] == null)) {
return null;
}
synchronized (globalLock) {
testCfg = gc;
// It is possible that the followign postRequest will
// cause request renderer run immediately before
// runMonitor(WAIT). So we need to set
// threadWaiting to true.
threadWaiting = true;
// Prevent deadlock if invoke from Behavior callback since
// this thread has to wait Renderer thread to finish but
// MC can only handle postRequest and put it in Renderer
// queue when free.
if (Thread.currentThread() instanceof BehaviorScheduler) {
VirtualUniverse.mc.sendRenderMessage(gc[0], this,
// this is not executed
MasterControl.GETBESTCONFIG);
} else {
// this is executed
VirtualUniverse.mc.postRequest(MasterControl.GETBESTCONFIG, this);
}
// this is okay
runMonitor(J3dThread.WAIT);
// !!! this crashes the JVM 9 !!!
GraphicsConfiguration graphicsConfiguration = (GraphicsConfiguration) testCfg;
// this is okay
return graphicsConfiguration;
}
}