Modify

Opened 12 years ago

Closed 10 years ago

Last modified 7 years ago

#7465 closed defect (fixed)

[Patch] NullPointerException in WayConnectedToArea due to Way w/ 0 nodes

Reported by: anonymous Owned by: team
Priority: major Milestone: 13.12
Component: Core validator Version:
Keywords: way connect area Cc: scorp1988, neopolis, Kiko2000, SomeoneElse2, f.pelullo@…, OSMChris, christof.kammerer@…

Description (last modified by simon04)

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-01-30 02:32:23
Last Changed Author: stoecker
Revision: 4878
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-01-30 00:02:54 +0100 (Mon, 30 Jan 2012)
Last Changed Rev: 4878

Identification: JOSM/1.5 (4878 de)
Memory Usage: 137 MB / 494 MB (31 MB allocated, but free)
Java version: 1.7.0, Oracle Corporation, Java HotSpot(TM) Client VM
Operating system: Windows 7

Dataset consistency test:
[WARN - ZERO NODES] Way {Way id=152739257 version=2 MVT nodes=[]} has zero nodes
[WARN - ZERO NODES] Way {Way id=110239757 version=10 MVT nodes=[]} has zero nodes



java.lang.NullPointerException
	at org.openstreetmap.josm.data.validation.tests.WayConnectedToArea.visit(WayConnectedToArea.java:27)
	at org.openstreetmap.josm.data.osm.Way.visit(Way.java:187)
	at org.openstreetmap.josm.data.validation.Test.visit(Test.java:139)
	at org.openstreetmap.josm.actions.upload.ValidateUploadHook.checkUpload(ValidateUploadHook.java:60)
	at org.openstreetmap.josm.actions.UploadAction.checkPreUploadConditions(UploadAction.java:137)
	at org.openstreetmap.josm.actions.UploadAction.checkPreUploadConditions(UploadAction.java:103)
	at org.openstreetmap.josm.gui.io.SaveLayersDialog$SaveAndUploadTask.uploadLayers(SaveLayersDialog.java:417)
	at org.openstreetmap.josm.gui.io.SaveLayersDialog$SaveAndUploadTask.run(SaveLayersDialog.java:521)
	at java.lang.Thread.run(Unknown Source)

Attachments (2)

7465.patch (768 bytes ) - added by simon04 12 years ago.
7465v2.patch (1.5 KB ) - added by simon04 10 years ago.

Download all attachments as: .zip

Change History (44)

by simon04, 12 years ago

Attachment: 7465.patch added

comment:1 by simon04, 12 years ago

IMHO it makes sense to skip all validation tests for ways with 0 or 1 nodes as those objects shouldn't be there anyway and presumably also other tests may be broken (cf. #7437). See attached patch.

What do you think?

comment:2 by simon04, 12 years ago

Component: CoreCore validator
Description: modified (diff)
Summary: Fehler[Patch] NullPointerException in WayConnectedToArea due to Way w/ 0 nodes

comment:3 by akks, 12 years ago

I tried to make the same for #7437 in [5012], but does not know if it was helpful. But there was no bad consequences :)

Last edited 12 years ago by akks (previous) (diff)

in reply to:  3 comment:4 by skyper, 12 years ago

Replying to akks:

I tried to make the same for #7437 in [5012], but does not know if it was helpful. But there was no bad consequences :)

I think we should rather find the reason for these zero node ways than implementing work arounds for every occasion where these ways cause problems !

  1. We definitly have a problem with objects mentioned twice in the validator list.
  2. As the later problems with these zero node ways seem to have a different source. As I have seen a similar strange exception last week merging layers I think the problem lies somewhere around downloading/merging/conflicts solution.

Sorry, had not time the other day to check and it was not reproducable right away.

in reply to:  3 comment:5 by simon04, 12 years ago

Replying to akks:

I tried to make the same for #7437 in [5012], but does not know if it was helpful. But there was no bad consequences :)

This patch tries to take a more general approach as I assume that many validation tests rely on ways having at least 2 nodes (i.e., getting consistent data). IMO it should not be the task of each individual validation test to check that the data is consistent.

comment:6 by simon04, 12 years ago

#5764 is (somehow) related.

comment:7 by skyper, 12 years ago

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

comment:8 by simon04, 12 years ago

I agree that the source of these inconsistent objects should be spotted eventually. However, for a less buggy JOSM, I suggest to apply the above patch …

comment:9 by mrwojo, 12 years ago

Re the patch: I suggest moving the getNodesCount() check to a separate method that individual tests can override. UntaggedWay wants these 0-1 node ways.

comment:10 by mrwojo, 12 years ago

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

in reply to:  9 comment:11 by bastiK, 12 years ago

Replying to mrwojo:

Re the patch: I suggest moving the getNodesCount() check to a separate method that individual tests can override. UntaggedWay wants these 0-1 node ways.

Sounds reasonable.

comment:12 by stoecker, 12 years ago

Status of this?

comment:13 by Don-vip, 11 years ago

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

comment:14 by Don-vip, 11 years ago

Cc: scorp1988 added

There's another test file in #8167, if needed.

comment:15 by Don-vip, 11 years ago

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

comment:16 by Don-vip, 11 years ago

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

comment:17 by Don-vip, 11 years ago

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

comment:18 by Don-vip, 11 years ago

Cc: neopolis added

There's another test file in #8569, if needed.

Last edited 11 years ago by Don-vip (previous) (diff)

comment:19 by rickmastfan67, 11 years ago

Just a thought here, but #7986 and #8137 give a full-proof way to create 0-node ways. Sure, the crashes are in a slightly different place (2 lines off), but it's crashing in the same exact files. If they could be fixed, it might help fix this bug as well.

comment:20 by Don-vip, 11 years ago

Thanks, I have started to look into undelete plugin code, see [o29474].

comment:21 by Don-vip, 11 years ago

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

comment:22 by Don-vip, 11 years ago

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

comment:23 by Don-vip, 11 years ago

Cc: Kiko2000 added
Priority: normalmajor

comment:24 by Don-vip, 11 years ago

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

comment:25 by Don-vip, 11 years ago

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

comment:26 by SomeoneElse2, 11 years ago

Cc: SomeoneElse2 added

scorp1988, neopolis, Kiko2000, SomeoneElse2

comment:27 by SomeoneElse2, 11 years ago

Another example:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-08-07 01:35:24
Last Changed Author: Don-vip
Revision: 6115
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-08-07 00:04:24 +0200 (Wed, 07 Aug 2013)
Last Changed Rev: 6115

Identification: JOSM/1.5 (6115 en_GB) Windows 7 64-Bit
Memory Usage: 43 MB / 247 MB (2 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, Java HotSpot(TM) Client VM

Dataset consistency test:
[DELETED REFERENCED] {Relation id=3180513 version=3 VT [way 236354875, way 236354876]} refers to deleted primitive {Way id=236354875 version=2 D nodes=[]}
[DELETED REFERENCED] {Relation id=3180513 version=3 VT [way 236354875, way 236354876]} refers to deleted primitive {Way id=236354876 version=4 D nodes=[]}


Plugin: continuosDownload (28565)
Plugin: reverter (29771)

org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Deleted member referenced: {Relation id=3180513 version=3 VT [way 236354875, way 236354876]}
	at org.openstreetmap.josm.data.osm.Relation.checkMembers(Relation.java:490)
	at org.openstreetmap.josm.data.osm.Relation.fireMembersChanged(Relation.java:497)
	at org.openstreetmap.josm.data.osm.Relation.setMembers(Relation.java:61)
	at org.openstreetmap.josm.data.osm.Relation.cloneFrom(Relation.java:225)
	at org.openstreetmap.josm.command.ChangeCommand.executeCommand(ChangeCommand.java:43)
	at org.openstreetmap.josm.command.SequenceCommand.executeCommand(SequenceCommand.java:52)
	at org.openstreetmap.josm.data.UndoRedoHandler.addNoRedraw(UndoRedoHandler.java:36)
	at org.openstreetmap.josm.data.UndoRedoHandler.add(UndoRedoHandler.java:58)
	at reverter.RevertChangesetTask$1.run(RevertChangesetTask.java:101)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$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.pumpEventsForFilter(Unknown Source)
	at java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.awt.Dialog.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor$4.run(PleaseWaitProgressMonitor.java:172)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$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 java.awt.EventDispatchThread.run(Unknown Source)
Last edited 10 years ago by skyper (previous) (diff)

in reply to:  27 comment:28 by skyper, 11 years ago

Replying to SomeoneElse:

Another example:

No this is #7621

comment:29 by stoecker, 11 years ago

Summary: [Patch] NullPointerException in WayConnectedToArea due to Way w/ 0 nodesNullPointerException in WayConnectedToArea due to Way w/ 0 nodes

comment:30 by Don-vip, 11 years ago

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

comment:31 by skyper, 11 years ago

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

comment:32 by skyper, 11 years ago

Cc: f.pelullo@… added

scorp1988, neopolis, Kiko2000, SomeoneElse2, f.pelullo@…

comment:33 by Don-vip, 11 years ago

In 6302/josm:

see #7465 - Raise an error when a plugin replaces a way with a zero-node way (such as reverter before v30000)

comment:34 by Don-vip, 10 years ago

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

comment:35 by Don-vip, 10 years ago

Cc: OSMChris added

scorp1988, neopolis, Kiko2000, SomeoneElse2, f.pelullo@…, OSMChris

by simon04, 10 years ago

Attachment: 7465v2.patch added

comment:36 by simon04, 10 years ago

Summary: NullPointerException in WayConnectedToArea due to Way w/ 0 nodes[Patch] NullPointerException in WayConnectedToArea due to Way w/ 0 nodes

comment:37 by skyper, 10 years ago

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

comment:38 by skyper, 10 years ago

Cc: christof.kammerer@… added
Keywords: christof.kammerer@live.unigis.net added

scorp1988, neopolis, Kiko2000, SomeoneElse2, f.pelullo@…, OSMChris, christof.kammerer@…

comment:39 by simon04, 10 years ago

Resolution: fixed
Status: newclosed

In 6400/josm:

fix #7465 - NullPointerException in WayConnectedToArea due to Way w/ 0 nodes

comment:40 by Don-vip, 10 years ago

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

comment:41 by Don-vip, 10 years ago

Milestone: 13.12 (6502)

comment:42 by stoecker, 7 years ago

Milestone: 13.12 (6502)13.12

Milestone renamed

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.