Modify

Opened 9 years ago

Closed 9 years ago

#6727 closed defect (fixed)

[PATCH] An object warnings from the validator is able to be deleted twice, making JOSM crash

Reported by: D4RKL3G10N Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: template_report validator delete way patch Cc:

Description (last modified by KalleLampila)

JOSM reports bug after attempting to delete a way that had been deleted before.

What steps will reproduce the problem?

  1. Do a validation check.
  2. Find a warning that indicates overlapping ways. That very same way must have another warning at the same time indicated by the validator.
  3. Delete the way by selecting it from the first warning of the validator.
  4. Go to the second warning, select it again, and attempt to delete it. You will notice when selecting the way that it has zero nodes.

P.S.: Use the dataset to find a way with 2 warnings on it, as explained above. I assume any kind of two warnings can cause the same bug, mustn't be specifically overlapping ways.

What is the expected result?

The way to be deleted, or at least, when it's deleted for the first time, that the second warning disappears.

What happens instead?

JOSM gives a bug warning and requests that a ticket be submitted. It doesn't crash, but isn't able to solve the problem.

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

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-08-01 01:31:34
Last Changed Author: stoecker
Revision: 4279
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-07-31 23:52:49 +0200 (Sun, 31 Jul 2011)
Last Changed Rev: 4279

Identification: JOSM/1.5 (4279 en)
Memory Usage: 46 MB / 494 MB (24 MB allocated, but free)
Java version: 1.6.0_26, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows 7
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (26530)
Plugin: buildings_tools (26530)
Plugin: openstreetbugs (26530)
Plugin: terracer (26406)
Plugin: turnrestrictions (26530)

java.lang.IllegalArgumentException: {Way id=88608120 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

Attachments (2)

dataset.osm (72.9 KB) - added by D4RKL3G10N 9 years ago.
Dataset containing a way that will have 2 warnings on it
0001-fix-6953-Make-sure-that-only-selectable-primitives-a.patch (2.4 KB) - added by KalleLampila 9 years ago.
patch: Make sure that only selectable primitives are select via validator

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by D4RKL3G10N

Attachment: dataset.osm added

Dataset containing a way that will have 2 warnings on it

comment:1 Changed 9 years ago by D4RKL3G10N

Actually if you simply ignore the second warning it should work fine. Plus a strange thing happens where the way is deleted, but the nodes remain, detaching the overlapped way from the nodes as well.

comment:2 Changed 9 years ago by KalleLampila

Description: modified (diff)

This can reproduce even with one warning. You can select object again with same warning even it is deleted.

comment:3 Changed 9 years ago by KalleLampila

Priority: minornormal
Summary: An object with two warnings from the validator is able to be deleted twice, making JOSM crashAn object warnings from the validator is able to be deleted twice, making JOSM crash

Changed 9 years ago by KalleLampila

patch: Make sure that only selectable primitives are select via validator

comment:4 Changed 9 years ago by KalleLampila

Keywords: patch added
Summary: An object warnings from the validator is able to be deleted twice, making JOSM crash[PATCH] An object warnings from the validator is able to be deleted twice, making JOSM crash

comment:5 Changed 9 years ago by stoecker

Resolution: fixed
Status: newclosed

In [4672/josm]:

fix #6727 - patch by Kalle Lampila - fix error with deleted objects

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.