Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#23132 closed defect (fixed)

getting NullPointerException error while uploading

Reported by: rahilarious Owned by: rahilarious
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

Made many changes (guilty), hours of work, around 1105 objects to upload.

While trying to upload, first validator gives me error

Highway duplicated nodes(1)
2 nodes: 2211718725, 2211718711

When I try to upload changes anyway, bug window shows up with stack trace (attaching with ticket)
When I press "Ignore this error" and try to upload, I get "bad request" error.

The OSM server 'https://api.openstreetmap.org/api/0.6/' reported a bad request.
Error message(untranslated): Node 2211718711 does not include all mandatory fields at line 331, column 61

Attachments (1)

stacktrace.txt (55.5 KB ) - added by rahilarious 2 years ago.
bug log

Download all attachments as: .zip

Change History (4)

by rahilarious, 2 years ago

Attachment: stacktrace.txt added

bug log

comment:1 by taylor.smock, 2 years ago

Owner: changed from team to rahilarious
Status: newneedinfo

Thanks for the log, but you should have used the report bug button in the popup. There are some things it would have added for context, like any plugins you have installed. I'll go ahead and use the [[BadReport]] macro so you know how to get the information to attach.

I suspect that a plugin fiddled with the data, and a node (somehow) has no coordinates. Can you save the data to disk and upload a copy here?

I'll go ahead and copy the error from the log into this comment.

	java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.coor.LatLon.isIn(java.awt.geom.Area)" because the return value of "org.openstreetmap.josm.data.osm.Node.getCoor()" is null
	        at org.openstreetmap.josm.data.validation.tests.UnconnectedWays.fillSearchNodes(UnconnectedWays.java:426)
	        at org.openstreetmap.josm.data.validation.tests.UnconnectedWays.endTest(UnconnectedWays.java:391)
	        at org.openstreetmap.josm.data.validation.ValidationTask.realRun(ValidationTask.java:137)
	        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
	        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
	        at org.openstreetmap.josm.actions.upload.ValidateUploadHook.checkUpload(ValidateUploadHook.java:61)
	        at org.openstreetmap.josm.actions.UploadAction.lambda$checkPreUploadConditionsAsync$0(UploadAction.java:252)
	        at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
	        at java.base/java.util.LinkedList$LLSpliterator.tryAdvance(LinkedList.java:1256)
	        at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
	        at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
	        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
	        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	        at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
	        at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
	        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	        at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
	        at org.openstreetmap.josm.actions.UploadAction.lambda$checkPreUploadConditionsAsync$1(UploadAction.java:252)
	        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	        at java.base/java.lang.Thread.run(Thread.$1(UploadAction.java:252)
	        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	        at java.base/java.lang.Thread.run(Thread.locks.AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:506)

Thanks for your report, however your ticket is incomplete and therefore not helpful in its current form.

Please add all needed information according to this list:

  • The required parts of the Status Report from your JOSM.
  • Describe what behaviour you expected.
  • Describe what did happen instead.
  • Describe if and how the issue is reproducible.
  • Add any relevant information like error messages or screenshots.

To ensure that all technical relevant information is contained, create new tickets by clicking in JOSMs Main Menu on Helpsource:trunk/resources/images/bug.svg Report Bug.

Remember: This is a generic notice so we don't need to write the same stuff again and again. It may only apply in parts to the specific case!


comment:2 by rahilarious, 2 years ago

Thanks for rapid response. I already attached stacktrace which I thought was enough to debug. https://josm.openstreetmap.de/attachment/ticket/23132/stacktrace.txt

However I solved it. Turned out .osm, .jos, .joz (zip compressed .jos) are just a xml files which I can edit. As I already had faulty node IDs I searched, found & deleted lines containing ids in .osm file.

<node id='2211718711' visible='false' version='2' />
<node id='2211718725' visible='false' version='2' />

Tried to upload again. Voila it worked. I still don't know why those deleted nodes were "visible" on my viewport.

Last edited 2 years ago by rahilarious (previous) (diff)

comment:3 by rahilarious, 2 years ago

Resolution: fixed
Status: needinfoclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain rahilarious.
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.