Opened 5 years ago

Closed 5 years ago

#11760 closed defect (fixed)

NPE in utilsplugin2's replacegeometry

Reported by: rickmastfan67 Owned by: team
Priority: major Milestone:
Component: Plugin utilsplugin2 Version: latest
Keywords: Cc:


I got this because I tried to replace the geometry of a way that had a 'redacted' node in it after I undeleted it.

Steps to reproduce:

  1. First make sure you have the undelete & utilsplugin2 plugins installed.
  2. Undelete the following way:
  3. Notice that one of the nodes is mentioned that it was redacted, however, it really wasn't. (See #10102)
  4. Now, download some the data around the 'undeleted' way making sure all the 'undeleted' nodes will be in the boundingbox area. (This will also make the undeleted way show up.)
  5. Draw a new geometry for the way you undeleted (doesn't need to be long, just a new 2 node way will trigger the NPE).
  6. Select the 'undeleted' way and the new way and then do a 'replacegeometry'.

What happens:
The utilsplugin2 crashes because of a NPE.

What should happen:
JOSM should ignore trying to place the 'redacted' node (that really isn't redacted, but JOSM thinks it is, see above) into the new way.

However, if #10102 could be fixed first, this bug might never happen.

Repository Root:
Build-Date: 2015-08-06 01:32:57
Last Changed Author: wiktorn
Revision: 8643
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
Last Changed Date: 2015-08-05 23:51:30 +0200 (Wed, 05 Aug 2015)
Last Changed Rev: 8643

Identification: JOSM/1.5 (8643 en) Windows 7 64-Bit
Memory Usage: 619 MB / 1820 MB (200 MB allocated, but free)
Java version: 1.7.0_79, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

Dataset consistency test:
[NO DATASET] {Node id=113983539 version=9 V } is referenced by {Way id=158977006 version=7 MT> nodes=[{Node id=114048338 version=9 V lat=34.0131763,lon=-81.038849}, {Node id=113983539 version=9 V }, {Node id=114031153 version=7 MV lat=34.01411274966615,lon=-81.03633525144647}, {Node id=114031130 version=10 MV lat=34.01431006622883,lon=-81.03570327169628}, {Node id=114048340 version=8 M lat=34.0145112,lon=-81.0352531}, {Node id=2597719668 version=4 M lat=34.0146755,lon=-81.0343636}, {Node id=2597719656 version=3 V lat=34.0147395,lon=-81.0341519}, {Node id=2925067967 version=1 V lat=34.0147815,lon=-81.0340235}]} but not found in dataset

- OpeningHoursEditor (31241)
- buildings_tools (31361)
- measurement (31289)
- mirrored_download (31294)
- osmarender (31241)
- reverter (31241)
- turnrestrictions (31241)
- undelete (31241)
- utilsplugin2 (31241)

Last errors/warnings:
- W: New conflict: Conflict [my={Node id=114048335 version=10 D }, their={Node id=114048335 version=0 IV lat=34.012764,lon=-81.0404801}]
- W: JCS TMS Cache - error creating URL for tile 18/72060/104707@Bing Sat: Attribution is not loaded yet
- W: No url returned for: Bing Sat:, skipping
- W: Unable to undelete node 113,983,539. Object has likely been redacted
- E: java.lang.NullPointerException

	at org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry.ReplaceGeometryUtils.isInArea(
	at org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry.ReplaceGeometryUtils.isInArea(
	at org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry.ReplaceGeometryUtils.buildReplaceWayCommand(
	at org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry.ReplaceGeometryUtils.buildReplaceWayWithNewCommand(
	at org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry.ReplaceGeometryUtils.buildReplaceWithNewCommand(
	at org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry.ReplaceGeometryAction.actionPerformed(
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$300(Unknown Source)
	at java.awt.EventQueue$ Source)
	at java.awt.EventQueue$ Source)
	at Method)
	at$1.doIntersectionPrivilege(Unknown Source)
	at$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$ Source)
	at java.awt.EventQueue$ Source)
	at Method)
	at$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at Source)

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by Don-vip

Resolution: fixed
Status: newclosed

NPE fixed in [o31463:31464].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.