Opened 15 months ago
Last modified 4 weeks ago
#7465 new defect
[Patch] NullPointerException in WayConnectedToArea due to Way w/ 0 nodes
| Reported by: | anonymous | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Component: | Core validator |
| Version: | Keywords: | ||
| Cc: | scorp1988, neopolis |
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 (1)
Change History (22)
Changed 15 months ago by simon04
comment:1 Changed 15 months ago by simon04
comment:2 Changed 15 months ago by simon04
- Component changed from Core to Core validator
- Description modified (diff)
- Summary changed from Fehler to [Patch] NullPointerException in WayConnectedToArea due to Way w/ 0 nodes
comment:3 follow-ups: ↓ 4 ↓ 5 Changed 15 months ago by akks
comment:4 in reply to: ↑ 3 Changed 15 months 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 !
- 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 in reply to: ↑ 3 Changed 15 months 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 15 months ago by simon04
#5764 is (somehow) related.
comment:7 Changed 12 months ago by skyper
Ticket #7763 has been marked as a duplicate of this ticket.
comment:8 Changed 12 months 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 follow-up: ↓ 11 Changed 10 months 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 10 months ago by mrwojo
Ticket #7912 has been marked as a duplicate of this ticket.
comment:11 in reply to: ↑ 9 Changed 10 months 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 8 months ago by stoecker
Status of this?
comment:13 Changed 7 months ago by Don-vip
Ticket #8167 has been marked as a duplicate of this ticket.
comment:14 Changed 7 months ago by Don-vip
- Cc scorp1988 added
There's another test file in #8167, if needed.
comment:15 Changed 7 months ago by Don-vip
Ticket #7562 has been marked as a duplicate of this ticket.
comment:16 Changed 3 months ago by Don-vip
Ticket #8462 has been marked as a duplicate of this ticket.
comment:17 Changed 7 weeks ago by Don-vip
Ticket #8569 has been marked as a duplicate of this ticket.
comment:18 Changed 7 weeks ago by Don-vip
- Cc neopolis added
There's another test file in #8569, if needed.
comment:19 Changed 7 weeks ago by rickmastfan67
comment:20 Changed 7 weeks ago by Don-vip
Thanks, I have started to look into undelete plugin code, see [o29474].
comment:21 Changed 4 weeks ago by Don-vip
Ticket #8630 has been marked as a duplicate of this ticket.



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?