Modify

Opened 9 years ago

Last modified 3 years ago

#11333 new defect

AssertionError: Node was removed when purging, but is still there on undo

Reported by: richlv Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: template_report purge undo Cc:

Description

What steps will reproduce the problem?

  1. download an object
  2. purge it
  3. download it again
  4. undo
Revision: 8159
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: stoecker
Last Changed Date: 2015-03-29 14:37:50 +0200 (Sun, 29 Mar 2015)
Build-Date: 2015-03-30 01:30:55
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8159

Identification: JOSM/1.5 (8159 en_GB) Linux openSUSE 13.2 (Harlequin) (x86_64)
Memory Usage: 462 MB / 683 MB (268 MB allocated, but free)
Java version: 1.8.0_40, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Djava.net.useSystemProxies=true]
Dataset consistency test: No problems found

Plugins:
- InfoMode (30892)
- PicLayer (30962)
- imagery_offset_db (31056)
- jna (30892)
- log4j (30892)
- measurement (30892)
- pbf (31010)
- reverter (30990)
- terracer (30892)
- videomapping (30892)

Last errors/warnings:
- W: TMS - Failed downloading tile: Tile 19/299419/161169@Bing Aerial Maps
- W: TMS - Failed downloading tile: Tile 19/299414/161171@Bing Aerial Maps
- W: TMS - Failed downloading tile: Tile 19/299414/161169@Bing Aerial Maps
- W: TMS - Failed downloading tile: Tile 19/299414/161170@Bing Aerial Maps
- E: java.lang.AssertionError: Primitive {Node id=1453149937 version=1 V lat=56.7986669,lon=24.8166575} was removed when purging, but is still there on undo

java.lang.AssertionError: Primitive {Node id=1453149937 version=1 V lat=56.7986669,lon=24.8166575} was removed when purging, but is still there on undo
	at org.openstreetmap.josm.command.PurgeCommand.undoCommand(PurgeCommand.java:130)
	at org.openstreetmap.josm.data.UndoRedoHandler.undo(UndoRedoHandler.java:92)
	at org.openstreetmap.josm.data.UndoRedoHandler.undo(UndoRedoHandler.java:77)
	at org.openstreetmap.josm.actions.UndoAction.actionPerformed(UndoAction.java:36)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
	at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:307)
	at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:263)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2974)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2966)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
	at java.awt.Component.processEvent(Component.java:6302)
	at java.awt.Container.processEvent(Container.java:2234)
	at java.awt.Component.dispatchEventImpl(Component.java:4881)
	at java.awt.Container.dispatchEventImpl(Container.java:2292)
	at java.awt.Component.dispatchEvent(Component.java:4703)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
	at java.awt.Component.dispatchEventImpl(Component.java:4752)
	at java.awt.Container.dispatchEventImpl(Container.java:2292)
	at java.awt.Window.dispatchEventImpl(Window.java:2750)
	at java.awt.Component.dispatchEvent(Component.java:4703)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:702)
	at java.awt.EventQueue$3.run(EventQueue.java:696)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:724)
	at java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:721)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Attachments (0)

Change History (8)

comment:1 by richlv, 9 years ago

Summary: unexpected excepion when undoingunexpected exception when undoing

comment:2 by akks, 9 years ago

I confirm, this is easily reproducible.

comment:3 by akks, 9 years ago

Removing assertion error can help:

if (ds.getPrimitiveById(osm) != null)
    throw new AssertionError(String.format("Primitive %s was removed when purging, but is still there on undo", osm));
ds.addPrimitive(osm);

replaced to

if (ds.getPrimitiveById(osm) == null) {
   ds.addPrimitive(osm);
}

https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/command/PurgeCommand.java#L128

But I am not sure the logic will be correct. Someone more experienced in this part should check it.

Last edited 6 years ago by Don-vip (previous) (diff)

comment:4 by Don-vip, 9 years ago

Keywords: purge undo added

comment:5 by Don-vip, 6 years ago

Summary: unexpected exception when undoingAssertionError: Node was removed when purging, but is still there on undo

comment:6 by Don-vip, 5 years ago

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

comment:7 by Don-vip, 5 years ago

See also #5846 / #7489

comment:8 by skyper, 3 years ago

See also #19331.

Modify Ticket

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

Add Comment


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