Modify

Opened 21 months ago

Last modified 13 months ago

#6761 new defect

Unable to Select Incomplete Way - NullPointerException

Reported by: skorasaurus Owned by: team
Priority: normal Component: Core
Version: latest Keywords: template_report
Cc:

Description (last modified by stoecker)

What steps will reproduce the problem?

  1. Open an .OSM file (specifically 15.5mb) - http://dl.dropbox.com/u/17003223/filtered.osm
  2. Select multiple existing nodes in the .osm file that that are neither connected to each other nor to another way in a specific .OSM file.

What is the expected result? I attempt to select multiple nodes that are neither connected to each other nor to another way in a specific .OSM file. and expect to be able to select them and change their properties.

Note: This bug only applies to nodes existing in the .osm file. If I create 2 new nodes in the same .osm file, I am able to change those 2 nodes' properties without any bugs.

Note 2: This .OSM was imported from an extract at geofabrik and I then extracted more data from osmosis. The attached OSM file is the output from osmosis.

What happens instead?

A box stating a bug in josm has occurred along with the following note.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-09-01 01:31:33
Last Changed Author: simon04
Revision: 4390
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-08-31 21:41:56 +0200 (Wed, 31 Aug 2011)
Last Changed Rev: 4390

Identification: JOSM/1.5 (4390 en)
Memory Usage: 235 MB / 670 MB (112 MB allocated, but free)
Java version: 1.6.0_20, Sun Microsystems Inc., OpenJDK Server VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: DirectUpload (26530)
Plugin: ImageWayPoint (26406)
Plugin: buildings_tools (26530)
Plugin: dataimport (26174)
Plugin: ext_tools (26530)
Plugin: openstreetbugs (26530)
Plugin: openvisible (26530)
Plugin: osmarender (26174)
Plugin: photo_geotagging (26530)
Plugin: reltoolbox (26530)
Plugin: restart (26406)
Plugin: reverter (26530)
Plugin: tagging-preset-tester (26406)
Plugin: terracer (26406)
Plugin: undelete (26530)
Plugin: utilsplugin2 (26530)
Plugin: waypoint_search (26406)

java.lang.NullPointerException
	at org.openstreetmap.josm.data.coor.LatLon.greatCircleDistance(LatLon.java:165)
	at org.openstreetmap.josm.data.osm.Way.getLength(Way.java:545)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SelectionListModel.setJOSMSelection(SelectionListDialog.java:580)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SelectionListModel.selectionChanged(SelectionListDialog.java:659)
	at org.openstreetmap.josm.data.osm.event.SelectionEventManager.fireEvents(SelectionEventManager.java:78)
	at org.openstreetmap.josm.data.osm.event.SelectionEventManager.access$200(SelectionEventManager.java:20)
	at org.openstreetmap.josm.data.osm.event.SelectionEventManager$1.run(SelectionEventManager.java:85)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647)
	at java.awt.EventQueue.access$000(EventQueue.java:96)
	at java.awt.EventQueue$1.run(EventQueue.java:608)
	at java.awt.EventQueue$1.run(EventQueue.java:606)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:617)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

Attachments (0)

Change History (7)

comment:1 Changed 21 months ago by bastiK

I don't get an exception when selecting nodes from that file. Please give detailed instructions (ids of nodes to select) to get the error.

comment:2 Changed 21 months ago by skorasaurus

Replying to bastiK:

I don't get an exception when selecting nodes from that file. Please give detailed instructions (ids of nodes to select) to get the error.

Try selecting nodes near the coordinate: -41.5934636, -81.5567828

Last edited 21 months ago by skorasaurus (previous) (diff)

comment:3 Changed 21 months ago by bastiK

The exception is thrown if you try to select an incomplete way. JOSM does not support incomplete ways, I'm not sure, how we should handle this. Easiest solution would be to skip ways with missing nodes when reading the osm file and don't at them to the DataSet in the first place.

comment:4 Changed 20 months ago by Don-vip

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

comment:5 Changed 20 months ago by Don-vip

I've written a patch in ticket #6807, but maybe you're right, ways shouldn't be loaded at all.

comment:6 Changed 19 months ago by stoecker

  • Description modified (diff)
  • Summary changed from Unable to Select Multiple Nodes [NullPointerException] to Unable to Select Incomplete Way - NullPointerException

comment:7 Changed 13 months ago by Don-vip

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team. Next status will be 'new'.
Next status will be 'needinfo'.The owner will change to skorasaurus
as duplicate The resolution will be set to duplicate. Next status will be 'closed'.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous. Next status will be 'assigned'.
Author


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

 
Note: See TracTickets for help on using tickets.