#5528 closed defect (duplicate)
Crash while deleting nodes
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | template_report | Cc: |
Description (last modified by )
What steps will reproduce the problem?
No idea. JOSM crashed while I was deleting some unnecessary nodes. The last node deleted before the crash wasnt any more special than the others.
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if
possible.
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2010-09-06 01:31:24 Last Changed Author: stoecker Revision: 3514 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2010-09-05 23:03:46 +0200 (Sun, 05 Sep 2010) Last Changed Rev: 3514 Identification: JOSM/1.5 (3514 de) Memory Usage: 108 MB / 455 MB (52 MB allocated, but free) Java version: 1.6.0_20, Sun Microsystems Inc., Java HotSpot(TM) Server VM Operating system: Linux Dataset consistency test: No problems found Plugin: remotecontrol (22734) Plugin: validator (22805) Plugin: wmsplugin (22964) java.lang.IllegalArgumentException: {Node id=636002544 version=1 MVD lat=47.94386122334671,lon=16.26446098003137} is already deleted at org.openstreetmap.josm.command.DeleteCommand.executeCommand(DeleteCommand.java:117) at org.openstreetmap.josm.command.SequenceCommand.executeCommand(SequenceCommand.java:53) at org.openstreetmap.josm.data.UndoRedoHandler.addNoRedraw(UndoRedoHandler.java:36) at org.openstreetmap.josm.data.UndoRedoHandler.add(UndoRedoHandler.java:58) at org.openstreetmap.josm.actions.mapmode.DeleteAction.doActionPerformed(DeleteAction.java:153) at org.openstreetmap.josm.actions.mapmode.DeleteAction.actionPerformed(DeleteAction.java:137) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:291) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Attachments (0)
Change History (7)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
We have access functions which return "real" objects only. When they aren't used in this case, there very likely is a reason why. I think your idea is much too simple.
comment:3 by , 14 years ago
There are use cases for having deleted objects in your selection: Search for "modified
" with option "all objects" ticked. Then e.g. prune.
comment:4 by , 14 years ago
I've looked at some of 109 uses of Dataset.getSelected() and I would say that in all cases except PurgeAction, SelectionDialog and PropertiesDialog should be deleted primitives ignored but I didn't see any place where it actually happens.
So I think Dataset.getSelected() should return only non deleted primitives and new method Dataset.getSelected(boolean includeDeleted) should be added. I don't like changing behavior of long existing method but in this case most code expects the "wrong" behavior.
Another ticket affected by this - #5455
comment:5 by , 14 years ago
Sounds sensible to me. We only must ensure that the cases where we really want to handle deleted primitives still work. Mainly this is in search action and upload/save.
comment:6 by , 12 years ago
Description: | modified (diff) |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
This probably happened because selection contained deleted node. Errors like this can be prevented if Dataset.getSelected() never returned deleted primitives. That should be easy to implement but I'm not sure whether silently ignoring deleted primitives isn't to much magic. Hidden/disabled primitives can be ignored is selection as well.
@stoecker, @bastiK, do you think it's a good idea?