Java3D+Javafx doesn't work on Java 14

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

Java3D+Javafx doesn't work on Java 14

runiter
Hi,
I built a UI in Javafx and embedded a swing panel that contains Java3D JCanvas.
This configuration works great in Java 8 but in Java 14 I get these exceptions:

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 1
        at jogl.all/jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:171)
        at jogl.all/com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
        at j3dcore/org.jogamp.java3d.JoglPipeline.createAwtGraphicsConfiguration(JoglPipeline.java:8704)
        at j3dcore/org.jogamp.java3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8435)
        at j3dcore/org.jogamp.java3d.Renderer.doWork(Renderer.java:497)
        at j3dcore/org.jogamp.java3d.J3dThread.run(J3dThread.java:271)

DefaultRenderingErrorListener.errorOccurred:
GRAPHICS_CONFIG_ERROR: Renderer: Error in GraphicsConfigTemplate3D.getBestConfiguration()
graphicsDevice = D3DGraphicsDevice[screen=0]
Exception in thread "Thread-9" java.lang.NullPointerException: Canvas3D: null GraphicsConfiguration
        at j3dcore/org.jogamp.java3d.Canvas3D.checkForValidGraphicsConfig(Canvas3D.java:946)
        at j3dcore/org.jogamp.java3d.Canvas3D.<init>(Canvas3D.java:1015)
        at j3dutils/org.jogamp.java3d.exp.swing.JCanvas3D$InternalCanvas3D.<init>(JCanvas3D.java:672)
        at j3dutils/org.jogamp.java3d.exp.swing.JCanvas3D.createCanvas(JCanvas3D.java:323)
        at j3dutils/org.jogamp.java3d.exp.swing.JCanvas3D.ancestorAdded(JCanvas3D.java:254)
        at java.desktop/javax.swing.AncestorNotifier.fireAncestorAdded(AncestorNotifier.java:86)
        at java.desktop/javax.swing.AncestorNotifier.propertyChange(AncestorNotifier.java:223)
        at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
        at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
        at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266)
        at java.desktop/java.awt.Component.firePropertyChange(Component.java:8732)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4784)
        at java.desktop/java.awt.Container.addImpl(Container.java:1146)
        at java.desktop/java.awt.Container.add(Container.java:436)
        at GraphingCalculator3D/runiter.grapher.MainApplication.lambda$start$3(MainApplication.java:124)
        at java.base/java.lang.Thread.run(Thread.java:832)

Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
I tracked the first exception to this line of code:

https://github.com/sgothel/jogl/blob/347271ffdd09153a2334fda593774d49050f84e0/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java#L171

Looks like this code always tries to access negative index of an array.
Or am I missing something?
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

gouessej
Administrator
Hello

I can fix it and give you a fat JAR for testing purposes, is it ok for you?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

gouessej
Administrator
In reply to this post by runiter
This fat JAR contains the fix of the bug 1426 and your fix:
https://svn.code.sf.net/p/tuer/code/pre_beta/lib/jogamp/jogamp-fat.jar

Enjoy ;)
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
Thank you.
Now I get a different exception:

Exception in thread "Thread-9" java.lang.NullPointerException
        at j3dcore/org.jogamp.java3d.JoglPipeline.getGraphicsConfig(JoglPipeline.java:8346)
        at j3dcore/org.jogamp.java3d.Canvas3D.getGraphicsConfig(Canvas3D.java:957)
        at j3dcore/org.jogamp.java3d.Canvas3D.<init>(Canvas3D.java:1027)
        at j3dcore/org.jogamp.java3d.Canvas3D.<init>(Canvas3D.java:1015)
        at j3dutils/org.jogamp.java3d.exp.swing.JCanvas3D$InternalCanvas3D.<init>(JCanvas3D.java:672)
        at j3dutils/org.jogamp.java3d.exp.swing.JCanvas3D.createCanvas(JCanvas3D.java:323)
        at j3dutils/org.jogamp.java3d.exp.swing.JCanvas3D.ancestorAdded(JCanvas3D.java:254)
        at java.desktop/javax.swing.AncestorNotifier.fireAncestorAdded(AncestorNotifier.java:86)
        at java.desktop/javax.swing.AncestorNotifier.propertyChange(AncestorNotifier.java:223)
        at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
        at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
        at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266)
        at java.desktop/java.awt.Component.firePropertyChange(Component.java:8732)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4784)
        at java.desktop/java.awt.Container.addImpl(Container.java:1146)
        at java.desktop/java.awt.Container.add(Container.java:436)
        at GraphingCalculator3D/runiter.grapher.MainApplication.lambda$start$3(MainApplication.java:124)
        at java.base/java.lang.Thread.run(Thread.java:832)

Guess it didn't matter that the if condition was wrong. It should never get to that line anyways.
When debugging Java 13 vs Java 8, I noticed that "chosenGC" variable is null in Java 13 but not null in Java 8 at this line:

https://github.com/sgothel/jogl/blob/347271ffdd09153a2334fda593774d49050f84e0/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java#L143
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

gouessej
Administrator
If you don't get a GLException, then the configuration isn't null. I'll try to provide another fix.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
Thank you.
Not sure if this helps, but using "nativewindow.debug.GraphicsConfiguration" I got the following debug logs by JOGL in Java 14:


Thread-9 - Info: GraphicsConfigurationFactory.<init>
Thread-9 - GraphicsConfigurationFactory.initSingleton()
GraphicsConfigurationFactory.registerFactory() put DeviceCapsType[com.jogamp.nativewindow.AbstractGraphicsDevice, com.jogamp.nativewindow.CapabilitiesImmutable] -> jogamp.nativewindow.DefaultGraphicsConfigurationFactoryImpl@2568232, overridding: null
GraphicsConfigurationFactory.registerFactory() put DeviceCapsType[com.jogamp.nativewindow.windows.WindowsGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory@bd91fde, overridding: null
GraphicsConfigurationFactory.registerFactory() put DeviceCapsType[com.jogamp.nativewindow.awt.AWTGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory@621016c5, overridding: null
updateGraphicsConfiguration(using target): hdc 0xffffffff9c01131a
user chosen caps GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
updateGraphicsConfigurationARB: SharedResource is null: WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x35f22d81]]
updateGraphicsConfigurationGDI: hdc 0xffffffff9c01131a, capsChosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]], WINDOW
        extHDC false, chooser false, pformatsNum -1
Chosen PFDID 9 (idx 8) -> recommendedIndex 0, skipCapsChooser true
updateGraphicsConfigurationGDI: ChoosePixelFormat(HDC 0xffffffff9c01131a) = pfdID 9, skipCapsChooser true, idx 0 (LastError: 127)
chosen pfdID (GDI): recommendedIndex 0 -> chosenIndex 0, skipCapsChooser true, caps GLCaps[wgl vid 9 gdi: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]] (PFD[id = 9 (0x9), colorBits 32, rgba 8/8/8/0, accum-rgba 16/16/16/16, dp/st/ms: 24/0/0, flags: window, opengl, dblbuf, hw-accel)
setPixelFormat: hdc 0xffffffff9c01131a, GLCaps[wgl vid 9 gdi: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
*** setCapsPFD: GLCaps[wgl vid 9 gdi: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
    [2]: jogamp.fat/com.jogamp.nativewindow.GraphicsConfigurationFactory.getFactory(GraphicsConfigurationFactory.java:231)
    [3]: j3dcore/org.jogamp.java3d.JoglPipeline.createAwtGraphicsConfiguration(JoglPipeline.java:8703)
    [4]: j3dcore/org.jogamp.java3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8435)
    [5]: j3dcore/org.jogamp.java3d.Renderer.doWork(Renderer.java:497)
    [6]: j3dcore/org.jogamp.java3d.J3dThread.run(J3dThread.java:271)
GraphicsConfigurationFactory.getFactory: com.jogamp.nativewindow.awt.AWTGraphicsDevice, com.jogamp.opengl.GLCapabilities
Factory #0: DeviceCapsType[com.jogamp.nativewindow.awt.AWTGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory@621016c5
Factory #1: DeviceCapsType[com.jogamp.nativewindow.AbstractGraphicsDevice, com.jogamp.nativewindow.CapabilitiesImmutable] -> jogamp.nativewindow.DefaultGraphicsConfigurationFactoryImpl@2568232
Factory #2: DeviceCapsType[com.jogamp.nativewindow.windows.WindowsGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory@bd91fde
GraphicsConfigurationFactory.getFactory() deviceTypes: [class com.jogamp.nativewindow.awt.AWTGraphicsDevice, class com.jogamp.nativewindow.DefaultGraphicsDevice, interface com.jogamp.nativewindow.AbstractGraphicsDevice]
GraphicsConfigurationFactory.getFactory() capabilitiesTypes: [interface com.jogamp.opengl.GLCapabilitiesImmutable, interface com.jogamp.nativewindow.CapabilitiesImmutable]
GraphicsConfigurationFactory.getFactory() found DeviceCapsType[com.jogamp.nativewindow.awt.AWTGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory@621016c5
WindowsAWTWGLGraphicsConfigurationFactory: got AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection \Display0, unitID 0, awtDevice D3DGraphicsDevice[screen=0], handle 0x0], idx 0]
    [2]: jogamp.fat/com.jogamp.nativewindow.GraphicsConfigurationFactory.getFactory(GraphicsConfigurationFactory.java:231)
    [3]: jogamp.fat/com.jogamp.nativewindow.GraphicsConfigurationFactory.getFactory(GraphicsConfigurationFactory.java:193)
    [4]: jogamp.fat/jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:109)
    [5]: jogamp.fat/com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
    [6]: j3dcore/org.jogamp.java3d.JoglPipeline.createAwtGraphicsConfiguration(JoglPipeline.java:8704)
    [7]: j3dcore/org.jogamp.java3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8435)
    [8]: j3dcore/org.jogamp.java3d.Renderer.doWork(Renderer.java:497)
    [9]: j3dcore/org.jogamp.java3d.J3dThread.run(J3dThread.java:271)
GraphicsConfigurationFactory.getFactory: com.jogamp.nativewindow.windows.WindowsGraphicsDevice, com.jogamp.opengl.GLCapabilities
Factory #0: DeviceCapsType[com.jogamp.nativewindow.awt.AWTGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory@621016c5
Factory #1: DeviceCapsType[com.jogamp.nativewindow.AbstractGraphicsDevice, com.jogamp.nativewindow.CapabilitiesImmutable] -> jogamp.nativewindow.DefaultGraphicsConfigurationFactoryImpl@2568232
Factory #2: DeviceCapsType[com.jogamp.nativewindow.windows.WindowsGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory@bd91fde
GraphicsConfigurationFactory.getFactory() deviceTypes: [class com.jogamp.nativewindow.windows.WindowsGraphicsDevice, class com.jogamp.nativewindow.DefaultGraphicsDevice, interface com.jogamp.nativewindow.AbstractGraphicsDevice]
GraphicsConfigurationFactory.getFactory() capabilitiesTypes: [interface com.jogamp.opengl.GLCapabilitiesImmutable, interface com.jogamp.nativewindow.CapabilitiesImmutable]
GraphicsConfigurationFactory.getFactory() found DeviceCapsType[com.jogamp.nativewindow.windows.WindowsGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory@bd91fde
updateGraphicsConfiguration(using shared): hdc 0xffffffff9c0115c7
user chosen caps GLCaps[rgba 5/5/5/1, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationARB: hdc 0xffffffff9c0115c7, pfdIDCount(hdc) 670, capsChosen GLCaps[rgba 5/5/5/1, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], WINDOW
        isOpaque true (translucency requested: false, compositioning enabled: true)
        extHDC true, chooser true, pformatsNum -1
wglChoosePixelFormatARB: NumFormats (wglChoosePixelFormatARB) accelMode 0x2027: 16
pixel format 58 (index 0): GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 60 (index 1): GLCaps[wgl vid 60 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 66 (index 2): GLCaps[wgl vid 66 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 68 (index 3): GLCaps[wgl vid 68 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 154 (index 4): GLCaps[wgl vid 154 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 156 (index 5): GLCaps[wgl vid 156 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 162 (index 6): GLCaps[wgl vid 162 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 164 (index 7): GLCaps[wgl vid 164 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 74 (index 8): GLCaps[wgl vid 74 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 76 (index 9): GLCaps[wgl vid 76 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 82 (index 10): GLCaps[wgl vid 82 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 84 (index 11): GLCaps[wgl vid 84 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 170 (index 12): GLCaps[wgl vid 170 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 172 (index 13): GLCaps[wgl vid 172 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 178 (index 14): GLCaps[wgl vid 178 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
pixel format 180 (index 15): GLCaps[wgl vid 180 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo, pbuffer]]
wglARBPFIDs2GLCapabilities: bucket[0 -> 0]: GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[1 -> 1]: GLCaps[wgl vid 60 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[2 -> 2]: GLCaps[wgl vid 66 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[3 -> 3]: GLCaps[wgl vid 68 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[4 -> 4]: GLCaps[wgl vid 154 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[5 -> 5]: GLCaps[wgl vid 156 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[6 -> 6]: GLCaps[wgl vid 162 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[7 -> 7]: GLCaps[wgl vid 164 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[8 -> 8]: GLCaps[wgl vid 74 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[9 -> 9]: GLCaps[wgl vid 76 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[10 -> 10]: GLCaps[wgl vid 82 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[11 -> 11]: GLCaps[wgl vid 84 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[12 -> 12]: GLCaps[wgl vid 170 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[13 -> 13]: GLCaps[wgl vid 172 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[14 -> 14]: GLCaps[wgl vid 178 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
wglARBPFIDs2GLCapabilities: bucket[15 -> 15]: GLCaps[wgl vid 180 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationARB: 16 pfd ids, skipCapsChooser false, WINDOW, 16 glcaps
updateGraphicsConfigurationARB: Used wglChoosePixelFormatARB to recommend pixel format 58, idx 0, GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationARB: got configs: 16
0: GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
1: GLCaps[wgl vid 60 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
2: GLCaps[wgl vid 66 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
3: GLCaps[wgl vid 68 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
4: GLCaps[wgl vid 154 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
5: GLCaps[wgl vid 156 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
6: GLCaps[wgl vid 162 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
7: GLCaps[wgl vid 164 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
8: GLCaps[wgl vid 74 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
9: GLCaps[wgl vid 76 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
10: GLCaps[wgl vid 82 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
11: GLCaps[wgl vid 84 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
12: GLCaps[wgl vid 170 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
13: GLCaps[wgl vid 172 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
14: GLCaps[wgl vid 178 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
15: GLCaps[wgl vid 180 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/16, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
chooseCapabilities: Chosen idx 0
chosen pfdID (ARB): native recommended 1 chosen GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], skipCapsChooser false
*** setCapsPFD: GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
WindowsAWTWGLGraphicsConfigurationFactory: Found new AWT PFD ID 58 -> WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x35f22d81]], idx 0], pfdID 58, ARB-Choosen true,
        requested GLCaps[rgba 5/5/5/1, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
        chosen    GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]]
AWT pfd[0] 0
WindowsAWTWGLGraphicsConfigurationFactory: PFD IDs: 1, unique: 1
updateGraphicsConfiguration(using shared): hdc 0xffffffff9c0115c7
user chosen caps GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationARB: hdc 0xffffffff9c0115c7, pfdIDCount(hdc) 670, capsChosen GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], WINDOW
        isOpaque true (translucency requested: false, compositioning enabled: true)
        extHDC true, chooser true, pformatsNum 1
wglARBPFIDs2GLCapabilities: Invalid pfdID 0/1: 0
updateGraphicsConfigurationARB: wglARBPFIDs2GLCapabilities failed with 1 pfd ids
    [2]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfigurationARB(WindowsWGLGraphicsConfigurationFactory.java:450)
    [3]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:323)
    [4]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.preselectGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:291)
    [5]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.preselectGraphicsConfiguration(WindowsWGLGraphicsConfiguration.java:157)
    [6]: jogamp.fat/jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:168)
    [7]: jogamp.fat/com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
    [8]: j3dcore/org.jogamp.java3d.JoglPipeline.createAwtGraphicsConfiguration(JoglPipeline.java:8704)
    [9]: j3dcore/org.jogamp.java3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8435)
    [10]: j3dcore/org.jogamp.java3d.Renderer.doWork(Renderer.java:497)
    [11]: j3dcore/org.jogamp.java3d.J3dThread.run(J3dThread.java:271)
updateGraphicsConfigurationGDI: hdc 0xffffffff9c0115c7, capsChosen GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], WINDOW
        extHDC true, chooser true, pformatsNum 1
Chosen PFDID 10 (idx -1), but not found in available caps (use given pfdIDs true, reqPFDCaps GLCaps[wgl vid 10 gdi: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo]], chosenCaps: GLCaps[wgl vid 10 gdi: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationGDI: ChoosePixelFormat(HDC 0xffffffff9c0115c7) = pfdID 0, skipCapsChooser false, idx -1 (LastError: 0)
updateGraphicsConfigurationGDI: availableCaps[0 -> skip]: pfdID 0, GLCaps[wgl vid 0 gdi: rgba 0/0/0/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 0/0/0, one, mono  , hw, GLProfile[GL4bc/GL4bc.hw], offscr[auto-cfg]]
Empty available capabilities
updateGraphicsConfigurationGDI: failed, return false
    [2]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfigurationGDI(WindowsWGLGraphicsConfigurationFactory.java:637)
    [3]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:326)
    [4]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.preselectGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:291)
    [5]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.preselectGraphicsConfiguration(WindowsWGLGraphicsConfiguration.java:157)
    [6]: jogamp.fat/jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:168)
    [7]: jogamp.fat/com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
    [8]: j3dcore/org.jogamp.java3d.JoglPipeline.createAwtGraphicsConfiguration(JoglPipeline.java:8704)
    [9]: j3dcore/org.jogamp.java3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8435)
    [10]: j3dcore/org.jogamp.java3d.Renderer.doWork(Renderer.java:497)
    [11]: j3dcore/org.jogamp.java3d.J3dThread.run(J3dThread.java:271)
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
In reply to this post by gouessej
Also I compared the logs generated by Java 8 with Java 14 and noticed these differences:

Java 8:
updateGraphicsConfigurationGDI: ChoosePixelFormat(HDC 0x79011cb0) = pfdID 9, skipCapsChooser true, idx 0 (LastError: 0)
Java 14:
updateGraphicsConfigurationGDI: ChoosePixelFormat(HDC 0xffffffff9c01131a) = pfdID 9, skipCapsChooser true, idx 0 (LastError: 127)

Not sure what LastError: 127 means in Java 14 but might be the cause of this problem.

Java 8:
Factory #0: DeviceCapsType[com.jogamp.nativewindow.windows.WindowsGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory@3f438400
Factory #1: DeviceCapsType[com.jogamp.nativewindow.AbstractGraphicsDevice, com.jogamp.nativewindow.CapabilitiesImmutable] -> jogamp.nativewindow.DefaultGraphicsConfigurationFactoryImpl@224724ae
Factory #2: DeviceCapsType[com.jogamp.nativewindow.awt.AWTGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory@24e20284

Java 14:
Factory #0: DeviceCapsType[com.jogamp.nativewindow.awt.AWTGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory@621016c5
Factory #1: DeviceCapsType[com.jogamp.nativewindow.AbstractGraphicsDevice, com.jogamp.nativewindow.CapabilitiesImmutable] -> jogamp.nativewindow.DefaultGraphicsConfigurationFactoryImpl@2568232
Factory #2: DeviceCapsType[com.jogamp.nativewindow.windows.WindowsGraphicsDevice, com.jogamp.opengl.GLCapabilitiesImmutable] -> jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory@bd91fde

It looks like the order of config factories are reversed. This might be okay. Not sure.

Finally, these logs are missing in Java 8 but exist in Java 14:

AWT pfd[0] 0
WindowsAWTWGLGraphicsConfigurationFactory: PFD IDs: 1, unique: 1
updateGraphicsConfiguration(using shared): hdc 0xffffffff9c0115c7
user chosen caps GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationARB: hdc 0xffffffff9c0115c7, pfdIDCount(hdc) 670, capsChosen GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], WINDOW
        isOpaque true (translucency requested: false, compositioning enabled: true)
        extHDC true, chooser true, pformatsNum 1
wglARBPFIDs2GLCapabilities: Invalid pfdID 0/1: 0
updateGraphicsConfigurationARB: wglARBPFIDs2GLCapabilities failed with 1 pfd ids
    [2]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfigurationARB(WindowsWGLGraphicsConfigurationFactory.java:450)
    [3]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:323)
    [4]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.preselectGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:291)
    [5]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.preselectGraphicsConfiguration(WindowsWGLGraphicsConfiguration.java:157)
    [6]: jogamp.fat/jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:168)
    [7]: jogamp.fat/com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
    [8]: j3dcore/org.jogamp.java3d.JoglPipeline.createAwtGraphicsConfiguration(JoglPipeline.java:8704)
    [9]: j3dcore/org.jogamp.java3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8435)
    [10]: j3dcore/org.jogamp.java3d.Renderer.doWork(Renderer.java:497)
    [11]: j3dcore/org.jogamp.java3d.J3dThread.run(J3dThread.java:271)
updateGraphicsConfigurationGDI: hdc 0xffffffff9c0115c7, capsChosen GLCaps[wgl vid 58 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/8, sample-ext default, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], WINDOW
        extHDC true, chooser true, pformatsNum 1
Chosen PFDID 10 (idx -1), but not found in available caps (use given pfdIDs true, reqPFDCaps GLCaps[wgl vid 10 gdi: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[fbo]], chosenCaps: GLCaps[wgl vid 10 gdi: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationGDI: ChoosePixelFormat(HDC 0xffffffff9c0115c7) = pfdID 0, skipCapsChooser false, idx -1 (LastError: 0)
updateGraphicsConfigurationGDI: availableCaps[0 -> skip]: pfdID 0, GLCaps[wgl vid 0 gdi: rgba 0/0/0/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 0/0/0, one, mono  , hw, GLProfile[GL4bc/GL4bc.hw], offscr[auto-cfg]]
Empty available capabilities
updateGraphicsConfigurationGDI: failed, return false
    [2]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfigurationGDI(WindowsWGLGraphicsConfigurationFactory.java:637)
    [3]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:326)
    [4]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.preselectGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:291)
    [5]: jogamp.fat/jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.preselectGraphicsConfiguration(WindowsWGLGraphicsConfiguration.java:157)
    [6]: jogamp.fat/jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:168)
    [7]: jogamp.fat/com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
    [8]: j3dcore/org.jogamp.java3d.JoglPipeline.createAwtGraphicsConfiguration(JoglPipeline.java:8704)
    [9]: j3dcore/org.jogamp.java3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8435)
    [10]: j3dcore/org.jogamp.java3d.Renderer.doWork(Renderer.java:497)
    [11]: j3dcore/org.jogamp.java3d.J3dThread.run(J3dThread.java:271)
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

gouessej
Administrator
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
I wasn't using these VM options:

--add-opens
javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED
--add-opens
javafx.graphics/javafx.stage=ALL-UNNAMED
--add-opens
javafx.graphics/com.sun.javafx.tk.quantum=ALL-UNNAMED
--add-opens
javafx.graphics/com.sun.glass.ui=ALL-UNNAMED

But adding them didn't make a difference.
Why are those options needed anyways?


I noticed in your link that you used NewtCanvasJFX in your example.
I'm using Java3D's JCanvas however.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

gouessej
Administrator
JOGL needs those options since Java 9 because of the modularization, some classes can't be accessed without them.

Do you reproduce your bug on a very simple example with JOGL but without Java3D?

You should look at this bug report as I had exactly the same problem:
https://jogamp.org/bugzilla/show_bug.cgi?id=1317#c12
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
I can run the simple example (animated rotating quad).

At first I had difficulties but it turned out that your documentation is slightly incorrect.
For example, it says to add this VM parameter:
--add-opens javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED

But I had to add this instead:
--add-opens javafx.graphics/com.sun.javafx.tk=jogamp.fat

So yes the example works on Java 14.
But with same VM arguments I still can't get my Java3D app to work on Java 14.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
In reply to this post by gouessej
I had some progress.
When debugging I noticed that an exception was thrown but not shown due to flag "nativewindow.debug.JAWT" being off.
After enabling this flag I could see another Java 14 modularization problem so I had to add this JVM parameter:

--add-opens java.desktop/sun.awt=jogamp.fat

(Why are critical exceptions like this not shown by default?)

So now I got to a JOGL error which is this:

Bug 1004[TGMapped true]: Init AppContext @ <init> on thread J3D-Renderer-1 0x430926c5: tg Java3D 0x3183ccb3 -> appCtx [ main null 0x0 -> this sun.awt.AppContext[threadGroup=system] 0x5f47d044 ]
JAWTWindow[0x52fbae0].invalidate @ Thread J3D-Renderer-1 - visible[isShowing false],
    ** THIS 0x2823c63d: QueryCanvas[visible true, showing false, valid false, displayable true, 0/0 0x0]
    ** THREAD J3D-Renderer-1
JAWTWindow[0x52fbae0].ctor @ Thread J3D-Renderer-1
JAWTUtil.getJAWT(tryOffscreenLayer false, tryOnscreen true)
JAWTWindow[0x52fbae0].attach @ Thread AWT-EventQueue-0: visible[isShowing true],
    ** THIS 0x2823c63d: QueryCanvas[visible true, showing true, valid true, displayable true, 0/0 1x1]
    ** THREAD AWT-EventQueue-0
JAWTWindow.updateBounds: [ 0 / 0  0 x 0 ] -> [ 0 / 0  1 x 1 ]
JAWTWindow: surface change 0xffffffff8d010af8 -> 0xffffffffaa01117c
JAWTWindow[0x52fbae0].destroy @ Thread J3D-Renderer-1
JAWTWindow[0x52fbae0].invalidate @ Thread J3D-Renderer-1 - visible[isShowing true],
    ** THIS 0x2823c63d: QueryCanvas[visible true, showing true, valid true, displayable true, 0/0 1x1]
    ** THREAD J3D-Renderer-1
JAWTWindow[0x52fbae0].detach @ Thread AWT-EventQueue-0: visible[isShowing true],
    ** THIS 0x2823c63d: QueryCanvas[visible true, showing true, valid true, displayable true, 0/0 1x1]
    ** THREAD AWT-EventQueue-0

Any idea why JOGL runs fine alone but Java3D give this error?

Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
In reply to this post by gouessej
Oh never mind! It works now!
Guess I can ignore those logs.

So long story short the problem was missing "--add-opens java.desktop/sun.awt=jogamp.fat"

Thanks for the help
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

gouessej
Administrator
My documentation isn't wrong as it works in my case. I don't understand why you need to use "jogamp.fat", a module name is expected, we don't name any module, ALL-UNNAMED is the correct value. I tested my findings before publishing. What's different in your settings?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
I'm not sure either, but in this stackoverflow post:

https://stackoverflow.com/questions/46741907/what-is-an-automatic-module

It says this:

"Deriving the module name is a two-step process:
1)if the JAR defines the Automatic-Module-Name header in its manifest, it defines the module's name
2) otherwise, the JAR file name is used to determine the name"

So looks like Java automatically uses jar filename to give module a name if a name is not explicitly given.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

gouessej
Administrator
Do you use a module path? I don't do so in my example, I use the classpath.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

runiter
Yes, I use "module-info.java" in my project.
So guess that's why.

Are there any plans to reorganize jogl into modules?
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

gouessej
Administrator
Thank you, I'll add this information into my tutorial.

I don't think that we'll do it in JOGL 2.4.0 but we will probably do it later, especially if it helps to avoid having to use --add-opens by putting the necessary information into module-info.java.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D+Javafx doesn't work on Java 14

WoodManEXP
This post was updated on .
Similar condition is happening here while using jogl-all-2.3.2 on Windows 10 system. Tracing the jogl code this method: jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfigurationGDI
finds nothing when querying for graphics capabilities.

Empty available capabilities
updateGraphicsConfigurationGDI: failed, return false

Which percolates back to the out-of-bounds failure here

winConfig.preselectGraphicsConfiguration(drawableFactory, pfdIDs);
                final int gcIdx = pfdIDOSet.indexOf(Integer.valueOf(winConfig.getPixelFormatID()));
                if( 0 > gcIdx ) {
                    chosenGC = configs[gcIdx];
                    if(DEBUG) {
                        System.err.println("WindowsAWTWGLGraphicsConfigurationFactory: Found matching AWT PFD ID "+winConfig.getPixelFormatID()+" -> "+winConfig);
                    }
                }

Is there perhaps something needed to ensure it finds a graphics capability?

Or maybe an updated jogl-all jar with a fix to that code segment should be used ?

(The jogl-all jars are from Maven)

TY for any advise/thoughts!



12