java.awt.Desktop.open hangs on Linux when called from FX application thread

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 8, 15, 16, 17
    • Component/s: client-libs
    • None
    • Environment:

      JDK 15 (also fails with the latest 17-ea build)
      Ubuntu 20.04 (also fails on Ubuntu 16.04).
      JavaFX 15 (also fails with latest FX 17 ea build)

      This is a follow-on bug that I discovered while testing the fix for JDK-8210199.

      To reproduce, run the attached test program on Linux. It will hang with a possible deadlock. The FX application thread, which calls Desktop.open, is stuck in "sun.awt.X11.XDesktopPeer.gnome_url_show".

      The complete thread stack dump is attached.

      It's quite possible that the FX glass GTK code is doing something to trigger this.

      This runs fine on macOS and Windows.

      Workaround: wrap the call to Desktop.open in SwingUtilities.invokeLater().

            Assignee:
            Alexander Zvegintsev
            Reporter:
            Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: