Modify

Opened 15 years ago

Closed 15 years ago

#3587 closed defect (fixed)

NPE in QuadBuckets

Reported by: anonymous Owned by: hansendc
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc: hansendc

Description

JOSM r2192.

Tried to delete a collection of ~ 50 primitives on the server. QuadBucketIterator throws an NPE.

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.openstreetmap.josm.gui.PleaseWaitRunnable$2.run(PleaseWaitRunnable.java:98)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:853)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:67)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:116)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.data.osm.QuadBuckets$QuadBucketIterator.remove(QuadBuckets.java:811)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.cleanIterator(OsmDataLayer.java:367)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.cleanupAfterUpload(OsmDataLayer.java:343)
	at org.openstreetmap.josm.actions.UploadAction$UploadDiffTask.finish(UploadAction.java:544)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable$1.run(PleaseWaitRunnable.java:69)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
	at java.awt.Dialog$1.run(Dialog.java:535)
	at java.awt.Dialog$2.run(Dialog.java:565)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:563)
	at java.awt.Component.show(Component.java:1302)
	at java.awt.Component.setVisible(Component.java:1255)
	at org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor$4.run(PleaseWaitProgressMonitor.java:102)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Attachments (2)

josm-null-pointer-quad-0.patch (2.3 KB ) - added by hansendc 15 years ago.
josm-null-pointer-quad-1.patch (2.6 KB ) - added by hansendc 15 years ago.
fixes both bugs. compile but not runtime tested

Download all attachments as: .zip

Change History (7)

comment:1 by anonymous, 15 years ago

Owner: changed from team to hansendc

comment:2 by stoecker, 15 years ago

Cc: hansendc added

comment:3 by stoecker, 15 years ago

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

by hansendc, 15 years ago

comment:4 by hansendc, 15 years ago

I think 3579 is actually a different bug. Somebody tried to check the QuadBuckets for an object that was not a node.

This one is because someone called iterator.remove() on an iterator that was at the end of its iteration. I'm trying to remove the next element instead of the last one. I have some fixes almost ready. I'll post when I have it finished.

by hansendc, 15 years ago

fixes both bugs. compile but not runtime tested

comment:5 by stoecker, 15 years ago

Resolution: fixed
Status: newclosed

In r2197.

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.