JDK-8189185 : Text and some GUI elements are not rendered on secondary independent X screens
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8,8u141,9,10
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: linux,solaris
  • CPU: x86_64
  • Submitted: 2017-10-11
  • Updated: 2018-01-18
  • Resolved: 2018-01-18
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
JDK 10, JDK 9, JDK 8, JDK 8u141 b15 x64

ADDITIONAL OS VERSION INFORMATION :
- 64-bit Oracle Solaris 11.3 x86 OS (Original bug filer's environment)
- Linux Ubuntu 16.04.2 x86_64 OS with Xfce 4.12 desktop environment (Alternative test environment set up to prove that the bug also affects JDK for Linux OS)

A DESCRIPTION OF THE PROBLEM :
Rendering of text and some other GUI elements in Swing/AWT components does not propagate to secondary independent X screens on Oracle Solaris OS or Linux OS with multi-monitor configuration, where XINERAMA X Server extension is disabled and where each monitor corresponds to an independent X screen. The issue cannot be reproduced with JDK 7, JDK 6 in the same environment.

Screenshots:
1) "Bug-OnSolaris11.3WithJDK8u152b16.png" - The issue reproduced using the attached test case "TextIsNotRenderedOnSecondDisplay.java" on 64-bit Oracle Solaris 11.3 x86 OS with JDK 8u152 b16. On the screenshot 2 windows with basic Swing and AWT components are displayed and it is visible that the text is not rendered in the frames at all and the components themselves are not rendered fully properly.
2) "NoBug-CorrectViewOfSwingAWTFrames.png" - The expected correct behaviour. The same frames from the screenshot #1 are demonstrated and the text with all other GUI elements of Swing and AWT components are rendered properly.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Set up a multi-monitor configuration with Oracle Solaris OS or Linux OS, where each monitor is assigned to a separate X screen. In such a configuration it is impossible to move windows of an application from one monitor to another monitor and there is no one big X screen consisting of multiple monitors.
2) Compile and run the attached test case "TextIsNotRenderedOnSecondDisplay.java" on any of the independent X screens. The bug is reproduced, if the text and GUI elements of Swing/AWT components in two windows with titles starting with "TextIsNotRenderedOnSecondDisplay" text, which are shown on other X screens, are not rendered at all or properly in comparison with the same frames on the X screen, from where the test case was started.
Comments
The research showed that such a multi-monitor configuration, where each display device is assigned to an independent X screen, is not popular among Linux users and is not a configuration supported by window managers of the most popular Linux desktop environments: Unity, GNOME 3, KDE. Since this bug was always present in JDK 8 starting from the first release, where XRender Graphics Pipeline became enabled by default, it can be concluded that XRender Graphics Pipeline has never been tested in such a multi-monitor configuration. So there may be many different bugs involving XRender Graphics Pipeline in such absolutely not popular nowadays multi-monitor configuration. The user confirmed that the suggested workaround consisting in a switch to the previous Graphics Pipeline used in JDK 7 by disabling XRender Graphics Pipeline resolves the issue and agreed to use the workaround as a final solution. Taking into account this fact and two facts stated above in this comment, closing the bug with "Won't Fix" resolution.
18-01-2018

After many unsuccessful attempts to set up an environment with 2 independent screens, which would not have a shared frame buffer provided by XINERAMA or RANDR X Server extensions, and each of which would correspond to a separate display device, in the VirtualBox virtual machine with Solaris 11.3 OS both configuring X Server configuration file manually and using the utility "xrandr", I came to a conclusion that it is not possible to create such a configuration with VirtualBox driver of a video card. SETTING UP THE TEST ENVIRONMENT AND REPRODUCING THE BUG: - ORACLE SOLARIS OS: Ultimately the test environment which allows to reproduce the bug was set up. The bug was reproduced in the created test environment with 2 independent screens, with Oracle Solaris 11.3 x86 OS, NVIDIA Quadro FX 1800 video card and NVIDIA 340.104 proprietary driver for this video card using the created test case "TextIsNotRenderedOnSecondDisplay.java" JDK 8u152 b16, JDK 8 b132. The bug could not be reproduced in the same environment with JDK 7u161 b13, JDK 6u171 b13. - LINUX OS: On the same hardware the test environment with Linux Ubuntu 16.04.2 x86_64 OS with Xfce 4.12 desktop environment was set up. It was found out that window managers of Unity, GNOME 3, KDE desktop environments do not show anything on the second display device with 2 independent X screens and only window manager from Xfce desktop environment shows UI properly in this configuration. In this Linux OS test environment the bug was reproduced with JDK 10+37, JDK 9.0.4+11, JDK 8u152 b16. THE DEFINED FACTS: It was defined that the bug appeared in JDK 8 b04 and is caused by the fix for the bug JDK-7077423, which enabled XRender Graphics Pipeline by default. THE DEFINED WORKAROUND: The following workaround was defined and verified in the former listed test environments. To workaround the bug the additional Java launcher option "-Dsun.java2d.xrender=false" can be specified, when the application is run. For example: "<JDK_HOME_DIR>/bin/java -Dsun.java2d.xrender=false AppMainClass"
05-01-2018

The following files were attached to the bug: 1. "TextIsNotRenderedOnSecondDisplay.java" - The created test case. 2. "Bug-OnSolaris11.3WithJDK8u152b16.png" - Screenshot demonstrating the bug. 3. "NoBug-CorrectViewOfSwingAWTFrames.png" - Screenshot demonstrating the expected correct behaviour.
05-01-2018

Yes the test was done on a VM with non-xinerama config.
15-11-2017

It can be tried, but it may take a long time before I can come up with the results.
15-11-2017

I have tried to reproduce the bug with the jar file provided by Bala, but the text rendering seems fine. 1. Downloaded jdk-8u151 for Solaris. 2. Executed the MultimonitorTest.jar file supplied, and found that it shows two windows - one for primary and one for secondary, with the window contents showing the screen number in text. Hence, this bug is not reproducible.
25-10-2017

Please reopen the bug if there is more information about reproducing the bug.
18-10-2017

In the absence of more information I have tried the following and the issue does not seem to occur: 1. Installed Solaris 11.3 in a VM 2. Installed JDK-1.8.60. 3. Configured the VM for dual monitor (with both the monitors at the resolution 1920x1080) 4. Ran the program that is attached, and dragged it onto the second screen. It basically creates three text boxes in swing with different languages. On dragging the window onto the second screen, the text seemed to render fine.
18-10-2017

Is there any test code that can be used?
17-10-2017

does it affect 9?
13-10-2017

Added regression label as it looks like an issue to migrate from JDK 7 to JDK 8.
13-10-2017