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

Robot.createScreenCapture() fails if “awt.robot.gtk” is set to false

    XMLWordPrintable

Details

    • b16
    • linux

    Backports

      Description

        Robot.createScreenCapture() gets the wrong colours if the option awt.robot.gtk is set to false, see attachments. The problem is reproducible on Linux (e.g. Ubuntu 18.04) in VNC environment when server depth is set to 16.

        Steps to reproduce:
        1. Start VNC server, (e.g. vncserver :18 -depth 16 &)
        2. Start VNC client, (e.g. gvncviewer localhost:18 &)
        3. Run RobotScreenCaptureTest.java, (i.e. java -Dawt.robot.gtk=false RobotScreenCaptureTest)
        Note: it might be necessary to repeat step 3 several times (~10) to reproduce the issue

        Actual result:
        The test fails due to wrong colour, see “screenCapture_awt.robot.gtk=false.png” in the attachment

        Expected result:
        The test should pass, see “screenCapture_awt.robot.gtk=true.png” in the attachment

        Attachments

          Issue Links

            Activity

              People

                dmarkov Dmitry Markov
                shadowbug Shadow Bug
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: