JDK-8244088 : [Regression] Switch of Gnome theme ends up in deadlocked UI
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8,9,11,14,15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2020-04-29
  • Updated: 2021-05-11
  • Resolved: 2020-11-10
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 11 JDK 13 JDK 15 JDK 16 JDK 8
11.0.11-oracleFixed 13.0.8Fixed 15.0.4Fixed 16 b24Fixed 8u311Fixed
Related Reports
Relates :  
Relates :  
Description
This was original reported here:
https://github.com/AdoptOpenJDK/openjdk-support/issues/4

I was able to reproduce this with latest jdk/jdk on Fedora 30. It appears the original fix in 8, JDK-7123957, regressed via JDK-8145547.

Steps:

    Install the gnome-tweak-tool

    sudo add-apt-repository universe
    sudo apt install gnome-tweak-tool

    Run the following code snippet

    import javax.swing.*;

    public class ThemeCrash {
        public static void main(String ... args) {
            SwingUtilities.invokeLater(() -> {
                try {
                    UIManager.setLookAndFeel(UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"););
                    JOptionPane.showMessageDialog(null, "test");
                } catch (Throwable ignore) { }
            });
        }
    }

    Observe that the "Ok" button can be clicked.

    Launch Gnome Tweak Tool. From the "Appearance" tab, change the theme from "Adwaita (default)" to "Adwaita-dark"

    Observe that the "Ok" button can no longer be clicked.

Comments
Fix request (15u): applicable seamlessly, all relevant tests do pass.
05-05-2021

Fix request (13u): the issue exists and the fix works in GTK-3-based systems (e.g. Xfce). Skara says "clean", and it is. Will label after the testing finished.
04-05-2021

[~clanger] yes please Christoph, many thanks
03-12-2020

[~aleonard] do you want me to sponsor this?
02-12-2020

Fix Request This issue has been hit by AdoptOpenJDK binary consumers (see: https://github.com/AdoptOpenJDK/openjdk-support/issues/4) and also more recently AdoptOpenJDK OpenJ9 based customers. The patch applies cleanly to jdk11u-dev, and all tier1 tests pass. The patch exports and applies cleanly from openjdk/jdk using: git format-patch -1 a7f46919ff43ede12ed977512a3b0d93bc4cbc76
02-12-2020

Changeset: a7f46919 Author: Jayashree S Kumar <jayashreesk@in.ibm.com> Committer: Sergey Bylokhov <serb@openjdk.org> Date: 2020-11-10 19:36:59 +0000 URL: https://github.com/openjdk/jdk/commit/a7f46919
10-11-2020

The current bug is exactly the same bug as JDK-6913179: http://cr.openjdk.java.net/~anthony/7-43-GTKFileDialog-6913179.5/src/solaris/native/sun/awt/swing_GTKEngine.c.sdiff.html It was fixed by JDK-7123957, but appeared again in gtk3 fix
03-11-2020

Will sponsor the fix under review.
03-11-2020

Sorry, I don't understand. This is an issue with 8+. JDK 15 shows the issue as well. Are you saying there are no plans to provide a similar fix than was present in JDK 7?
14-05-2020

This was a known issue when the gtk3 support was back ported to jdk8
14-05-2020