JDK-8029189 : Undecorated frame with transparent background does not show its content
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_ubuntu
  • Submitted: 2013-11-26
  • Updated: 2018-03-22
  • Resolved: 2018-03-22
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
8-poolResolved
Related Reports
Blocks :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
import java.awt.Color;
import java.awt.Frame;
import java.awt.Label;
import static java.awt.EventQueue.invokeAndWait;

public class AWT {
    public static void main(String[] args) throws Exception {
        invokeAndWait(() -> {
            Frame frame = new Frame();
            frame.add(new Label("TEST"));
            frame.setUndecorated(true);
            frame.setBackground(new Color(0f, 1f, 0f, 0.5f));
            frame.setBounds(200, 200, 200, 200);
            frame.setVisible(true);
        });
    }
}

The code above shows a label with the following cmd:
java -Dsun.java2d.xrender=false AWT

The code above does not show a label with the following cmd:
java -Dsun.java2d.xrender=true AWT
Comments
Reassigning to sustaining is not the way to handle this. If it was fixed in 9 it was fixed by some other fix and you need to track it down and closed it as a duplicate. Nothing else needed. If they were to backport sustaining would just have to do the same and if they did not treat it as a backport we'd incorrectly have unrelated bugs in the database. Looking at 8u91 won't help. You need to look at JDK 9 builds. I suspect this is a duplicate of https://bugs.openjdk.java.net/browse/JDK-8039345 fixed in JDK9 b56
05-05-2016

Reassign Comments: 1. As updated in the above comments, the issue is not reproducible on Jdk 9 but reproducible on Jdk 8 (1.8.0_91) 2. Screenshots have been attached for reference purposes.
05-05-2016

Quick observation from Testing issue on Linux platform 1. The issue was tested on Linux x86_64 with both JDK 8 (1.8.0_91 ) and JDK 9 2. With Jdk 8: The issue was reproducible. In otherwords, the label was missing on the frame. When -Dsun.java2d.xrender=false was set, the issue was not visible. Label clearly showed up on the frame. Refer attached images: Linux-x86_64-Jdk1.8.0_91.png and Linux-x86_64-Jdk1.8.0_91-xRenderFalse.png 3. With Jdk 9: The issue was not reproducible. Label clearly showed up on the frame without needing to set xrender=false. Refer attached image: Linux-x86_64-Jdk9-internal.png 4. To conclude, Jdk 9 has internally fixed this issue. It would be good to know the change set that has auto-resolved the bug. If someone could mention how to track the build version 1.8.0_b91 against change-sets it would help in finding the particular change.
05-05-2016

Release team: Approved for deferral.
06-12-2013

Well, if it is a duplicate of JDK-7172456, something about it has been known for quite some time. Anyway, JDK8: SQK is OK to defer.
03-12-2013

8-defer note: I can reproduce and this has been in JDK 8 for 2 years and its unfortunate that the bug was found so late, as its something we would have fixed if found earlier. But right now I am obliged to request deferral as I do not yet have a fix.
02-12-2013

Phil, please evaluate it. What is Introduced in release?
02-12-2013

We cannot close it as a duplicate. The 8023098 resolved in b115, but the following code does not work with xrender on b117: Frame frame = new Frame() { @Override public void paint(Graphics g) { super.paint(g); g.setColor(new Color(1f, 0f, 0f, 0.5f)); g.fillRect(50, 50, 100, 100); } }; frame.setUndecorated(true); frame.setBackground(new Color(0f, 1f, 0f, 0.5f)); frame.setBounds(200, 200, 200, 200); frame.setVisible(true);
28-11-2013

is it subject to close as dup? if yes, please close it
28-11-2013

It seems so. At least, both tests are very similar.
28-11-2013

SAM, is it dup of 7172456 ?
28-11-2013

otherwise assign back to Phil
28-11-2013

I guess most of such tests were failed, because another issue https://bugs.openjdk.java.net/browse/JDK-8023098 For example JDK-7172456 has the similar testcase,
27-11-2013

For me, the first program never shows a Label no matter whether I use xrender or x11 pipeline. The 2nd program does however show a difference. It looks like this should have been spotted a long time ago, since the bug has been there for 2 years. It appears there can't be any test coverage in this area.
27-11-2013

import java.awt.Color; import java.awt.Frame; import java.awt.Graphics; import static java.awt.EventQueue.invokeAndWait; public class AWT { public static void main(String[] args) throws Exception { invokeAndWait(() -> { Frame frame = new Frame() { @Override public void paint(Graphics g) { super.paint(g); g.setColor(new Color(1f, 0f, 0f, 0.5f)); g.fillRect(50,50,100,100); } }; frame.setUndecorated(true); frame.setBackground(new Color(0f, 1f, 0f, 0.5f)); frame.setBounds(200, 200, 200, 200); frame.setVisible(true); }); } } The code above paints a rectangle with the following cmd: java -Dsun.java2d.xrender=false AWT The code above does not paint a rectangle with the following cmd: java -Dsun.java2d.xrender=true AWT
26-11-2013

I've replaced awt.Label with swing.JLabel. The code above shows a label with the following cmd: java -Dsun.java2d.xrender=false AWT The code above does not show a label with the following cmd: java -Dsun.java2d.xrender=true AWT If the value is True, the application prints: WARNING: The version of libXrender.so cannot be detected. ,The pipe line will be enabled, but note that versions less than 0.9.3 may cause hangs and crashes See the release notes for more details. XRender pipeline enabled Xrender: INFO: Jules library not installed.
26-11-2013

Transparent heavyweights are not supported.
26-11-2013

please triage
26-11-2013