Error message when using StarDist

Dear all,

Stardist was working beautifully until this morning when I get the following:

[ERROR] java.lang.NullPointerException at java.util.ArrayList.addAll(ArrayList.java:581) at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:193) at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:163) at org.scijava.Context.getParameterFields(Context.java:456) at org.scijava.Context.inject(Context.java:381) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initNetwork(GenericCoreNetwork.java:337) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initialize(GenericCoreNetwork.java:316) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tryToInitialize(GenericCoreNetwork.java:330) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.mainThread(GenericCoreNetwork.java:438) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: net.imagej.tensorflow.TensorFlowService.loadLibrary()V at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.run(GenericCoreNetwork.java:420) at org.scijava.command.CommandModule.run(CommandModule.java:196) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63) at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NoSuchMethodError: net.imagej.tensorflow.TensorFlowService.loadLibrary()V at de.csbdresden.csbdeep.network.model.tensorflow.TensorFlowNetwork.loadLibrary(TensorFlowNetwork.java:110) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initNetwork(GenericCoreNetwork.java:338) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initialize(GenericCoreNetwork.java:316) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tryToInitialize(GenericCoreNetwork.java:330) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.mainThread(GenericCoreNetwork.java:438) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ... 4 more CSBDeep plugin exit (took 47 milliseconds) [ERROR] Module threw exception java.lang.NullPointerException at de.csbdresden.stardist.StarDist2D.splitPrediction(StarDist2D.java:338) at de.csbdresden.stardist.StarDist2D.run(StarDist2D.java:307) at org.scijava.command.CommandModule.run(CommandModule.java:196) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63) at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] java.lang.NullPointerException at java.util.ArrayList.addAll(ArrayList.java:581) at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:193) at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:163) at org.scijava.Context.getParameterFields(Context.java:456) at org.scijava.Context.inject(Context.java:381) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initNetwork(GenericCoreNetwork.java:337) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initialize(GenericCoreNetwork.java:316) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tryToInitialize(GenericCoreNetwork.java:330) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.mainThread(GenericCoreNetwork.java:438) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: net.imagej.tensorflow.TensorFlowService.loadLibrary()V at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.run(GenericCoreNetwork.java:420) at org.scijava.command.CommandModule.run(CommandModule.java:196) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63) at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NoSuchMethodError: net.imagej.tensorflow.TensorFlowService.loadLibrary()V at de.csbdresden.csbdeep.network.model.tensorflow.TensorFlowNetwork.loadLibrary(TensorFlowNetwork.java:110) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initNetwork(GenericCoreNetwork.java:338) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initialize(GenericCoreNetwork.java:316) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tryToInitialize(GenericCoreNetwork.java:330) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.mainThread(GenericCoreNetwork.java:438) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ... 4 more CSBDeep plugin exit (took 62 milliseconds) [ERROR] Module threw exception java.lang.NullPointerException at de.csbdresden.stardist.StarDist2D.splitPrediction(StarDist2D.java:338) at de.csbdresden.stardist.StarDist2D.run(StarDist2D.java:307) at org.scijava.command.CommandModule.run(CommandModule.java:196) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63) at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] java.lang.NullPointerException at java.util.ArrayList.addAll(ArrayList.java:581) at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:193) at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:163) at org.scijava.Context.getParameterFields(Context.java:456) at org.scijava.Context.inject(Context.java:381) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initNetwork(GenericCoreNetwork.java:337) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initialize(GenericCoreNetwork.java:316) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tryToInitialize(GenericCoreNetwork.java:330) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.mainThread(GenericCoreNetwork.java:438) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: net.imagej.tensorflow.TensorFlowService.loadLibrary()V at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.run(GenericCoreNetwork.java:420) at org.scijava.command.CommandModule.run(CommandModule.java:196) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63) at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NoSuchMethodError: net.imagej.tensorflow.TensorFlowService.loadLibrary()V at de.csbdresden.csbdeep.network.model.tensorflow.TensorFlowNetwork.loadLibrary(TensorFlowNetwork.java:110) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initNetwork(GenericCoreNetwork.java:338) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.initialize(GenericCoreNetwork.java:316) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.tryToInitialize(GenericCoreNetwork.java:330) at de.csbdresden.csbdeep.commands.GenericCoreNetwork.mainThread(GenericCoreNetwork.java:438) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ... 4 more CSBDeep plugin exit (took 16 milliseconds) [ERROR] Module threw exception java.lang.NullPointerException at de.csbdresden.stardist.StarDist2D.splitPrediction(StarDist2D.java:338) at de.csbdresden.stardist.StarDist2D.run(StarDist2D.java:307) at org.scijava.command.CommandModule.run(CommandModule.java:196) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63) at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Should I re-install Fiji? It’s running with the latests updates…

M.

Were you using it through a script (and if so what is the script), on what kind of image, and does it still work on other images you previously analyzed?

1 Like

Hi,

I wasn’t using a script. I was using the Fiji plugin as a demo for an imaging course… Had to happen then. It’s an image I’ve used before, hence why I’m surprised it does not work. It worked for one of the participants so I have to assume the problem is with my computer.

I’ve re-installed Fiji (with all my chosen plugins) but it’s still not working. It works on a Fiji where only Stardist (and CSBDeep) is installed, so the problem is a conflict with another plugin.

I’ve now found the problem: I have uninstalled the Tensorflow update site and Stardist works. There’s a conflict somewhere between the two.

2 Likes

Hi, I had the same error.

I removed tensorflow from my update sites but I still have the following error.
It used to work fine until a few days ago. And I have other older Fiji instances where it works fine, but in my most up to date instance it doesn’t work.

@uschmidt83 do you have any suggestion?

(Fiji Is Just) ImageJ 2.0.0-rc-72/1.53c; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 288MB of 55000MB (<1%)
 
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:307)
	at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:166)
	at ij.IJ.runPlugIn(IJ.java)
	at ij.Executer.runCommand(Executer.java:150)
	at ij.Executer.run(Executer.java:68)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:303)
	... 5 more
Caused by: java.lang.NullPointerException
	at de.csbdresden.stardist.StarDist2D.splitPrediction(StarDist2D.java:338)
	at de.csbdresden.stardist.StarDist2D.run(StarDist2D.java:307)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	... 1 more

Thank you

After you’ve removed the TensorFlow update site, have you tried to first disable the StarDist and CSBDeep update sites, and then re-enabled them?

Thank you,
I’m still having some trouble.
Starting from a fresh Fiji installation I install StarDist and CSBDeep update sites and it works fine with the default image but as soon as I put image I get the following (it used to work fine)

(Fiji Is Just) ImageJ 2.1.0/1.53c; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 360MB of 48937MB (<1%)
 
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:307)
	at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:166)
	at ij.IJ.runPlugIn(IJ.java)
	at ij.Executer.runCommand(Executer.java:150)
	at ij.Executer.run(Executer.java:68)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:303)
	... 5 more
Caused by: java.lang.NullPointerException
	at de.csbdresden.stardist.StarDist2D.splitPrediction(StarDist2D.java:338)
	at de.csbdresden.stardist.StarDist2D.run(StarDist2D.java:307)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	... 1 more

I’m not sure what’s happening?

N2V used to work too but I’m having trouble there too when I put image

Sorry, I don’t know what’s going on. Maybe @frauzufall does.