Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ellipsoid Factor throws a Null Pointer Exception when other images are open #269

Open
mdoube opened this issue Jul 1, 2020 · 2 comments
Assignees
Labels

Comments

@mdoube
Copy link
Member

mdoube commented Jul 1, 2020

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52p; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 645MB of 48839MB (1%)
 
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:309)
	at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:163)
	at ij.IJ.runPlugIn(IJ.java)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	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:305)
	... 5 more
Caused by: java.lang.NullPointerException
	at org.bonej.wrapperPlugins.EllipsoidFactorWrapper.getSkeletonPoints(EllipsoidFactorWrapper.java:449)
	at org.bonej.wrapperPlugins.EllipsoidFactorWrapper.runEllipsoidOptimisation(EllipsoidFactorWrapper.java:404)
	at org.bonej.wrapperPlugins.EllipsoidFactorWrapper.run(EllipsoidFactorWrapper.java:211)
	at org.scijava.command.CommandModule.run(CommandModule.java:199)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
	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

This exception is thrown if there is another image open and active (e.g. a thickness map of the binary image stack ) when Ellipsoid Factor completes its run. It appears that the plugin expects that the input binary stack is either the only open image or is active, in order to finalise result display. This is not a safe assumption.

I am getting this error on Fiji with BoneJ 7.0.3 in Windows 10. Can't update at the moment because the update site server is down.

@alessandrofelder
Copy link
Member

alessandrofelder commented Jul 1, 2020

Interesting!

I've tried to reproduce on my machine, but can't. On Dell Laptop with Windows 10, freshly installed FIJI + installed latest ux-tweaks BoneJ version.

  • I open emu.tif and run Thickness with show thickness maps ticked.
  • I make emu.tif the active image and run EF.
  • As soon as EF is running, I click on the Thickness Map to make it the active image.
  • I don't see a NPE.

What am I missing?
NPE seems to be more linked to calling the legacy skeletonisation command rather than assumptions about the inputs, no? My suspicion is that I don't pass the input image to that command properly - is that possible?

@mdoube
Copy link
Member Author

mdoube commented Jul 2, 2020

I can't reproduce on up-to-date BoneJ on Ubuntu. Will try again on my Windows user installation once updating is possible again. In the meantime, not worth spending any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants