Modify

Opened 3 years ago

Last modified 3 years ago

#21451 reopened defect

Unhandled exception: deleted relation is still listed in other relations

Reported by: kudlav Owned by: Don-vip
Priority: minor Milestone: 21.10
Component: Core Version:
Keywords: template_report relation child Cc:

Description

What steps will reproduce the problem?

  1. Open child relation from "Edit relation"
  2. Delete it
  3. Go back to the parent, the deleted relation is still listed
  4. Open child relation again
  5. Delete it
  6. An unhandled exception occurs

What is the expected result?

Child relation should be deleted and removed from other relations.

What happens instead?

Child relation is not deleted, it's still there as empty relation with original tags and it's not removed from any other relation.

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-09-03 03:12:33 +0200 (Fri, 03 Sep 2021)
Revision:18193
Build-Date:2021-09-03 01:31:19
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18193 cs) Mac OS X 10.16
OS Build number: macOS 11.6 (20G165)
Memory Usage: 248 MB / 1024 MB (78 MB allocated, but free)
Java version: 11.0.10+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.formdev.flatlaf.FlatDarculaLaf
Screen: Display 69679040 1440×900 (scaling 1.00×1.00)
Maximum Screen Size: 1440×900
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: cs_CZ.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: cs_CZ
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop]
Dataset consistency test: No problems found

Plugins:
+ CustomizePublicTransportStop (35760)
+ flatlaf (35799)
+ public_transport (35640)
+ reverter (35732)
+ tageditor (35640)
+ todo (30306)
+ turnlanes (35812)
+ turnlanes-tagging (288)
+ wikipedia (1.1.4)

Last errors/warnings:
- 00809.648 W: Neuložené změny - <html>Relace byla změněna.<br><br>Chcete změny uložit?</html>
- 00865.724 E: Handled by bug report queue: java.lang.IllegalArgumentException: {Relation id=9197973 version=11 MVDT]} is already deleted



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-1 (33) of JOSM
java.lang.IllegalArgumentException: {Relation id=9197973 version=11 MVDT]} is already deleted
	at org.openstreetmap.josm.command.DeleteCommand.lambda$executeCommand$0(DeleteCommand.java:194)
	at org.openstreetmap.josm.data.osm.DataSet.update(DataSet.java:988)
	at org.openstreetmap.josm.command.DeleteCommand.executeCommand(DeleteCommand.java:190)
	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.deleteRelations(DeleteAction.java:367)
	at org.openstreetmap.josm.actions.mapmode.DeleteAction.deleteRelation(DeleteAction.java:348)
	at org.openstreetmap.josm.gui.dialogs.relation.actions.DeleteCurrentRelationAction.actionPerformed(DeleteCurrentRelationAction.java:38)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6400)
	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.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	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 (8)

comment:1 by skyper, 3 years ago

Similar to #18717 and #20985.

comment:2 by Don-vip, 3 years ago

Keywords: relation child added
Milestone: 21.10
Owner: changed from team to Don-vip
Priority: normalminor
Status: newassigned

comment:3 by Don-vip, 3 years ago

Resolution: fixed
Status: assignedclosed

In 18288/josm:

fix #21451 - disallow to edit deleted child relations from parent editor

comment:4 by kudlav, 3 years ago

Summary: Unhandled expection: deleted relation is still listed in other relationsUnhandled exception: deleted relation is still listed in other relations

comment:5 by kudlav, 3 years ago

The problem persists in 18303:

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-11-01 23:05:46 +0100 (Mon, 01 Nov 2021)
Revision:18303
Build-Date:2021-11-01 22:25:18
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18303 cs) Mac OS X 10.16
OS Build number: macOS 11.6.1 (20G224)
Memory Usage: 180 MB / 1024 MB (36 MB allocated, but free)
Java version: 11.0.10+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.formdev.flatlaf.FlatDarculaLaf
Screen: Display 69679040 1440×900 (scaling 1.00×1.00)
Maximum Screen Size: 1440×900
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: cs_CZ.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: cs_CZ
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop]
Dataset consistency test: No problems found

Plugins:
+ CustomizePublicTransportStop (35760)
+ flatlaf (35862)
+ public_transport (35640)
+ reverter (35846)
+ tageditor (35640)
+ todo (30306)
+ turnlanes (35812)
+ turnlanes-tagging (288)
+ wikipedia (1.1.4)

Last errors/warnings:
- 00170.625 E: Handled by bug report queue: java.lang.IllegalArgumentException: {Relation id=5376135 version=26 MVDT]} is already deleted



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-1 (33) of JOSM
java.lang.IllegalArgumentException: {Relation id=5376135 version=26 MVDT]} is already deleted
	at org.openstreetmap.josm.command.DeleteCommand.lambda$executeCommand$0(DeleteCommand.java:194)
	at org.openstreetmap.josm.data.osm.DataSet.update(DataSet.java:992)
	at org.openstreetmap.josm.command.DeleteCommand.executeCommand(DeleteCommand.java:190)
	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.deleteRelations(DeleteAction.java:367)
	at org.openstreetmap.josm.actions.mapmode.DeleteAction.deleteRelation(DeleteAction.java:348)
	at org.openstreetmap.josm.gui.dialogs.relation.actions.DeleteCurrentRelationAction.actionPerformed(DeleteCurrentRelationAction.java:38)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6400)
	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.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	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)

comment:6 by kudlav, 3 years ago

Resolution: fixed
Status: closedreopened

in reply to:  description comment:7 by skyper, 3 years ago

Replying to vladankudlac@…:

What steps will reproduce the problem?

  1. Open child relation from "Edit relation"
  2. Delete it
  3. Go back to the parent, the deleted relation is still listed
  4. Open child relation again
  5. Delete it
  6. An unhandled exception occurs

I tried to reproduce with latest but it does not work. While the child relation is still listed until I update the relation with the button on the top in the relation editor, I am not able to open a relation editor for the deleted relation nor select it in step 4.

Last edited 3 years ago by skyper (previous) (diff)

comment:8 by kudlav, 3 years ago

I've just followed the steps mentioned above and as you can see in the crash report, I can still reproduce it.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as reopened The owner will remain Don-vip.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Don-vip to the specified user. Next status will be 'new'.
Next status will be 'needinfo'. The owner will be changed from Don-vip to kudlav.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.

Add Comment


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