﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23123	Manipulating relations with the relation tool can lead to an exception	watmildon	Zverikk	"==== What steps will reproduce the problem?
1. I was simplifying some geometry using the ""reconstruct way"" tool in the Relation Toolbox
2. Prior to this I combined a bunch of ways and cancelled the operation when I discovered it would impact 2 or more relations that needed to be simplified first.
3. This exception happened after I tried to delete a relation that had been part of the ways I was combining

I have included the osm file from that session but it doesn't repro the issue.

==== What is the expected result?
No exception

==== What happens instead?
Exception

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Revision:18789
Build-Date:2023-08-01 13:06:18

Identification: JOSM/1.5 (18789 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19045)
Memory Usage: 2808 MB / 4088 MB (445 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 1440×2560 (scaling 1.00×1.00) \Display1 3840×2160 (scaling 1.50×1.50)
Maximum Screen Size: 3840×2560
Best cursor sizes: 16×16→48×48, 32×32→48×48
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18789, --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]

Dataset consistency test:
[DELETED REFERENCED] {Relation id=11270772 version=2 VT [way 822900626, way 822903888, way 822903889, way 822900622, way 822900621]} refers to deleted primitive {Way id=822900626 version=2 MVD nodes=[]}
[DELETED REFERENCED] {Relation id=11270772 version=2 VT [way 822900626, way 822903888, way 822903889, way 822900622, way 822900621]} refers to deleted primitive {Way id=822903889 version=1 MVD nodes=[]}


Plugins:
+ FastDraw (36097)
+ FixAddresses (36062)
+ MapRoulette (21)
+ apache-commons (36034)
+ apache-http (35924)
+ buildings_tools (36097)
+ conflation (0.6.11)
+ continuosDownload (1.3.4)
+ contourmerge (v0.1.9)
+ damn (0.12.1)
+ ejml (35924)
+ geotools (36068)
+ gridify (1606242219)
+ imagery_offset_db (36079)
+ jackson (36034)
+ javafx (36086)
+ jaxb (35952)
+ jna (36005)
+ jts (36004)
+ log4j (36045)
+ mapwithai (810)
+ opendata (36097)
+ reltoolbox (36103)
+ reverter (36066)
+ tageditor (36097)
+ terracer (36079)
+ todo (132)
+ turnrestrictions (36097)
+ undelete (36066)
+ utilsplugin2 (36097)
+ wikipedia (605)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/TigerReviewedNo&zip=1
+ %UserProfile%\Address Tags Validator - Highlight unaddressed
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Admin_Boundaries&zip=1
+ C:\OSM\mapwiaipaintstyle

Last errors/warnings:
- 81671.895 W: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: Connect timed out
- 82271.868 W: java.net.SocketTimeoutException: Connect timed out
- 82271.870 W: Already here java.net.SocketTimeoutException: Connect timed out
- 82271.872 E: java.net.SocketTimeoutException: Connect timed out
- 82271.874 W: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: Connect timed out
- 82571.887 W: java.net.SocketTimeoutException: Connect timed out
- 82571.889 W: Already here java.net.SocketTimeoutException: Connect timed out
- 82571.892 E: java.net.SocketTimeoutException: Connect timed out
- 82571.894 W: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: Connect timed out
- 88749.279 E: Handled by bug report queue: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Deleted member referenced: {Relation id=11270772 version=2 VT [way 822900626, way 822903888, way 822903889, way 822900622, way 822900621]} (changed by the following commands: [Sequence: Reconstruct polygons from relation multipolygon (""water"", 6 members)])



=== 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=11270772 version=2 VT [way 822900626, way 822903888, way 822903889, way 822900622, way 822900621]} (changed by the following commands: [Sequence: Reconstruct polygons from relation multipolygon (""water"", 6 members)])
	at org.openstreetmap.josm.data.osm.Relation.checkMembers(Relation.java:496)
	at org.openstreetmap.josm.data.osm.Relation.fireMembersChanged(Relation.java:508)
	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.AbstractButton.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.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)
}}}
"	defect	closed	normal		Plugin reltoolbox		duplicate	template_report	
