Opened 4 years ago
Last modified 3 years ago
#20907 new defect
DataIntegrityProblemException: Deleted node referenced at org.openstreetmap.josm.data.osm.Way.checkNodes (delete action) after undelete
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin undelete | Version: | latest |
Keywords: | template_report deleted node referenced state visibility | Cc: |
Description
What steps will reproduce the problem?
- Use JOSM 17833
- Undelete way 724657392
- Delete way.
- Undelete way 724657391
- 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)
Attachments (0)
Change History (10)
follow-up: 4 comment:1 by , 3 years ago
comment:2 by , 3 years ago
Keywords: | deleted node referenced added |
---|---|
Summary: | JOSM Undelete Plug-in Error → DataIntegrityProblemException: Deleted node referenced at org.openstreetmap.josm.data.osm.Way.checkNodes (delete) after undelete |
comment:3 by , 3 years ago
Summary: | DataIntegrityProblemException: Deleted node referenced at org.openstreetmap.josm.data.osm.Way.checkNodes (delete) after undelete → DataIntegrityProblemException: Deleted node referenced at org.openstreetmap.josm.data.osm.Way.checkNodes (delete action) after undelete |
---|
comment:4 by , 3 years ago
comment:5 by , 3 years ago
Keywords: | state visibility added |
---|
comment:6 by , 3 years ago
Yes, it is similar to #19002.
If I got that right the steps 1-3 mark some of the nodes of the 2nd way 724657391 as deleted.
When way 724657391 is undeleted these nodes keep that "deleted" status. Way 724657391 is not rendered because one or more of its nodes are "deleted".
I guess undelete should check first if objects exist with the "deleted" status and if so, reset that status first.
comment:7 by , 3 years ago
I guess undelete should check first if objects exist with the "deleted" status and if so, reset that status first.
No. Can't do that. It has to create conflicts.
comment:8 by , 3 years ago
Is it not possible to use core functions? E.g. undeleting the objects to a virtual new layer and merging the object to the intended layer.
follow-up: 10 comment:9 by , 3 years ago
Probably that would be best. Two problems:
1) I don't know how to code it because of the complex control flow. Undelete starts tasks which may start other undelete tasks, and none of them seems to know if it is the last to execute.
2) It doesn't seem to work when I do it manually (use new layer in step 4 and merge afterwards). JOSM hangs showing "Merging data ..." and console says
2021-05-24 06:14:37.947 SEVERE: Thread main-worker-0 raised java.lang.IllegalStateException: Already registered a conflict for primitive '{Node id=6796274501 version=2 D lat=41.1965704,lon=-112.0883141}'.
Maybe we already have a ticket for that? If yes, I found at least a way to reproduce it :O
comment:10 by , 3 years ago
Replying to GerdP:
Probably that would be best. Two problems:
1) I don't know how to code it because of the complex control flow. Undelete starts tasks which may start other undelete tasks, and none of them seems to know if it is the last to execute.
So, we need to wait till all undelete tasks have finished downloading to the virtual layer. How does this work with the enabled "new layer" option?
2) It doesn't seem to work when I do it manually (use new layer in step 4 and merge afterwards). JOSM hangs showing "Merging data ..." and console says
2021-05-24 06:14:37.947 SEVERE: Thread main-worker-0 raised java.lang.IllegalStateException: Already registered a conflict for primitive '{Node id=6796274501 version=2 D lat=41.1965704,lon=-112.0883141}'.
Maybe we already have a ticket for that? If yes, I found at least a way to reproduce it :O
Yes, that is #20904 which happened with revert and deleted objects. No undelete plugin involved but almost the same situation: Merging a former delete object to a layer in which this object is deleted.
Interesting as it is somehow similar to #20904. I am not sure if the problem is in the plugin or in core.
Does it help to save the data layer locally before deleting?
Purge is probably the better choice instead of delete but that does not work in all cases like Replace Geometry or Conflation.