Opened 14 years ago

Closed 14 years ago

#4085 closed defect (fixed)

[Patch] Exception when trying to delete a way which has duplicate nodes

Reported by: Daeron Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc:


An expetion occurs when trying to delete a way that has duplicate nodes (the same node appears multiple times in the way, eg. a way with node list: (1,1,2)).

Build-Date: 2009-12-04 13:44:48		
Revision: 2568
Is-Local-Build: true

Memory Usage: 63 MB / 910 MB (32 MB allocated, but free)
Java version: 1.6.0_17

Dataset consistency test:
No problems found

Plugins: PicLayer,lakewalker,measurement,utilsplugin,validator,wmsplugin
Plugin PicLayer Version: 18597
Plugin lakewalker Version: 18880
Plugin measurement Version: 18595
Plugin utilsplugin Version: 18926
Plugin validator Version: 18928
Plugin wmsplugin Version: 18762

	at java.util.AbstractList.remove(
	at java.util.AbstractList$Itr.remove(
	at java.util.AbstractCollection.removeAll(
	at org.openstreetmap.josm.command.DeleteCommand.computeNodesToDelete(
	at org.openstreetmap.josm.command.DeleteCommand.delete(
	at org.openstreetmap.josm.command.DeleteCommand.delete(
	at org.openstreetmap.josm.actions.mapmode.DeleteAction.doActionPerformed(
	at org.openstreetmap.josm.actions.mapmode.DeleteAction.actionPerformed(
	at javax.swing.SwingUtilities.notifyAction(
	at javax.swing.JComponent.processKeyBinding(
	at javax.swing.KeyboardManager.fireBinding(
	at javax.swing.KeyboardManager.fireKeyboardAction(
	at javax.swing.JComponent.processKeyBindingsForAllComponents(
	at javax.swing.JComponent.processKeyBindings(
	at javax.swing.JComponent.processKeyEvent(
	at java.awt.Component.processEvent(
	at java.awt.Container.processEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.KeyboardFocusManager.redispatchEvent(
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.EventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(

Attached is an osm-file that contains such way.

Attachments (2)

waydelete.osm (355 bytes) - added by Daeron 14 years ago.
DeleteCommandException.patch (1.5 KB) - added by mjulius 14 years ago.

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by Daeron

Attachment: waydelete.osm added

comment:1 Changed 14 years ago by mjulius

Summary: Exception when trying to delete a way which has duplicate nodes[Patch] Exception when trying to delete a way which has duplicate nodes

This is caused by OsmPrimitive.getReferrers() returning immutable lists.

The attached patch should fix that.

Changed 14 years ago by mjulius

comment:2 Changed 14 years ago by stoecker

Resolution: fixed
Status: newclosed

(In [2574]) fix #4085, #4084 - patch by mjulius - fix exception

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.