NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #610 (closed defect: fixed)

Opened 2011-06-16T13:19:51-05:00

Last modified 2011-06-16T14:47:12-05:00

IJ.getImage() can return null

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: biweekly-2011: Jun-06 to Jun-17
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

If you do this sequence:

  • start IJ2
  • try to run the Image :: Stacks :: Orthogonal Views command

it complains that no image is open

  • now load T1 head
  • try the command again

it bombs out with an exception (below)
apparently IJ1 getImage() call is returning null

This may be an IJ1 bug. I'll investigate that.

Exception:
Exception in thread "PluginRunner-imagej.legacy.plugin.LegacyPlugin" java.lang.RuntimeException: Macro canceled

at ij.IJ.abort(IJ.java:1736)
at ij.IJ.getImage(IJ.java:1299)
at ij.plugin.Orthogonal_Views.run(Orthogonal_Views.java:78)
at ij.IJ.runPlugIn(IJ.java:156)
at ij.IJ.runPlugIn(IJ.java:139)
at imagej.legacy.plugin.LegacyPlugin.run(LegacyPlugin.java:117)
at imagej.plugin.PluginRunner.run(PluginRunner.java:84)
at imagej.plugin.PluginManager$1.run(PluginManager.java:151)
at java.lang.Thread.run(Thread.java:680)

Change History

comment:1 Changed 2011-06-16T13:22:44-05:00 by bdezonia

It is not an IJ1 bug. Sequence works fine in IJ1 1.45i.

comment:2 Changed 2011-06-16T14:47:12-05:00 by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

Improved error handling of exceptions thrown by IJ1 plugins. The test sequence here works better as of 859549f4d037e0bd516adcee6f53689b541ff6f7.