Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8094088

[Mac] WebView unit tests hang on headless test machines

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 8u60, 9
    • javafx
    • web

        Our WebView 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".

        To reproduce this:

        1. remotely ssh into a Mac that is not logged into the console and has no monitor or keyboard attached to it
        2. Run "gradle :web:test"
        3. The test suite will hang when running the first test that starts the FX runtime

        The reason for the hang is that the QuantumRenderer thread gets an exception during screen initialization in headless mode, and that exception isn't propagated to the test harness.

        Here is the exception that leads to the hang:

        javafx.scene.web.BindingTest 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$42/1907614384.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)

              kcr Kevin Rushforth
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported: