Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5501 closed defect (worksforme)

NPE in measurement plugin when selecting way with missing node

Reported by: AlfonZ Owned by: team
Priority: normal Milestone:
Component: Plugin measurement Version: latest
Keywords: Cc:

Description

Open attached missingnode.osm, Select all.

The reason is that a way is referencing a node which is not present in the file.
The way and nodes have to have positive IDs, otherwise JOSM refuses to open the file (with message "Way ... includes missing node ...").
Although the file itself is forged, I got it when I (incorrectly) filtered out stuff from a correct file.

Build-Date: 2010-09-24 14:22:14
Revision: 3560
Is-Local-Build: true

Identification: JOSM/1.5 (3560 SVN en)
Memory Usage: 49 MB / 247 MB (14 MB allocated, but free)
Java version: 1.6.0_21, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows XP
Dataset consistency test: No problems found

Plugin: measurement (22547)

java.lang.NullPointerException
	at org.openstreetmap.josm.plugins.measurement.MeasurementLayer.calcDistance(MeasurementLayer.java:152)
	at org.openstreetmap.josm.plugins.measurement.MeasurementDialog$1.selectionChanged(MeasurementDialog.java:128)
	at org.openstreetmap.josm.data.osm.DataSet.fireSelectionChanged(DataSet.java:330)
	at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:444)
	at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:455)
	at org.openstreetmap.josm.actions.SelectAllAction.actionPerformed(SelectAllAction.java:23)
...

Attachments (1)

missingnode.osm (191 bytes ) - added by AlfonZ 14 years ago.
Way referencing missing node

Download all attachments as: .zip

Change History (3)

by AlfonZ, 14 years ago

Attachment: missingnode.osm added

Way referencing missing node

comment:1 by akks, 14 years ago

Resolution: worksforme
Status: newclosed

comment:2 by akks, 14 years ago

Can not reproduce it. Does it work OK now?

Modify Ticket

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