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 #856 (closed defect: fixed)

Opened 2011-11-01T09:32:07-05:00

Last modified 2011-11-08T11:31:57-06:00

Exception when running an IJ2 plugin that has parameters with no image

Reported by: bdezonia Owned by: curtis
Priority: major Milestone: imagej2-b1-initial
Component: Plugin Framework Version:
Severity: serious Keywords:
Cc: Blocked By:


Start IJ2. Have NO image open. Run Process > Math > Subtract. An exception is thrown (if the plugin has ever run before and saved preferences):

[WARN ] Cannot convert 'imagej.ui.swing.sdi.display.SwingSdiImageDisplay@7036bb0a' to

at java.lang.Class.getConstructor0(
at java.lang.Class.getConstructor(
at imagej.util.ClassUtils.convert(
at imagej.ext.module.AbstractModuleItem.loadValue(
at imagej.ext.module.ui.AbstractInputHarvester.addInput(
at imagej.ext.module.ui.AbstractInputHarvester.buildPanel(
at imagej.ext.module.ui.AbstractInputHarvester.harvest(
at imagej.ext.plugin.AbstractInputHarvesterPlugin.process(
at imagej.ext.module.ModuleRunner.preProcess(
at java.util.concurrent.FutureTask$Sync.innerRun(
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$

Change History

comment:1 Changed 2011-11-08T10:39:33-06:00 by curtis

(In [4322]) Fix up parameter attributes.

Set visibility to private when possible. For ImageDisplay parameters,
set to required=true and persist=false, to avoid runtime exceptions.
For related tickets, see #838 and #856.

comment:2 Changed 2011-11-08T11:31:53-06:00 by curtis

Fixed in b1e04b7a33e2997aa7ef98d2d1f9bf46fdb8abe1.

comment:3 Changed 2011-11-08T11:31:57-06:00 by curtis

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