Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3687 closed defect (fixed)

NPE in quadbuckets code (undo/redo issue)

Reported by: bilbo Owned by: hansendc
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc: nakor.wp@…

Description

I was editing - I've drawn some ways, then I've drawn one way a bit off (I clicked too close to another existing node, so it joined that node, which is not what I wanted), so I pressed CTRL+Z (undo) to undraw lastnode of it -> I got this NPE

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 14.2-b01 (Sun Microsystems Inc.)
Main-class: JOSM
Main-Version: 2270 SVN
Main-Date: 2009-10-10T19:52:00.686087Z
Memory Usage: 357 MB / 910 MB (113 MB allocated, but free)
Java version: 1.6.0_16

Plugins: measurementmultipolyopenstreetbugsremotecontrolterracer2utilspluginvalidatorwmsplugin
Plugin measurement Version: 17377
Plugin multipoly Version: 17001
Plugin openstreetbugs Version: 17872
Plugin remotecontrol Version: 17858
Plugin terracer2 Version: ${version.entry.commit.revision}
Plugin utilsplugin Version: 17707
Plugin validator Version: 18069
Plugin wmsplugin Version: 17817


java.lang.NullPointerException
	at org.openstreetmap.josm.data.osm.QuadBuckets.remove(QuadBuckets.java:889)
	at org.openstreetmap.josm.data.osm.QuadBuckets.remove(QuadBuckets.java:884)
	at org.openstreetmap.josm.data.osm.DataSet.removePrimitive(DataSet.java:141)
	at org.openstreetmap.josm.command.AddCommand.undoCommand(AddCommand.java:56)
	at org.openstreetmap.josm.command.SequenceCommand.undoCommands(SequenceCommand.java:76)
	at org.openstreetmap.josm.command.SequenceCommand.undoCommand(SequenceCommand.java:81)
	at org.openstreetmap.josm.data.UndoRedoHandler.undo(UndoRedoHandler.java:70)
	at org.openstreetmap.josm.actions.UndoAction.actionPerformed(UndoAction.java:32)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
	at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
	at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2928)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2920)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
	at java.awt.Component.processEvent(Component.java:6040)
	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.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
	at java.awt.Component.dispatchEventImpl(Component.java:4502)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	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 (1)

npe-in-remove.patch (598 bytes ) - added by hansendc 15 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by stoecker, 15 years ago

Owner: changed from team to hansendc

comment:2 by stoecker, 15 years ago

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

comment:3 by bilbo, 15 years ago

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

comment:4 by Nakor, 15 years ago

Summary: NPE in quadbuckets codeNPE in quadbuckets code (undo/redo issue)

I changed the title because I see that there are already two duplicates about Undo/Redo issues.

comment:5 by Nakor, 15 years ago

Cc: nakor.wp@… added

by hansendc, 15 years ago

Attachment: npe-in-remove.patch added

comment:6 by hansendc, 15 years ago

Resolution: fixed
Status: newclosed

I believe this will fix it. It may have been a remnant from when the QuadBuckets stored Nodes only. It may also have been an attempt to remove a primitive that was not in the data set for some reason.

comment:7 by stoecker, 15 years ago

Please don't tickets until the patches are in the SVN. Add [PATCH] to the subject instead. Applied in r2286.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain hansendc.
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.