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 #1114 (assigned defect)

Opened 2012-04-13T12:54:00-05:00

Last modified 2012-08-14T10:33:45-05:00

ImageJ2: null pointer exception upon shift-click on a rectangular ROI

Reported by: bdezonia Owned by: dscho
Priority: major Milestone: imagej2-b9-rois
Component: Tools Version:
Severity: serious Keywords:
Cc: sapristi@… Blocked By:
Blocking: #285

Description (last modified by bdezonia)

In the fiji bugzilla database (#419) Albert Cardona reported:

  1. Open an image
  2. Draw a rectangular ROI
  3. Shift-click on the center of the ROI
  4. The terminal reports:

[ERROR] Uncaught exception in thread Thread[AWT-EventQueue-0,6,main]
java.lang.NullPointerException

at

org.jhotdraw.draw.tool.DefaultDragTracker.mouseReleased(DefaultDragTracker.java:172)

at

org.jhotdraw.draw.tool.SelectionTool.mouseReleased(SelectionTool.java:215)

at

org.jhotdraw.draw.tool.DelegationSelectionTool.mouseReleased(DelegationSelectionTool.java:138)

at

imagej.ui.swing.overlay.ToolDelegator.mouseReleased(ToolDelegator.java:119)

at

java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)

at

java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

at java.awt.Component.processMouseEvent(Component.java:6290)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6055)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4653)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4481)
at

java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)

at

java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2482)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
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:621)
at java.awt.EventQueue$2.run(EventQueue.java:619)
at java.security.AccessController.doPrivileged(Native Method)
at

java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
at

java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at

java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at

java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at

java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at

java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Change History

comment:1 Changed 2012-04-24T14:59:50-05:00 by bdezonia

Verified that we are handing JHotDraw a nonnull mouse event. This looks like a JHotDraw bug.

More compact listing of exception follows.

java.lang.NullPointerException

at org.jhotdraw.draw.tool.DefaultDragTracker.mouseReleased(DefaultDragTracker.java:172)
at org.jhotdraw.draw.tool.SelectionTool.mouseReleased(SelectionTool.java:215)
at org.jhotdraw.draw.tool.DelegationSelectionTool.mouseReleased(DelegationSelectionTool.java:138)
at imagej.ui.swing.overlay.ToolDelegator.mouseReleased(ToolDelegator.java:125)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6268)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6033)
at java.awt.Container.processEvent(Container.java:2045)
at java.awt.Component.dispatchEventImpl(Component.java:4629)
at java.awt.Container.dispatchEventImpl(Container.java:2103)
at java.awt.Component.dispatchEvent(Component.java:4455)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
at java.awt.Container.dispatchEventImpl(Container.java:2089)
at java.awt.Window.dispatchEventImpl(Window.java:2517)
at java.awt.Component.dispatchEvent(Component.java:4455)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
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.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
at java.awt.EventQueue$2.run(EventQueue.java:622)
at java.awt.EventQueue$2.run(EventQueue.java:620)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
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)

Last edited 2012-04-24T15:05:09-05:00 by bdezonia

comment:2 Changed 2012-04-25T12:32:27-05:00 by bdezonia

  • Description modified

comment:3 Changed 2012-04-25T12:46:02-05:00 by bdezonia

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

Dscho, maybe you have some insight?

comment:4 Changed 2012-06-08T16:53:03-05:00 by curtis

  • Blocking 1143 added

comment:5 Changed 2012-07-03T13:26:11-05:00 by bdezonia

  • Blocking 285 added

comment:6 Changed 2012-07-03T13:28:24-05:00 by bdezonia

  • Blocking 1143 removed

comment:24 Changed 2012-07-12T14:18:41-05:00 by curtis

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

comment:25 Changed 2012-08-14T10:33:45-05:00 by curtis

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

ROIs will be the focus of beta6.