adoptium / adoptium-support

For end-user problems reported with our binary distributions
Apache License 2.0
45 stars 15 forks source link

JConsole brings yellow window #187

Open Thihup opened 3 years ago

Thihup commented 3 years ago

I'm trying to migrate from JDK 10 to JDK 11. However, I've hit a problem with Swing/AWT. The minimal case is using a WTS to connect to a Linux server while forwarding X11 to open the JConsole in the WTS. With JDK 10, the JConsole opens normally. With JDK 11+, it shows a yellow screen.

The setup is the following: Linux (my machine) connects to Windows (WTS) connects to Linux (server with JConsole)

I think this is somehow related: https://github.com/AdoptOpenJDK/IcedTea-Web/issues/664

JDK <10 image

JDK 11+ image

hendrikebbers commented 3 years ago

@Thihup do you have a change to start a hello world Swing application? I assume this has nothing to do with Console in general but is a swing related issue.

Thihup commented 3 years ago

Yes. I have already done that and the problem happens too. Sure it's not a JConsole issue, but it the easiest way to simulate the problem

Thihup commented 3 years ago

It worked by setting the property: -Dsun.java2d.xrender=false

hendrikebbers commented 3 years ago

I have no idea how JConsole handles system out. Maybe you can see an error when just starting a small swing app from the shell. I assume this is somehow related to native rendering. Therefore information about the OS would be good.

Thihup commented 3 years ago

The JConsole don't show any error at the console starting with java sun.tools.jconsole.JConsole or java -m jdk.jconsole/sun.tools.jconsole.JConsole.

However, I've got some info. The JDK 11+25 was the first build that the JConsole stopped working correctly, it only showed a gray window. At 11.0.5, it started to show this yellow screen.

I have found some issues related to this: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8204931 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8214579 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8227921

Thihup commented 3 years ago

I've found out that usually using -Dsun.java2d.opengl=true can make it more usable. Using -Dsun.java2d.xrender=false it very slow, unfortunately.

adamr88 commented 2 years ago

Switching the x11vnc color depth from 16 to 24 solved the problem for me when using jdk-11

barulheira commented 2 years ago

In WTS, switching the color depth to 16, 24 or 32 bits doesn't make a difference.

github-actions[bot] commented 2 years ago

We are marking this issue as stale because it has not been updated for a while. This is just a way to keep the support issues queue manageable. It will be closed soon unless the stale label is removed by a committer, or a new comment is made.

karianna commented 2 years ago

@Thihup - Is this resolved with 11.0.15 for you?

Thihup commented 2 years ago

@karianna Unfortunately the issue still happens with Java 11.0.15 and 18.0.1

karianna commented 2 years ago

@Thihup Are you able to try:

Switching the x11vnc color depth from 16 to 24 solved the problem for me when using jdk-11

Thihup commented 2 years ago

@karianna We tried that, but that made no difference at all 😞