Broken Fiji in Ubuntu 20.04 with openjdk 8u252

I’ve upgraded a laptop to Ubuntu 20.04, openjdk 8u25 and, when Fiji launches, its menus or toolbar aren’t responsive: it’s like the UI is frozen. Resizing the Fiji window results in lack of repainting, indicative of a locked or stuck event dispatch thread. Any known workarounds?

On the other hand, running$ java -jar jars/ij-1.52p.jar

… results in a working ImageJ.

The issue seems specific of Fiji.

The jconsole shows the AWT-EventQueue-1 thread is blocked:

Name: AWT-EventQueue-1
State: BLOCKED on java.awt.Component$AWTTreeLock@1bde9d17 owned by: main
Total blocked: 10  Total waited: 61

Stack trace: 
java.awt.EventQueue$ Method)$JavaSecurityAccessImpl.doIntersectionPrivilege($JavaSecurityAccessImpl.doIntersectionPrivilege(
java.awt.EventQueue$ Method)$JavaSecurityAccessImpl.doIntersectionPrivilege(

Hi @ctrueden, I’ve run into a strange workaround: launch Fiji like:

$ ./ImageJ-linux64 --ij2

… even though ImageJ1 UI actually loads rather than ImageJ2’s, and the menus and UI work.

The --ij1 also works, but of course it lacks a Script Editor and other context injection-dependent plugins.

Update: --ij2 can also fail, resulting in a frozen UI. There may be a race condition of some kind. Could you remind me of how to manually create a context so that I can pass it to the TextEditor to open it? The automatic context injection isn’t available when invoking the TextEditor from a scripting interpreter.

openjdk 8u25

That’s a super old version of Java! Do you mean 8u252? That’s the newest OpenJDK 8 as of this writing.

What about the version of Java bundled with the Fiji tarball? That one is known-to-work on other Linuxes, so worth testing on Ubuntu 20.04, to narrow down if it’s a bug in Java versus lower-level operating system configuration or components.

Context ctx = new Context();

Indeed I meant java 8u252 (it’s correct in the title).

My has been empty for several years, haven’t tried downloading a fresh fiji. So I’ve done so now, and your intutition is right: java 8u172 (as bundled in the linux amd64 works well consistently: no freezes.

(And thanks for the reminder on the Context!)

For what’s worth, I’ve put up a bug report for Ubuntu 20.04:

1 Like

Thanks a lot for filing that!