JDK-8113631 : JFXPanel doesn't work with ES2, on Mac
  • Type: Bug
  • Component: javafx
  • Sub-Component: swing
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-05-24
  • Updated: 2015-06-16
  • Resolved: 2011-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
fx2.0Fixed
Related Reports
Blocks :  
Blocks :  
Duplicate :  
Description
After the fix for RT-11786 JFXPanel now works on MacOSX. However, Prism/J2D is the only pipeline available, while Prism/ES2 throws the following exception:

     [java] java.lang.NullPointerException
     [java] 	at com.sun.prism.es2.ES2RTTexture.create(ES2RTTexture.java:53)
     [java] 	at com.sun.prism.es2.ES2ResourceFactory.createRTTexture(ES2ResourceFactory.java:53)
     [java] 	at com.sun.javafx.tk.quantum.EmbeddedScene$PaintRunnable.run(EmbeddedScene.java:148)
     [java] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     [java] 	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
     [java] 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
     [java] 	at com.sun.prism.render.RenderJob.run(RenderJob.java:29)
     [java] 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     [java] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     [java] 	at com.sun.javafx.tk.quantum.QuantumRenderer$ObservedRunnable.run(QuantumRenderer.java:70)
     [java] 	at java.lang.Thread.run(Thread.java:680)

ES2RTTexture.java:53 is the following line:

        boolean pad = gl.isGLES2();

so obviously "gl" is null.

apps/experiments/SwingJavaFXChart is the application that can be used to reproduce this problem.

Comments
Verified with #217 (July 26)presidio MASTER build. There are no Exceptions now using JFXPanel on MacOSX..
26-07-2011

Here's the Glass's changeset: Changeset: 439d37e01131 Author: dcherepanov Date: Wed Jul 13 15:56:45 2011 +0400 URL: http://jfxsrc.us.oracle.com/javafx/presidio/scrum/graphics/glass/rev/439d37e01131
13-07-2011

Resolved by the following changeset: Changeset: 81eecabcd835 Author: dcherepanov Date: Wed Jul 13 15:55:01 2011 +0400 URL: http://jfxsrc.us.oracle.com/javafx/presidio/scrum/graphics/runtime/rev/81eecabcd835 The fix introduces new prism.RenderingContext interface. The native OpenGL rendering context (to perform offscreen rendering) is created by Prism during pipeline's startup and it's exposed through the new interface. The rendering context also serves as a share context and used by Glass through Application.getDeviceDetails().
13-07-2011

possibly related to RT-13750
21-06-2011

Assign to Dmitry to evaluate the state of Swing interop on Mac.
10-06-2011