Modify

Opened 11 years ago

Closed 8 years ago

#6640 closed defect (fixed)

Exception on deleting a way with 0 points

Reported by: Pepou Owned by: team
Priority: normal Milestone:
Component: Core validator Version: latest
Keywords: template_report delete 0 node Cc: malenki, palinka@…, martin@…, jttt, LM_1

Description (last modified by skyper)

What steps will reproduce the problem?

  1. I've got a 3-fold building, consisting of I think 5 or 6 points. With Validation window the error subtree listed 3 "duplicated" ways exactly one over another.
  2. I've selected it and pressed the "Selection" button. The 3 ways were displayed in the "Sel.: ..." window.
  3. I've selected the first of the ways and pressed the "Selection" button, only this way remained in the "Sel.: ..." window.
  4. Then I've pressed the Delete button.
  5. I think I've repeated this again (from point 2.) - one of the displayed ways had just 0 (zero) points.
  6. Finally I've again selected the same way (with 0 points). After pressing the Delete button the JOSM threw an exception. But remained functional (or at least seems to be.)

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

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-07-11 01:31:35
Last Changed Author: stoecker
Revision: 4223
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-07-10 22:46:41 +0200 (Sun, 10 Jul 2011)
Last Changed Rev: 4223

Identification: JOSM/1.5 (4223 sk)
Memory Usage: 220 MB / 455 MB (81 MB allocated, but free)
Java version: 1.6.0_25, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Windows 7
Dataset consistency test: No problems found

Plugin: DirectDownload (26174)
Plugin: ElevationProfile (26174)
Plugin: OpeningHoursEditor (26284)
Plugin: buildings_tools (26254)
Plugin: openstreetbugs (26299)
Plugin: turnlanes (26316)
Plugin: turnrestrictions (26299)

java.lang.IllegalArgumentException: {Way id=123066507 version=1 MVDT nodes=[]} is already deleted
	at org.openstreetmap.josm.command.DeleteCommand.executeCommand(DeleteCommand.java:117)
	at org.openstreetmap.josm.command.SequenceCommand.executeCommand(SequenceCommand.java:53)
	at org.openstreetmap.josm.data.UndoRedoHandler.addNoRedraw(UndoRedoHandler.java:36)
	at org.openstreetmap.josm.data.UndoRedoHandler.add(UndoRedoHandler.java:58)
	at org.openstreetmap.josm.actions.mapmode.DeleteAction.doActionPerformed(DeleteAction.java:142)
	at org.openstreetmap.josm.actions.DeleteAction.actionPerformed(DeleteAction.java:28)
	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.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(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)

Attachments (2)

example.osm (1009 bytes) - added by skyper 11 years ago.
example
example2.osm (611 bytes) - added by skyper 11 years ago.
example2

Download all attachments as: .zip

Change History (16)

comment:1 Changed 11 years ago by bastiK

It should not be possible to create a way with 0 nodes. If you can reproduce the problem, please attach the *.osm and give a more concrete instructions. Otherwise this will be hard to fix.

comment:2 in reply to:  1 ; Changed 11 years ago by skyper

Replying to bastiK:

It should not be possible to create a way with 0 nodes. If you can reproduce the problem, please attach the *.osm and give a more concrete instructions. Otherwise this will be hard to fix.

If you use the selection history or validator, it is easy to select already deleted objects.

I can reproduce two errors:

  1. If you merge all the middle nodes on the west side onto the north-west edge node of example.osm, you get example2.osm, a square, closed way containing six nodes.
  2. Just select a way, delete it and select it with the selection history -> way with 0 nodes. Delete it -> exception.
Last edited 11 years ago by skyper (previous) (diff)

Changed 11 years ago by skyper

Attachment: example.osm added

example

Changed 11 years ago by skyper

Attachment: example2.osm added

example2

comment:3 in reply to:  2 Changed 11 years ago by Pepou

Replying to skyper:

Replying to bastiK:

It should not be possible to create a way with 0 nodes. If you can reproduce the problem, ...

If you use the selection history or validator, it is easy to select already deleted objects.

Exactly.

Another example:

  1. Create 2 short ways with two endpoints, placed one over another like X. Tag them e.g. building=garages.
  2. Select them and launch Validation - "Overlapping buildings, 2 ways" will apear in the "Validation results" dialog.
  3. Click on the "2 ways" row and press the dialog's "Selecion" button. Both ways will appear in the "Sel.:Rel.:0 / Ways:2 / Points:0" dialog (both "id=0 (2 points)", with "building=garages" in tooltip).
  4. Select one of them in the Selection dialog and press the dialog's "Selection" button (just one of the lines will get selected) and delete the line.
  5. Again in the "Validation results" dialog, click on the "2 ways" row and press the dialog's "Selecion" button. Both ways will again appear in the "Sel.:Rel.:0 / Ways:2 / Points:0" dialog, both "id=0", with "building=garages" in tooltip, but one of them will have just 0 points.

comment:4 Changed 10 years ago by skyper

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

comment:5 Changed 10 years ago by skyper

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

comment:6 Changed 10 years ago by skyper

Cc: malenki palinka@… martin@… jttt added
Component: CoreCore validator
Description: modified (diff)

comment:7 Changed 10 years ago by skyper

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

comment:8 Changed 10 years ago by skyper

Cc: LM_1 added
Keywords: delete 0 node added

comment:9 Changed 10 years ago by akks

In 5036/josm:

Fix exceptions when using selection history (skip nonselectable/deteted primitives) - see #6640

comment:10 Changed 10 years ago by akks

Feel free to revert this patch before "tested" release if anything is broken.
The patch does not let user to select deleted primitives from "selection history" popup list (after undo they can become selectable). "Unselectable now" is shown for selections without selectable primitives.

Last edited 10 years ago by akks (previous) (diff)

comment:11 Changed 10 years ago by akks

In 5037/josm:

Fix exceptions (0-node way) after using validator dialog doubleclick - see #6640

comment:12 Changed 10 years ago by akks

This commit seems to fix http://josm.openstreetmap.de/ticket/6640#comment:3 and #5566 issue.
Main part of validator (select button) seems to be fixed earlier in r4762 (see #6727).

I hope selecting deleted object by doubleclick in validator was not a feature :)

comment:13 Changed 10 years ago by skyper

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

comment:14 Changed 8 years ago by Don-vip

Resolution: fixed
Status: newclosed

Fixed long ago in r5287.

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.