Modify

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#5501 closed defect (worksforme)

NPE in measurement plugin when selecting way with missing node

Reported by: AlfonZ Owned by: team
Priority: normal 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 3 years ago.
Way referencing missing node

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by AlfonZ

Way referencing missing node

comment:1 Changed 2 years ago by akks

  • Resolution set to worksforme
  • Status changed from new to closed

comment:2 Changed 2 years ago by akks

Can not reproduce it. Does it work OK now?

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.