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

[XWayland] JavaFX hangs when calling java.awt.Robot.getPixelColor

XMLWordPrintable

    • b26

        The tests/system/src/test/java/test/robot/javafx/embed/swing/SwingNodeJDialogTest.java test timeouts after implementing the ScreenCast screen capture for JavaFX(JDK-8326712), this requires a fix on OpenJDK side.

        It happens due to the call to gtk->g_main_context_iteration(NULL, TRUE) when we try to capture screen data, this blocks the gtk fx main loop.


        Possible solutions are:

        1. make a busy wait loop if we detect a gtk loop running
        gtk->g_main_context_iteration(NULL, gtk->gtk_main_level == 0);
        This will prevent the SwingNodeJDialogTest from hanging, and receive pixel color successfully.

        2. do the same change as in JDK-8326712, make a nested loop, this allows to get a pixel color, but the test still timed out, needs further investigation.

              azvegint Alexander Zvegintsev
              azvegint Alexander Zvegintsev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: