Ticket #586 (closed defect: fixed)
Opened 2011-06-08T15:35:27-05:00
Last modified 2012-11-21T09:59:19-06:00
Exception thrown on type convert to RGB Color
Reported by: | bdezonia | Owned by: | bdezonia |
---|---|---|---|
Priority: | major | Milestone: |
|
Component: | UI Framework | Version: | |
Severity: | serious | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #1570 |
Description (last modified by curtis)
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 2011-06-08T16:17:10-05:00 by bdezonia
comment:2 Changed 2011-06-08T16:18:34-05:00 by bdezonia
- Owner changed from bdezonia to curtis
- Status changed from new to assigned
comment:3 Changed 2011-07-27T15:04:40-05:00 by curtis
- Milestone changed from biweekly-2011: Jul-18 to Jul-29 to biweekly-2011: Aug-01 to Aug-12
comment:4 Changed 2011-08-01T12:10:32-05:00 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:6 Changed 2012-02-17T11:05:30-06:00 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:8 Changed 2012-02-27T10:59:05-06:00 by curtis
- Milestone changed from imagej-2.0-beta1 to imagej-2.0-beta2
comment:9 Changed 2012-06-25T15:09:09-05:00 by curtis
- Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta4
- Blocking 1245 added
- Description modified
comment:11 Changed 2012-07-18T14:55:07-05:00 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
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().