Ticket #147 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Polyline array out of bounds exception.

Reported by: sorber Owned by: sorber
Priority: critical Milestone:
Component: visbio Severity:
Keywords: polyline Cc:
Blocked By: Blocking:

Description

This has become visible now that bounds checking has been removed from OverlayNodedObject array mutators.

PolylineTool:191

line.setNodeCoords(selectedNode, dx, dy);

Selected node is -1 if no node selected. For some reason tool is entering adjust mode even when no node is selected. Full stack trace below:

Exception occurred during Behavior execution:
java.lang.ArrayIndexOutOfBoundsException: -1
        at loci.visbio.overlays.OverlayNodedObject.setNodeCoords(OverlayNodedObject.java:465)
        at loci.visbio.overlays.PolylineTool.mouseDrag(PolylineTool.java:191)
        at loci.visbio.overlays.OverlayTransform.displayChanged(OverlayTransform.java:763)
        at loci.visbio.view.TransformLink.displayChanged(TransformLink.java:210)
        at visad.DisplayImpl.notifyListeners(DisplayImpl.java:529)
        at visad.MouseHelper.processEvent(MouseHelper.java:510)
        at visad.MouseHelper.processEvent(MouseHelper.java:136)
        at visad.java3d.MouseBehaviorJ3D.processStimulus(MouseBehaviorJ3D.java:147)
        at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172)
        at javax.media.j3d.J3dThread.run(J3dThread.java:256)

Change History

comment:1 Changed 12 years ago by sorber

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

Fixed a number of small bugs in polyline including this one.

Note: See TracTickets for help on using tickets.