Fiji fails to launch after update

Fiji.app$ ./ImageJ-linux64
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Error while executing the main() method of class 'net.imagej.Main':
java.lang.IllegalArgumentException: Invalid service: sc.fiji.filamentdetector.gui.GUIStatusService
        at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:278)
        at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)
        at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)
        at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)
        at org.scijava.Context.<init>(Context.java:278)
        at org.scijava.Context.<init>(Context.java:234)
        at org.scijava.Context.<init>(Context.java:174)
        at org.scijava.Context.<init>(Context.java:160)
        at net.imagej.ImageJ.<init>(ImageJ.java:77)
        at net.imagej.Main.main(Main.java:54)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:291)
        at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:198)
        at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:89)
Caused by: java.lang.NullPointerException
        at java.util.ArrayList.addAll(ArrayList.java:583)
        at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:193)
        at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:163)
        at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:315)
        at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)
        ... 16 more
2 Likes

The workaround I just found to launch Fiji successfully:

Fiji.app$ ./ImageJ-linux64 --ij1

Except, there is no Script Editor. So instead I read the error message, found that there is a faulty service “filamentdetector”, then search for a jar file in Fiji.app/jars that had such a file:

$ cd Fiji.app/jars/
$ find -name "*jar" -exec grep -Hsli filamentdetector {} \;

… and found:

FilamentDetector-1.0.0.jar

… which I disabled by renaming its extension:

$ mv FilamentDetector-1.0.0.jar FilamentDetector-1.0.0.jar-disabled

… and then launched Fiji successfully, the normal way, and with a Script Editor.

4 Likes

Of course that wasn’t going to be the end of it. Fiji was running inside a vncserver instance for remote desktop access. Upon launching the Script Editor, the window of the latter was larger than the screen, and that resulted in both Fiji crashing and the entire vncserver crashing. Now I’m stuck, because I can’t remember in which config file are the dimensions of the Script Editor saved.

So I took the nuclear option:

$ rm ~/.java/.userPrefs

… and restarted Fiji, and launched the Script Editor successfully.

@albertcardona I am having the same issue on Raspberry Pi. Your workaround can launch Fiji, but the content of menu bar are missing. I tried to click on any random menu and it seems functional. So, when you said that you can launch Fiji, do you see the content in the menu bar as normal?

Hi @ekawahyu,
When launched, the Fiji menu bar looks normal in my desktop.
There is a better workarond than using the param --ij1: rename the extension of the failing jar file under Fiji.app/jars/FilamentDetector-1.0.0.jar as shown above.
Hopefully soon a fixed jar file will be released via the “Help - Update Fiji”. Have you run it recently to check whether that’s the case already?

@albertcardona , I did rename the FileDetector-1.0.0.jar per your suggestion. The --ij1 does not seem to work on Raspberry Pi.

I am following the guide in here to get the latest Fiji (no JRE) installed and run on Raspberry Pi:

And then, I added your workaround (not the --ij1) on top of it. Still no luck with the menu bar. It is basically empty (but functional).

When I use the full version of RaspiOS, I can see the menu bar. But when I install raspberrypi-ui-mods on top of RaspiOS lite version, then Fiji has issue with missing menu bar (only on Fiji). I don’t bother to fix it and stick with the full desktop RaspiOS for now.