Ticket #639 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

ProbeTool can throw exceptions

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


Create a new IJ2 image. Now drag the lower right corner so that some white fill exists between the image and the window border. Turn on probe. Probing in the white area throws exceptions such as:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 262395

at net.imglib2.img.basictypeaccess.array.ByteArray.getValue(ByteArray.java:59)
at net.imglib2.type.numeric.integer.GenericByteType.getValue(GenericByteType.java:73)
at net.imglib2.type.numeric.integer.UnsignedByteType.get(UnsignedByteType.java:93)
at net.imglib2.type.numeric.integer.UnsignedByteType.getIntegerLong(UnsignedByteType.java:99)
at net.imglib2.type.numeric.integer.AbstractIntegerType.getRealDouble(AbstractIntegerType.java:15)
at imagej.core.tools.ProbeTool.onMouseMove(ProbeTool.java:113)
at imagej.tool.ToolManager$6.onEvent(ToolManager.java:201)
at imagej.tool.ToolManager$6.onEvent(ToolManager.java:1)

Change History

comment:1 Changed 8 years ago by bdezonia

Note: it turns out it doesn't always throw exceptions. Need to repeatedly move the mouse out of the window and then into white area and then into image area. Repeatedly move around like this and occasionally an exception is thrown. Haven't yet figured out the pattern.

comment:2 Changed 8 years ago by bdezonia

Tested its still an issue in f1ce43ef8a7217de7cf5e115ee066707ba658ab8. It only happens about once every 20 times you sweep over the image.

This code is using canvas scaling code. Changes there (for instance to fix zooming bugs) could fix this. See #628.

comment:3 Changed 8 years ago by bdezonia

  • Milestone changed from biweekly-2011: Jul-18 to Jul-29 to imagej-2.0-beta1

comment:4 Changed 8 years ago by bdezonia

Easily reproducable. Open CLown. Resize window so it has a little whitespace on bottom and right. Now move mouse up and down crossing white space below image and going into/out image. Usually when crossing y = 200 (the image height) you can generate an exception. I've commented the issue a bit and left debugging code in ProbeTool source code. Apparently there is a scaling bug of some sort in the ImageCanvas/CanvasHelper code (that only seems to affect Y).

comment:5 Changed 8 years ago by bdezonia

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

comment:6 Changed 8 years ago by dscho

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

Fixed in 3d3ee0330a1a43fe2f53adb9c0da81d30d599458.

comment:7 Changed 7 years ago by bdezonia

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Milestone changed from imagej-2.0-beta2 to imagej-2.0-beta1

comment:8 Changed 7 years ago by bdezonia

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

comment:9 Changed 7 years ago by bdezonia

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.