JDK-8096769 : [Mac] Swing interop unit tests hangs on headless test machines
  • Type: Bug
  • Component: javafx
  • Sub-Component: swing
  • Affected Version: 8u60,9
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-05-04
  • Updated: 2015-06-22
  • Resolved: 2015-05-04
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.
JDK 8 JDK 9
8u60Fixed 9Fixed
Related Reports
Relates :  
Description
Our swing interop unit tests are hanging on Mac when run on our Hudson test slaves, which run in headless mode. Any test that cannot run headless must  be qualified by "FULL_TEST=true". Additionally, the AWT and Swing tests need to be qualified by AWT_TEST=true.

The failure is this:

javafx.embed.swing.SwingFXUtilsTest STANDARD_ERROR
    RenderJob.run: internal exception
    java.lang.ArrayIndexOutOfBoundsException: 0
    	at java.util.Arrays$ArrayList.get(Arrays.java:3835)
    	at java.util.Collections$UnmodifiableList.get(Collections.java:1369)
    	at com.sun.glass.ui.Screen.getMainScreen(Screen.java:61)
    	at com.sun.prism.sw.SWPipeline.getDefaultResourceFactory(SWPipeline.java:82)
    	at com.sun.prism.GraphicsPipeline.getDefaultResourceFactory(GraphicsPipeline.java:120)
    	at com.sun.javafx.tk.quantum.QuantumRenderer.lambda$createResourceFactory$411(QuantumRenderer.java:161)
    	at com.sun.javafx.tk.quantum.QuantumRenderer$$Lambda$44/1608543144.run(Unknown Source)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    	at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
    	at java.lang.Thread.run(Thread.java:744)
Comments
9 changeset: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/b8f48761a59b 8u60 changeset: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/3831881bf6aa
04-05-2015

Simple fix: diff --git a/build.gradle b/build.gradle --- a/build.gradle +++ b/build.gradle @@ -1661,6 +1661,9 @@ dependencies { compile BUILD_SRC, project(":base"), project(":graphics") } + test { + enabled = IS_FULL_TEST && IS_AWT_TEST + } } project(":swt") {
04-05-2015