﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
20907	DataIntegrityProblemException: Deleted node referenced at org.openstreetmap.josm.data.osm.Way.checkNodes (delete action) after undelete	anonymous	team	"==== What steps will reproduce the problem?
1. Use JOSM 17833
2. Undelete way 724657392
3. Delete way.
4. Undelete way 724657391
5. Attempt to delete stray node

==== What is the expected result?

That the stray node will be deleted.

==== What happens instead?

Crash.

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-04-27 20:35:33 +0200 (Tue, 27 Apr 2021)
Revision:17833
Build-Date:2021-04-27 21:58:39
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17833 en) Linux Ubuntu 20.04.2 LTS
Memory Usage: 400 MB / 3738 MB (194 MB allocated, but free)
Java version: 11.0.11+9-Ubuntu-0ubuntu2.20.04, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1080 (scaling 1.00×1.00) :0.1 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: ubuntu:GNOME
Java package: openjdk-11-jre:amd64-11.0.11+9-0ubuntu2~20.04
Java ATK Wrapper package: libatk-wrapper-java:all-0.37.1-1
fonts-noto: fonts-noto:all-20200323-1build1~ubuntu20.04.1
VM arguments: [-Djosm.restart=true, -Djava.net.useSystemProxies=true]

Dataset consistency test:
[DELETED REFERENCED] {Way id=724657391 version=4 MT nodes=[{Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}, {Node id=567267494 version=2 M lat=41.1953302,lon=-112.0920546}, {Node id=474327756 version=2 M lat=41.1955402,lon=-112.0913595}, {Node id=6796274499 version=2 D lat=41.195876,lon=-112.0913595}, {Node id=6796274500 version=2 D lat=41.1965138,lon=-112.0893967}, {Node id=6796274501 version=2 D lat=41.1965704,lon=-112.0883141}, {Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}]} refers to deleted primitive {Node id=6796274499 version=2 D lat=41.195876,lon=-112.0913595}
[DELETED REFERENCED] {Way id=724657391 version=4 MT nodes=[{Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}, {Node id=567267494 version=2 M lat=41.1953302,lon=-112.0920546}, {Node id=474327756 version=2 M lat=41.1955402,lon=-112.0913595}, {Node id=6796274499 version=2 D lat=41.195876,lon=-112.0913595}, {Node id=6796274500 version=2 D lat=41.1965138,lon=-112.0893967}, {Node id=6796274501 version=2 D lat=41.1965704,lon=-112.0883141}, {Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}]} refers to deleted primitive {Node id=6796274500 version=2 D lat=41.1965138,lon=-112.0893967}
[DELETED REFERENCED] {Way id=724657391 version=4 MT nodes=[{Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}, {Node id=567267494 version=2 M lat=41.1953302,lon=-112.0920546}, {Node id=474327756 version=2 M lat=41.1955402,lon=-112.0913595}, {Node id=6796274499 version=2 D lat=41.195876,lon=-112.0913595}, {Node id=6796274500 version=2 D lat=41.1965138,lon=-112.0893967}, {Node id=6796274501 version=2 D lat=41.1965704,lon=-112.0883141}, {Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}]} refers to deleted primitive {Node id=6796274501 version=2 D lat=41.1965704,lon=-112.0883141}


Plugins:
+ undelete (35640)

Last errors/warnings:
- 00133.438 E: Thread main-worker-0 raised org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Deleted node referenced: {Way id=724657391 version=4 MT nodes=[{Node id=6152238908 version=2 M lat=41.1960972,lon=-112.0883056}, {Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}, {Node id=567267494 version=2 M lat=41.1953302,lon=-112.0920546}, {Node id=474327756 version=2 M lat=41.1955402,lon=-112.0913595}, {Node id=6796274499 version=2 D lat=41.195876,lon=-112.0913595}, {Node id=6796274500 version=2 D lat=41.1965138,lon=-112.0893967}, {Node id=6796274501 version=2 D lat=41.1965704,lon=-112.0883141}, {Node id=6152238908 version=2 M lat=41.1960972,lon=-112.0883056}]} (changed by the following commands: [Delete 8 objects])
- 00138.736 E: Handled by bug report queue: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Deleted node referenced: {Way id=724657391 version=4 MT nodes=[{Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}, {Node id=567267494 version=2 M lat=41.1953302,lon=-112.0920546}, {Node id=474327756 version=2 M lat=41.1955402,lon=-112.0913595}, {Node id=6796274499 version=2 D lat=41.195876,lon=-112.0913595}, {Node id=6796274500 version=2 D lat=41.1965138,lon=-112.0893967}, {Node id=6796274501 version=2 D lat=41.1965704,lon=-112.0883141}, {Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}]} (changed by the following commands: [Delete 8 objects])



=== REPORTED CRASH DATA ===
sequence_information:
 - sequence_name: Sequence: Delete
 - sequence_command: Change nodes of ‎residential (landuse)‎ (6 nodes)‌
 - sequence_index: 0
 - sequence_commands: [org.openstreetmap.josm.command.ChangeNodesCommand;org.openstreetmap.josm.command.DeleteCommand]
 - sequence_commands_descriptions: [Change nodes of ‎residential (landuse)‎ (6 nodes)‌;Delete node 6152238908]

BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (19) of main
org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Deleted node referenced: {Way id=724657391 version=4 MT nodes=[{Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}, {Node id=567267494 version=2 M lat=41.1953302,lon=-112.0920546}, {Node id=474327756 version=2 M lat=41.1955402,lon=-112.0913595}, {Node id=6796274499 version=2 D lat=41.195876,lon=-112.0913595}, {Node id=6796274500 version=2 D lat=41.1965138,lon=-112.0893967}, {Node id=6796274501 version=2 D lat=41.1965704,lon=-112.0883141}, {Node id=319643627 version=3 V lat=41.1953142,lon=-112.0882935}]} (changed by the following commands: [Delete 8 objects])
	at org.openstreetmap.josm.data.osm.Way.checkNodes(Way.java:553)
	at org.openstreetmap.josm.data.osm.Way.fireNodesChanged(Way.java:571)
	at org.openstreetmap.josm.data.osm.Way.setNodes(Way.java:67)
	at org.openstreetmap.josm.command.ChangeNodesCommand.modifyWay(ChangeNodesCommand.java:45)
	at org.openstreetmap.josm.command.AbstractNodesCommand.executeCommand(AbstractNodesCommand.java:55)
	at org.openstreetmap.josm.command.SequenceCommand.executeCommand(SequenceCommand.java:112)
	at org.openstreetmap.josm.data.UndoRedoHandler.addNoRedraw(UndoRedoHandler.java:300)
	at org.openstreetmap.josm.data.UndoRedoHandler.add(UndoRedoHandler.java:354)
	at org.openstreetmap.josm.actions.mapmode.DeleteAction.doActionPerformed(DeleteAction.java:164)
	at org.openstreetmap.josm.actions.DeleteAction.actionPerformed(DeleteAction.java:73)
	at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
	at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2900)
	at java.desktop/javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:311)
	at java.desktop/javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:266)
	at java.desktop/javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2993)
	at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:2985)
	at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2862)
	at java.desktop/java.awt.Component.processEvent(Component.java:6412)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:870)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1139)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1009)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:835)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4892)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
}}}
"	defect	new	normal		Plugin undelete	latest		template_report deleted node referenced state visibility	
