Ticket #815 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Exception when adding axes: possible race condition

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


Open Boats. Add axes (size 2 each) in this order (polarization, z, t). Each time an axis is added an exception is dumped to the console. The bad array index always equals the last one in the changed dataset which may be one beyond the view's index. The view may have not yet been updated and thus cannot find a given dimension.

Caused by: java.lang.ArrayIndexOutOfBoundsException: 4

at net.imglib2.display.XYProjector.getLongPosition(XYProjector.java:166)
at imagej.data.display.AbstractDatasetView.setPosition(AbstractDatasetView.java:192)
at imagej.data.display.AbstractImageDisplay.update(AbstractImageDisplay.java:133)
at imagej.ui.swing.display.AbstractSwingImageDisplay$2.onEvent(AbstractSwingImageDisplay.java:164)
at imagej.ui.swing.display.AbstractSwingImageDisplay$2.onEvent(AbstractSwingImageDisplay.java:1)
at org.bushe.swing.event.ThreadSafeEventService.publish(ThreadSafeEventService.java:971)

Change History

comment:1 Changed 8 years ago by bdezonia

42 hours later, at rev 4116, cannot duplicate

comment:2 Changed 8 years ago by bdezonia

I think earlier I had tested with rev 4107 or later. Since no code changes since then seem relevant this does seem like a race condition.

comment:3 Changed 8 years ago by bdezonia

Tested with f2539ec742ef9a8957c832faea72e3caacec11cd and still exists. Just adding a Z axis size 2 to Boats caused it.

[ERROR] Exception during event handling:

[Event] imagej.data.event.DatasetRestructuredEvent
context = 0
consumed = false
object = boats.gif
[Subscriber] imagej.ui.swing.sdi.display.SwingSdiImageDisplay@5d66bddc
[Method] protected void imagej.data.display.AbstractImageDisplay.onEvent(imagej.data.event.DatasetRestructuredEvent)

java.lang.ArrayIndexOutOfBoundsException: 2

at net.imglib2.display.XYProjector.getLongPosition(XYProjector.java:166)
at imagej.data.display.AbstractDatasetView.setPosition(AbstractDatasetView.java:194)
at imagej.data.display.AbstractImageDisplay.update(AbstractImageDisplay.java:226)
at imagej.data.display.AbstractImageDisplay.onEvent(AbstractImageDisplay.java:382)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

comment:4 Changed 8 years ago by bdezonia

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

Found issue and fixed in 9de2360eff61f119722b544de551596bd195da31

Note: See TracTickets for help on using tickets.