Modify

Opened 16 years ago

Closed 16 years ago

#1440 closed defect (fixed)

IndexOutOfBoundsException when trying to split a way

Reported by: Chriki Owned by: framm
Priority: critical Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

Hi,

with the below version of JOSM I'm always getting an IndexOutOfBoundsException when trying to split a way -- no matter if using the "P" shortcut or the respective menu item.

Here are the error details:

Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 815
Node Kind: directory
Last Changed Author: stoecker
Last Changed Rev: 815
Last Changed Date: 2008-08-21 00:57:52 +0200 (Thu, 21 Aug 2008)


java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.RangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at org.openstreetmap.josm.actions.SplitWayAction.actionPerformed(SplitWayAction.java:99)
	at javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at javax.swing.JComponent.processKeyBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
	at javax.swing.JComponent.processKeyBindings(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Cheers,
Chriki

Attachments (1)

testcase.osm (582 bytes ) - added by Chriki 16 years ago.
Minimal testcase for the problem

Download all attachments as: .zip

Change History (4)

comment:1 by anonymous, 16 years ago

Does that happen for all ways or only for a specific one? I can't reproduce this.

by Chriki, 16 years ago

Attachment: testcase.osm added

Minimal testcase for the problem

in reply to:  1 comment:2 by Chriki, 16 years ago

Replying to anonymous:

Does that happen for all ways or only for a specific one? I can't reproduce this.

I have added a minimal testcase for the problem. The OSM file was derived from real data that I have gotten from my GPS receiver; it has only been "anonymized" a bit. When removing the way with ID -4 from the file all works flawlessly again.

HTH,
Chriki

comment:3 by anonymous, 16 years ago

Resolution: fixed
Status: newclosed

Thanks for the helpful analysis.

Fixed in r846.

Remember to delete the way -4 if it has been moved to the OSM server already, as an empty way should not be in the database :-)

If you created that way with JOSM, that would be another bug.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.