question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Desktop.browse(...) freezes JFX on Linux with GNOME

See original GitHub issue

Describe the bug

Any call to Desktop.browse(...) freezes Recaf on Linux machines with GNOME

To Reproduce

  • Say “yes” to opening the documentation
  • Help > System info > open recaf directory

The Solution

From: https://stackoverflow.com/questions/23176624/javafx-freeze-on-desktop-openfile-desktop-browseuri

if( Desktop.isDesktopSupported() )
{
    new Thread(() -> {
           try {
               Desktop.getDesktop().browse( new URI( "http://..." ) );
           } catch (IOException | URISyntaxException e1) {
               e1.printStackTrace();
           }
       }).start();
}

Ideally since this would be all in the UI module, we could use our existing Threads class for pooling the threads.

We should make a wrapper utility so that we don’t have this big block of code every time we want to invoke browse. This should be done on both master and dev3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Col-Ecommented, Apr 26, 2022

Ported to 3x: 88adb702043beac1d9738b1afbb33794e3d1d3e6

0reactions
win32kbasecommented, Jan 20, 2022

Fixed in 2x as of https://github.com/Col-E/Recaf/commit/3212458c61295834f0bf851cf1efea46dd2e4793, still needs to be ported to 3x though

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaFX Freeze on Desktop.open(file), Desktop.browse(uri)
I'm running some code in Java on Ubuntu 12.04 LTS 64 Bit (with Gnome Shell), using Oracle ...
Read more >
JavaFX Freeze on Desktop.open(file), Desktop.browse(uri)
I'm running some code in Java on Ubuntu 12.04 LTS 64 Bit (with Gnome Shell), using Oracle JDK 1.8.0_05 via NetBeans8.0.
Read more >
How to fix a frozen Gnome desktop session - AddictiveTips
To restart the Gnome Shell session while everything is frozen, start by pressing Alt + F2 on the keyboard. Executing this keyboard combo...
Read more >
Using the Desktop.open() method from a JavaFX application ...
pdf file works in a Java application, but in a JavaFX application it hangs the application and does not open. This happens on...
Read more >
253594 – Stopping on a breakpoint in JavaFX event handler ...
Add breakpoint to any event handler and my entire desktop freezes, ... Running on Fedora 22 with Gnome 3.16 and stock fedora kernel, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found