NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #923 (closed defect: fixed)

Opened 2012-01-30T16:39:07-06:00

Last modified 2012-01-31T09:52:16-06:00

PixelProbe can exception out

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

Description

There is an issue with modifying a dataset in place that can cause exceptions. Here is one example:

Open Boats. Start the Add Axis plugin but don't finish it yet. Move the dialog over the image. Then select Z & 2. Press the mouse button and then move the mouse around on the image while the image is being rebuilt/redrawn. Exception thrown (below). The PixelProbe has maintained a reference to some Dataset or View data that is no longer appropriately sized.

[ERROR] Exception during event handling:

[Event] imagej.ext.display.event.input.MsMovedEvent
context = imagej.ImageJ@45de530a
consumed = false
display = imagej.ui.swing.sdi.display.SwingSdiImageDisplay@48c4fedd
modifiers =
x = 387
y = 371
[Subscriber] imagej.ext.tool.DefaultToolService@4f262c96
[Method] protected void imagej.ext.tool.DefaultToolService.onEvent(imagej.ext.display.event.input.MsMovedEvent)

java.lang.ArrayIndexOutOfBoundsException: 2

at net.imglib2.display.XYProjector.getLongPosition(XYProjector.java:166)
at imagej.data.display.AbstractDatasetView.getLongPosition(AbstractDatasetView.java:230)
at imagej.data.display.AbstractDataView.getPlanePosition(AbstractDataView.java:104)
at imagej.core.tools.PixelHelper.recordEvent(PixelHelper.java:120)
at imagej.core.tools.PixelProbe.onMouseMove(PixelProbe.java:60)
at imagej.ext.tool.DefaultToolService.onEvent(DefaultToolService.java:244)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at imagej.event.DefaultEventService$ProxySubscriber.onEvent(DefaultEventService.java:224)
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.publish(SwingEventService.java:78)
at org.bushe.swing.event.ThreadSafeEventService.publish(ThreadSafeEventService.java:904)
at imagej.event.DefaultEventService.publish(DefaultEventService.java:90)
at imagej.ui.common.awt.AWTMouseEventDispatcher.mouseMoved(AWTMouseEventDispatcher.java:178)
at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:313)
at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:312)
at java.awt.Component.processMouseMotionEvent(Component.java:6418)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3285)
at java.awt.Component.processEvent(Component.java:6142)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4735)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4295)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:652)
at java.awt.EventQueue$2.run(EventQueue.java:650)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Change History

comment:1 Changed 2012-01-31T09:52:16-06:00 by bdezonia

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

Fixed in 2f9888ee12173b3e90c8ee313e7ba314dd9ff33f.