Ticket #639 (closed defect: fixed)
Opened 2011-06-24T15:57:14-05:00
Last modified 2011-09-26T09:59:26-05:00
ProbeTool can throw exceptions
Reported by: | bdezonia | Owned by: | dscho |
---|---|---|---|
Priority: | major | Milestone: |
|
Component: | Core | Version: | |
Severity: | serious | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
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 2011-06-30T13:57:39-05:00 by bdezonia
comment:2 Changed 2011-07-29T13:54:34-05:00 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 2011-07-29T14:06:08-05:00 by bdezonia
- Milestone changed from biweekly-2011: Jul-18 to Jul-29 to imagej-2.0-beta1
comment:4 Changed 2011-08-04T11:14:52-05:00 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 2011-09-21T14:55:34-05:00 by bdezonia
- Milestone changed from imagej-2.0-beta1 to imagej-2.0-beta2
comment:6 Changed 2011-09-21T18:42:17-05:00 by dscho
- Status changed from new to closed
- Resolution set to fixed
Fixed in 3d3ee0330a1a43fe2f53adb9c0da81d30d599458.
comment:7 Changed 2011-09-26T09:59:15-05:00 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 2011-09-26T09:59:23-05:00 by bdezonia
- Owner changed from bdezonia to dscho
- Status changed from reopened to assigned
comment:9 Changed 2011-09-26T09:59:26-05:00 by bdezonia
- Status changed from assigned to closed
- Resolution set to fixed
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.