Modify

Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#23159 closed defect (fixed)

splitting objects breaks the layer sometimes

Reported by: anonymous Owned by: anonymous
Priority: normal Milestone:
Component: Plugin utilsplugin2 Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

unsure how it exactly happens, but it happens as I'm splitting objects with ALT+X

What is the expected result?

What happens instead?

JOSM simply shows that an error occured but I am allowed to continue making edits
But if I save the session after this has happened the file will get corrupted and JOSM will not be able to open it anymore saying "error loading layer Relation with external id 'XXX' refers to a missing primitive with external id 'YYY'"

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

Revision:18822
Build-Date:2023-08-30 11:44:32

Identification: JOSM/1.5 (18822 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19045)
Memory Usage: 430 MB / 2030 MB (196 MB allocated, but free)
Java version: 17.0.8+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.25×1.25)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_IT
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18822, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]
Program arguments: [%UserProfile%\Desktop\pascoli.joz]

Dataset consistency test:
[DELETED REFERENCED] {Relation id=-765 version=0 MVT [way -23491, way -23512, way -23283, way -19756, way -9697, way -22578, way -9699, way -9701, way -9702, way -9703, way -9704, way -9705, way -9706, way -21664, way -21660, way -21656, way -22046, way -22515, way -22685, way -23092]} refers to deleted primitive {Way id=-23512 version=0 MVD nodes=[]}
[WARN - NO NODES] Way {Way id=-9954 version=0 MV nodes=[{Node id=-119275 version=0 V lat=41.2512184,lon=16.4196457}]} has only one node


Plugins:
+ FastDraw (36126)
+ apache-commons (36034)
+ buildings_tools (36126)
+ ejml (35924)
+ geotools (36068)
+ jackson (36034)
+ jaxb (36118)
+ jts (36004)
+ opendata (36126)
+ utilsplugin2 (36126)

Last errors/warnings:
- 00000.750 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.752 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00001.764 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
- 00026.176 W: Cannot lock cache directory. Will not use disk cache
- 00071.640 E: Handled by bug report queue: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Deleted member referenced: {Relation id=-765 version=0 MVT [way -23491, way -23512, way -23283, way -19756, way -9697, way -22578, way -9699, way -9701, way -9702, way -9703, way -9704, way -9705, way -9706, way -21664, way -21660, way -21656, way -22046, way -22515, way -22685, way -23092]} (changed by the following commands: [Sequence: Combine 2 ways], [Sequence: Split Object])



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (24) of main
org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Deleted member referenced: {Relation id=-765 version=0 MVT [way -23491, way -23512, way -23283, way -19756, way -9697, way -22578, way -9699, way -9701, way -9702, way -9703, way -9704, way -9705, way -9706, way -21664, way -21660, way -21656, way -22046, way -22515, way -22685, way -23092]} (changed by the following commands: [Sequence: Combine 2 ways], [Sequence: Split Object])
	at org.openstreetmap.josm.data.osm.Relation.checkMembers(Relation.java:501)
	at org.openstreetmap.josm.data.osm.Relation.fireMembersChanged(Relation.java:513)
	at org.openstreetmap.josm.data.osm.Relation.setMembers(Relation.java:61)
	at org.openstreetmap.josm.command.ChangeMembersCommand.executeCommand(ChangeMembersCommand.java:52)
	at org.openstreetmap.josm.data.UndoRedoHandler.addNoRedraw(UndoRedoHandler.java:300)
	at org.openstreetmap.josm.data.UndoRedoHandler.add(UndoRedoHandler.java:354)
	at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog$DeleteAction.deleteFromRelation(PropertiesDialog.java:1306)
	at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog$DeleteAction.actionPerformed(PropertiesDialog.java:1324)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Attachments (1)

unknown_2023.09.06-18.50_clip_1.mp4 (11.4 MB ) - added by anonymous 15 months ago.
how to reproduce the bug

Change History (9)

comment:1 by taylor.smock, 15 months ago

Component: CorePlugin utilsplugin2

(changed by the following commands: [Sequence: Combine 2 ways], [Sequence: Split Object])

I'm going to guess that it was the combine 2 ways sequence that caused the problem. Unfortunately, I haven't been able to reproduce.

If you can come up with some steps to reproduce, that would be greatly appreciated.

comment:2 by taylor.smock, 15 months ago

Owner: changed from team to anonymous
Status: newneedinfo

by anonymous, 15 months ago

how to reproduce the bug

in reply to:  1 comment:3 by anonymous, 15 months ago

Replying to taylor.smock:

(changed by the following commands: [Sequence: Combine 2 ways], [Sequence: Split Object])

I'm going to guess that it was the combine 2 ways sequence that caused the problem. Unfortunately, I haven't been able to reproduce.

If you can come up with some steps to reproduce, that would be greatly appreciated.

I found out how a way to reproduce consistently the bug

I attached a video showing the steps: it happens both when dealing with outer or inner ways of a multipolygon, the bug doesn't occur if I don't 'keep' the membership in the relation when I'm asked to

comment:4 by taylor.smock, 15 months ago

It would help if I knew which commands you were running. I think I figured it out (I got an exception), but it might be a related but different problem. I'll see if I can figure out a fix for it, and then do a release (if utilsplugin2). If it is JOSM core, I might have to ask you to try one of the josm-latest methods.

Anyway, it looks like you do the following:
1) Create a new multipolygon with an inner and an outer
2) Draw a way starting and ending on the outer
3) Split the outer where the way starts and ends
4) Combine the outside part of the split outer with the new way
5) Keep the relation position
6) Select the inside part of the split outer
7) alt+x to split the relation
8) Select the relation with the new way
9) Delete it from the relation
10) Exception

comment:5 by taylor.smock, 15 months ago

Resolution: fixed
Status: needinfoclosed

In 36130/osm:

Fix #23159: utilsplugin2 Split Object command could cause DataIntegrityProblemException when the split way was part of a relation

comment:6 by taylor.smock, 15 months ago

In 36131/osm:

See #23159 (dist): utilsplugin2 Split Object command could cause DataIntegrityProblemException when the split way was part of a relation

comment:7 by taylor.smock, 15 months ago

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

comment:8 by taylor.smock, 15 months ago

Ticket #18278 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 anonymous.
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.