Modify

Opened 5 years ago

Closed 4 years ago

Last modified 7 months ago

#19783 closed defect (fixed)

Applying conflict resolution where both sides have the node as deleted fails

Reported by: johannes@… Owned by: team
Priority: minor Milestone: 20.12
Component: Core Version:
Keywords: template_report conflict deleted Cc:

Description

What steps will reproduce the problem?

  1. Download new map data in which both the server and local data has a node as deleted.
  2. Click Resolve on that conflict.
  3. Click Apply Resolution

What is the expected result?

The conflict is removed, and nothing about the node is changed since it's deleted on both sides.

What happens instead?

It throws an exception.

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

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-09-06 16:54:59 +0200 (Sun, 06 Sep 2020)
Build-Date:2020-09-07 01:30:48
Revision:17013
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17013 en_GB) Windows 10 64-Bit
OS Build number: Windows 10 Enterprise 1909 (18363)
Memory Usage: 1085 MB / 1820 MB (505 MB allocated, but free)
Java version: 1.8.0_261-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1080 (scaling 1.0x1.0)
Maximum Screen Size: 1920x1080
Best cursor sizes: 16x16 -> 32x32, 32x32 -> 32x32
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=%UserProfile%\Downloads\josm.jnlp, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=NULL,2048m, -Djnlpx.splashport=54465, -Djnlpx.jvm=<java.home>\bin\javaw.exe]
Dataset consistency test: No problems found

Plugins:
+ ImproveOsm (199)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1

Validator rules:
+ https://josm.openstreetmap.de/josmfile?page=Rules/PublicTransportGtfs&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/MissingWeekdays&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/OSMLint&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/KeepRight&zip=1

Last errors/warnings:
- 00058.879 W: Unable to find supported projection for layer Lantmäteriet ortofoto. Using EPSG:3857.
- 00058.880 W: Unable to find supported projection for layer Lantmäteriet ortofoto. Using EPSG:3857.
- 00079.658 W: Unable to find supported projection for layer Lantmäteriet ortofoto. Using EPSG:3006.
- 01650.381 W: Conflicts detected - <html>There were 2 conflicts detected.</html>
- 01652.309 W: Conflicts detected - <html>There was 1 conflict detected.</html>
- 01678.704 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out
- 42381.436 E: Handled by bug report queue: java.lang.IllegalArgumentException: Parameter 'data' must not be null
- 42452.084 E: Handled by bug report queue: java.lang.IllegalArgumentException: Parameter 'data' must not be null
- 42486.931 E: Handled by bug report queue: java.lang.IllegalArgumentException: Parameter 'data' must not be null


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-2 (60) of javawsApplicationThreadGroup
java.lang.IllegalArgumentException: Parameter 'data' must not be null
	at org.openstreetmap.josm.tools.CheckParameterUtil.ensureParameterNotNull(CheckParameterUtil.java:26)
	at org.openstreetmap.josm.command.Command.<init>(Command.java:138)
	at org.openstreetmap.josm.command.conflict.ConflictResolveCommand.<init>(ConflictResolveCommand.java:32)
	at org.openstreetmap.josm.command.conflict.VersionConflictResolveCommand.<init>(VersionConflictResolveCommand.java:31)
	at org.openstreetmap.josm.gui.conflict.pair.ConflictResolver.buildResolveCommand(ConflictResolver.java:298)
	at org.openstreetmap.josm.gui.dialogs.ConflictResolutionDialog$ApplyResolutionAction.actionPerformed(ConflictResolutionDialog.java:206)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(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$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.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.pumpEventsForFilter(Unknown Source)
	at java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.awt.Dialog.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:459)
	at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:255)
	at org.openstreetmap.josm.gui.dialogs.ConflictDialog.resolve(ConflictDialog.java:210)
	at org.openstreetmap.josm.gui.dialogs.ConflictDialog.access$200(ConflictDialog.java:80)
	at org.openstreetmap.josm.gui.dialogs.ConflictDialog$ResolveAction.actionPerformed(ConflictDialog.java:467)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(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$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.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 (1)

19783.patch (3.5 KB ) - added by GerdP 5 years ago.
use newer version when both are deleted

Download all attachments as: .zip

Change History (12)

comment:1 by skyper, 5 years ago

There should be no conflict created at all. This situation with "deleted" on both sides should never occure.

comment:2 by skyper, 5 years ago

Keywords: conflict deleted added

in reply to:  1 comment:3 by skyper, 5 years ago

Replying to skyper:

There should be no conflict created at all. This situation with "deleted" on both sides should never occure.

Oh, I can reproduce this situation, though I do not get an exception but can solve the conflict.

Anyway, this conflict should not be created.

comment:4 by skyper, 5 years ago

To reproduce,

  1. open location https://api.openstreetmap.org/api/0.6/node/2761370960/1
  2. delete node
  3. search all objects for deleted
  4. update selection

by GerdP, 5 years ago

Attachment: 19783.patch added

use newer version when both are deleted

comment:5 by GerdP, 5 years ago

There is a small glitch with this patch. The deleted node has version 2 but the undo/redo stack shows version 1. If you undo and redo the node is again version 1 and upload is enabled.

Last edited 5 years ago by GerdP (previous) (diff)

comment:6 by GerdP, 4 years ago

Work on patch continued in #20091 including unit test.

comment:7 by mdk, 4 years ago

It looks very similar to #10297

comment:8 by GerdP, 4 years ago

Resolution: fixed
Status: newclosed

In 17341/josm:

fix #20091: Downloading incomplete, deleted members leads to data inconsitency

  • changes the logic of "download members" so that all non-new members of all selected relations are downloaded. It doesn't recurse down on child relations. The old code did a download of members using the relation id, so the server returned the members of the version as known by the server. Disadvantage: The new code is slower.
  • changes and simplifies DataSetMerger to fix the wrong handling of deleted objects in the source
  • additional unit tests to cover more branches in mergeById()
  • also fixes #19783

comment:9 by GerdP, 4 years ago

Milestone: 20.12

comment:10 by GerdP, 4 years ago

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

comment:11 by skyper, 7 months ago

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

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.