Ticket #810 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Exception thrown by input dialog of ImageMath

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


Open Blobs and Bridge. Launch the IJ2 Image Calculator plugin. Exception (noted below) thrown. I thought we had this bug long ago which had been fixed. Review and reassign as needed.

[WARN ] Cannot convert 'bridge.gif' to imagej.data.Dataset
java.lang.NoSuchMethodException: imagej.data.Dataset.<init>(java.lang.String)

at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getConstructor(Class.java:1657)
at imagej.util.ClassUtils.convert(ClassUtils.java:102)
at imagej.ext.module.AbstractModuleItem.loadValue(AbstractModuleItem.java:145)
at imagej.ext.module.ui.AbstractInputHarvester.addInput(AbstractInputHarvester.java:130)
at imagej.ext.module.ui.AbstractInputHarvester.buildPanel(AbstractInputHarvester.java:84)
at imagej.ext.module.ui.AbstractInputHarvester.harvest(AbstractInputHarvester.java:66)
at imagej.ext.plugin.AbstractInputHarvesterPlugin.process(AbstractInputHarvesterPlugin.java:75)
at imagej.ext.module.ModuleRunner.preProcess(ModuleRunner.java:88)
at imagej.ext.module.ModuleRunner.run(ModuleRunner.java:140)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:118)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

Change History

comment:1 Changed 8 years ago by bdezonia

  • Owner changed from curtis to bdezonia
  • Component changed from ij-ext to ij-plugins

comment:2 Changed 8 years ago by bdezonia

  • Owner changed from bdezonia to curtis
  • Status changed from new to assigned

Curtis noticed this has to do with persistence. Datasets are getting persisted after each run of the plugin with the name of the Dataset. And then later launches of the plugin try to assign Dataset values from persistence and can't figure out how to convert a String to a Dataset.

Changed the plugin to not persist the Dataset names.

We could change the peristence code to skip things like Datasets. Curtis, let me know if my fix is enough or if we need to go further with a general solution. If my implementation is fine then please close.

comment:3 Changed 8 years ago by curtis

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

I filed a new ticket, #838, to track the general problem with persistence. Meanwhile, this specific issue (with the ImageMath plugin) is fixed, so I am closing this ticket.

Note: See TracTickets for help on using tickets.