#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 )
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)
Change History (44)
by , 13 years ago
Attachment: | 7465.patch added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Component: | Core → Core validator |
---|---|
Description: | modified (diff) |
Summary: | Fehler → [Patch] NullPointerException in WayConnectedToArea due to Way w/ 0 nodes |
follow-ups: 4 5 comment:3 by , 13 years ago
comment:4 by , 13 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 !
- We definitly have a problem with objects mentioned twice in the validator list.
- 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 by , 13 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:8 by , 13 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 …
follow-up: 11 comment:9 by , 13 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:11 by , 13 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:19 by , 12 years ago
comment:20 by , 12 years ago
Thanks, I have started to look into undelete plugin code, see [o29474].
comment:23 by , 12 years ago
Cc: | added |
---|---|
Priority: | normal → major |
follow-up: 28 comment:27 by , 12 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)
comment:29 by , 12 years ago
Summary: | [Patch] NullPointerException in WayConnectedToArea due to Way w/ 0 nodes → NullPointerException in WayConnectedToArea due to Way w/ 0 nodes |
---|
comment:35 by , 11 years ago
Cc: | added |
---|
scorp1988, neopolis, Kiko2000, SomeoneElse2, f.pelullo@…, OSMChris
by , 11 years ago
Attachment: | 7465v2.patch added |
---|
comment:36 by , 11 years ago
Summary: | NullPointerException in WayConnectedToArea due to Way w/ 0 nodes → [Patch] NullPointerException in WayConnectedToArea due to Way w/ 0 nodes |
---|
comment:38 by , 11 years ago
Cc: | added |
---|---|
Keywords: | christof.kammerer@live.unigis.net added |
scorp1988, neopolis, Kiko2000, SomeoneElse2, f.pelullo@…, OSMChris, christof.kammerer@…
comment:41 by , 11 years ago
Milestone: | → 13.12 (6502) |
---|
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?