Ticket #1137 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Clear/Clear Outside misbehaving

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b4-plugins
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1345

Description

open clown
draw overlay
run edit Clear

pixels changed inside roi
(drawn in last color set in IJ2 rather than curr fg/bg values color)
(see OptionsChannels to see that two different values exist)

run edit Clear Outside\

interior roi pixels revert
exterior drawn in last color again
exception thrown:

[ERROR] ImageJ 1.x plugin threw exception
java.lang.IndexOutOfBoundsException: Index: 0, Size: 3

at java.util.ArrayList.rangeCheck(ArrayList.java:571)
at java.util.ArrayList.get(ArrayList.java:349)
at imagej.data.display.AbstractDatasetView.updateLUTs(AbstractDatasetView.java:324)
at imagej.data.display.AbstractDatasetView.rebuild(AbstractDatasetView.java:225)
at imagej.data.display.AbstractImageDisplay.rebuild(AbstractImageDisplay.java:137)
at imagej.ext.display.AbstractDisplay.update(AbstractDisplay.java:113)
at imagej.data.display.AbstractImageDisplay.update(AbstractImageDisplay.java:233)
at imagej.data.display.DefaultOverlayService.removeOverlay(DefaultOverlayService.java:160)
at imagej.legacy.translate.OverlayHarmonizer.updateDisplay(OverlayHarmonizer.java:140)
at imagej.legacy.translate.Harmonizer.updateDisplay(Harmonizer.java:178)
at imagej.legacy.plugin.LegacyPlugin.updateDisplaysFromImagePluses(LegacyPlugin.java:307)
at imagej.legacy.plugin.LegacyPlugin.run(LegacyPlugin.java:161)
at imagej.ext.plugin.PluginModule.run(PluginModule.java:151)
at imagej.ext.module.ModuleRunner.run(ModuleRunner.java:149)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:119)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

Change History

comment:1 Changed 7 years ago by bdezonia

  • Owner changed from bdezonia to curtis
  • Status changed from new to assigned
  • Milestone changed from imagej-2.0.0-beta2 to imagej-2.0.0-beta3

Lets not worry about the fill value in this ticket. I'll address that elsewhere.

You can get a number of exceptions from this sequence. Clear Outside or Clear work by themselves fine. Its when you do one after the other that exceptions pop up. The following is common. Note its in code recently modified by Tobias and worked on by Grant and Curtis in the past,

[ERROR] Exception during event handling:

[Event] imagej.data.event.DatasetUpdatedEvent
context = imagej.ImageJ@20dccfab
consumed = false
object = clown.jpg
[Subscriber] imagej.ui.swing.sdi.display.SwingSdiImageDisplay@7fb2380e
[Method] protected void imagej.data.display.AbstractImageDisplay.onEvent(imagej.data.event.DataUpdatedEvent)

java.lang.IllegalArgumentException: Expected 3 converters but got 6

at net.imglib2.display.CompositeXYProjector.<init>(CompositeXYProjector.java:92)
at imagej.data.display.AbstractDatasetView.setupProjector(AbstractDatasetView.java:286)
at imagej.data.display.AbstractDatasetView.rebuild(AbstractDatasetView.java:222)
at imagej.data.display.AbstractImageDisplay.rebuild(AbstractImageDisplay.java:137)
at imagej.ext.display.AbstractDisplay.update(AbstractDisplay.java:113)
at imagej.data.display.AbstractImageDisplay.update(AbstractImageDisplay.java:233)
at imagej.data.display.AbstractImageDisplay.onEvent(AbstractImageDisplay.java:564)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at imagej.event.DefaultEventService$ProxySubscriber.onEvent(DefaultEventService.java:225)
at imagej.event.DefaultEventService$ProxySubscriber.onEvent(DefaultEventService.java:1)
at org.bushe.swing.event.ThreadSafeEventService.publish(ThreadSafeEventService.java:971)
at org.bushe.swing.event.SwingEventService.access$001(SwingEventService.java:31)
at org.bushe.swing.event.SwingEventService$1.run(SwingEventService.java:88)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647)
at java.awt.EventQueue.access$000(EventQueue.java:96)
at java.awt.EventQueue$1.run(EventQueue.java:608)
at java.awt.EventQueue$1.run(EventQueue.java:606)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:617)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

comment:2 Changed 7 years ago by curtis

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta4

comment:3 Changed 7 years ago by dscho

  • Blocking 1345 added

comment:4 Changed 7 years ago by bdezonia

Testing post beta 3: The exception error is gone.

Remaining issue: Open clown and draw rect. Run Clear and interior is filled with background (correct). Follow it with Clear Outside. The outer region is filled with background (correct). The interior region is restored to a view of the original clown data (incorrect). In IJ1 the central region stays as the background color from the previous clear.

comment:5 Changed 7 years ago by bdezonia

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

Fixed pixel munging error with commit 1e54c82e0cb643dcd1230aec3f24603ba6a66e36

comment:6 Changed 7 years ago by bdezonia

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:7 Changed 7 years ago by bdezonia

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

comment:8 Changed 7 years ago by bdezonia

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.