Opened 12 years ago

Last modified 12 years ago

#7118 closed defect

Deleting a way in Draw mode leads to ArrayIndexOutOfBoundsException — at Version 6

Reported by: JanRomanCisowski@… Owned by: Don-vip
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. Download an existing way, not connected to another one
  2. Switch do Draw tool
  3. Click on the node at one of its extremities to extend it
  4. Press delete -> Error in loop

What is the expected result? Way is deleted without error

What happens instead? An error is displayed in loop

Please provide any additional information below. Attach a screenshot if
possible.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-10-31 02:32:25
Last Changed Author: stoecker
Revision: 4550
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-10-30 22:19:50 +0100 (Sun, 30 Oct 2011)
Last Changed Rev: 4550

Identification: JOSM/1.5 (4550 pl)
Memory Usage: 272 MB / 455 MB (145 MB allocated, but free)
Java version: 1.7.0_01, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Operating system: Windows 7
Dataset consistency test: No problems found

Plugin: openstreetbugs (26986)
Plugin: turnrestrictions (26986)

java.lang.ArrayIndexOutOfBoundsException: 0
	at org.openstreetmap.josm.data.osm.Way.getNode(Way.java:113)
	at org.openstreetmap.josm.actions.mapmode.DrawAction.computeHelperLine(DrawAction.java:695)
	at org.openstreetmap.josm.actions.mapmode.DrawAction.mouseMoved(DrawAction.java:612)
	at java.awt.AWTEventMulticaster.mouseMoved(Unknown Source)
	at java.awt.Component.processMouseMotionEvent(Unknown Source)
	at javax.swing.JComponent.processMouseMotionEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.Lightw

Change History (6)

comment:1 by Don-vip, 12 years ago

Can you explain what data were you using ? (and attach your .osm file, if possible)

Last edited 12 years ago by Don-vip (previous) (diff)

comment:2 by skyper, 12 years ago

Owner: changed from team to JanRomanCisowski@…
Status: newneedinfo

Similar or same as #7062

comment:3 by stoecker, 12 years ago

Ticket #7062 has been marked as a duplicate of this ticket.

comment:4 by Don-vip, 12 years ago

Ticket #7125 has been marked as a duplicate of this ticket.

comment:5 by Don-vip, 12 years ago

Ok, I am able to reproduce it with both r4550 and r4642:

  • Download an existing way, not connected to another one
  • Switch do Draw tool
  • Click on the node at one of its extremities to extend it
  • Press delete -> Error in loop

Problem is: r4539 introduced a patch to auto-select the way in drawing mode. Using the Del key, the way is cleared but kept selected, causing this callback function to inspect an empty way, leading to this exception.

comment:6 by Don-vip, 12 years ago

Description: modified (diff)
Owner: changed from JanRomanCisowski@… to Don-vip
Status: needinfoassigned
Summary: Jan Roman CisowskiDeleting a way in Draw mode leads to ArrayIndexOutOfBoundsException
Note: See TracTickets for help on using tickets.