Modify

Opened 8 years ago

Closed 6 years ago

Last modified 2 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, SomeoneElse, 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 8 years ago.
7465v2.patch (1.5 KB) - added by simon04 6 years ago.

Download all attachments as: .zip

Change History (44)

Changed 8 years ago by simon04

Attachment: 7465.patch added

comment:1 Changed 8 years ago by simon04

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 Changed 8 years ago by simon04

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

comment:3 Changed 8 years ago by 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 :)

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

comment:4 in reply to:  3 Changed 8 years ago by skyper

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.

comment:5 in reply to:  3 Changed 8 years ago by simon04

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 Changed 8 years ago by simon04

#5764 is (somehow) related.

comment:7 Changed 7 years ago by skyper

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

comment:8 Changed 7 years ago by simon04

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 Changed 7 years ago by 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.

comment:10 Changed 7 years ago by mrwojo

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

comment:11 in reply to:  9 Changed 7 years ago by bastiK

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 Changed 7 years ago by stoecker

Status of this?

comment:13 Changed 7 years ago by Don-vip

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

comment:14 Changed 7 years ago by Don-vip

Cc: scorp1988 added

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

comment:15 Changed 7 years ago by Don-vip

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

comment:16 Changed 7 years ago by Don-vip

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

comment:17 Changed 7 years ago by Don-vip

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

comment:18 Changed 7 years ago by Don-vip

Cc: neopolis added

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

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

comment:19 Changed 7 years ago by rickmastfan67

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 Changed 7 years ago by Don-vip

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

comment:21 Changed 7 years ago by Don-vip

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

comment:22 Changed 6 years ago by Don-vip

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

comment:23 Changed 6 years ago by Don-vip

Cc: Kiko2000 added
Priority: normalmajor

comment:24 Changed 6 years ago by Don-vip

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

comment:25 Changed 6 years ago by Don-vip

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

comment:26 Changed 6 years ago by SomeoneElse

Cc: SomeoneElse added

comment:27 Changed 6 years ago by SomeoneElse

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 6 years ago by skyper (previous) (diff)

comment:28 in reply to:  27 Changed 6 years ago by skyper

Replying to SomeoneElse:

Another example:

No this is #7621

comment:29 Changed 6 years ago by stoecker

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

comment:30 Changed 6 years ago by Don-vip

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

comment:31 Changed 6 years ago by skyper

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

comment:32 Changed 6 years ago by skyper

Cc: f.pelullo@… added

comment:33 Changed 6 years ago by Don-vip

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 Changed 6 years ago by Don-vip

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

comment:35 Changed 6 years ago by Don-vip

Cc: OSMChris added

Changed 6 years ago by simon04

Attachment: 7465v2.patch added

comment:36 Changed 6 years ago by simon04

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

comment:37 Changed 6 years ago by skyper

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

comment:38 Changed 6 years ago by skyper

Cc: christof.kammerer@… added
Keywords: way connect area added

comment:39 Changed 6 years ago by simon04

Resolution: fixed
Status: newclosed

In 6400/josm:

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

comment:40 Changed 6 years ago by Don-vip

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

comment:41 Changed 6 years ago by Don-vip

Milestone: 13.12 (6502)

comment:42 Changed 2 years ago by stoecker

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.