Ticket #586 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

Exception thrown on type convert to RGB Color

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b4-plugins
Component: UI Framework Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1570

Description (last modified by curtis) (diff)

Open clown image, convert type to some IJ2 type (say Unsigned 12 or 16 bit - just not 8 bit). Results in a 3 channel image. Now convert type to RGB Color (IJ1 plugin). Get a nine channel image (this is correct). During that conversion an exception is thrown. Otherwise everything is correct and the slider channels can be updated correctly. (Note that the luts are repeated R, G, B by design - maybe this should change). Found in 734c746d4c6951bcf7b2c17c9c6a05daafbe3bc0.

Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3

at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at imagej.display.AbstractDatasetView.updateLUTs(AbstractDatasetView.java:274)
at imagej.display.AbstractDatasetView.resetColorTables(AbstractDatasetView.java:153)
at imagej.display.AbstractDatasetView.rebuild(AbstractDatasetView.java:213)
at imagej.display.AbstractDisplayView$2.onEvent(AbstractDisplayView.java:168)
at imagej.display.AbstractDisplayView$2.onEvent(AbstractDisplayView.java:1)
at org.bushe.swing.event.ThreadSafeEventService.publish(ThreadSafeEventService.java:971)

Change History

comment:1 Changed 8 years ago by bdezonia

The problem is that in AbstractDatasetView updateLUTs() is called where the number of LUTs == 9 (the new number of channels) but the number of converters is still 3 (the old number of channels). Code needs to be put in place to rebuild the projector at apprpriate times so converstrs.size() always == getChannelCount().

comment:2 Changed 8 years ago by bdezonia

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

comment:3 Changed 8 years ago by curtis

  • Milestone changed from biweekly-2011: Jul-18 to Jul-29 to biweekly-2011: Aug-01 to Aug-12

comment:4 Changed 8 years ago by curtis

  • Milestone changed from biweekly-2011: Aug-01 to Aug-12 to imagej-2.0-alpha5

Milestone biweekly-2011: Aug-01 to Aug-12 deleted

comment:5 Changed 8 years ago by curtis

  • Status changed from assigned to accepted

comment:6 Changed 8 years ago by bdezonia

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

As of c24a72543f23b745349f2dd0cfcfdb650ff89ef5 that exception is no longer present. I believe I fixed an issue some time ago that made sure LUT indices were always valid.

Anyhow now when you run the type change from RGB to 16-bit Unsigned there is a NPE thrown. It looks like the menu service parameter of the plugin is getting filled in with null.

comment:7 Changed 8 years ago by bdezonia

  • Owner changed from bdezonia to curtis

comment:8 Changed 7 years ago by curtis

  • Milestone changed from imagej-2.0-beta1 to imagej-2.0-beta2

comment:9 Changed 7 years ago by curtis

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta4
  • Blocking 1245 added
  • Description modified (diff)

comment:10 Changed 7 years ago by bdezonia

  • Owner changed from curtis to bdezonia

comment:11 Changed 7 years ago by bdezonia

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

Testing this post beta 3 and there are no longer any apparent issues

comment:12 Changed 7 years ago by bdezonia

  • Blocking 1570 added; 1245 removed
Note: See TracTickets for help on using tickets.