Modify

Opened 12 years ago

Closed 12 years ago

#7884 closed defect (fixed)

Can't undelete node (missing 'lat' attribute)

Reported by: dforsi Owned by: team
Priority: normal Milestone:
Component: Plugin undelete Version:
Keywords: undelete node exception Cc:

Description

What steps will reproduce the problem?

  1. start the undelete plugin, type n306804137 and start the process
  2. an exception is thrown about missing mandatory 'lat' attribute (see below for XML of node history):

What is the expected result?
The node is undeleted.

What happens instead?
An exception about missing mandatory 'lat' attribute is thrown.

Please provide any additional information below. Attach a screenshot if
possible.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-07-03 01:31:22
Last Changed Author: simon04
Revision: 5315
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-07-02 14:51:19 +0200 (Mon, 02 Jul 2012)
Last Changed Rev: 5315

Identification: JOSM/1.5 (5315 it)
Memory Usage: 119 MB / 494 MB (33 MB allocated, but free)
Java version: 1.6.0_24, Sun Microsystems Inc., OpenJDK Client VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: graphview (28412)
Plugin: reverter (28412)
Plugin: undelete (28416)

org.openstreetmap.josm.io.OsmTransferException: org.xml.sax.SAXException: (4,136)attributo obbligatorio 'lat' mancante
	at org.openstreetmap.josm.io.OsmServerHistoryReader.parseHistory(OsmServerHistoryReader.java:77)
	at org.openstreetmap.josm.gui.history.HistoryLoadTask.realRun(HistoryLoadTask.java:196)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:145)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:679)
Caused by: org.xml.sax.SAXException: (4,136)attributo obbligatorio 'lat' mancante
	at org.openstreetmap.josm.io.OsmHistoryReader$Parser.throwException(OsmHistoryReader.java:62)
	at org.openstreetmap.josm.io.OsmHistoryReader$Parser.getMandatoryAttributeDouble(OsmHistoryReader.java:104)
	at org.openstreetmap.josm.io.OsmHistoryReader$Parser.createPrimitive(OsmHistoryReader.java:156)
	at org.openstreetmap.josm.io.OsmHistoryReader$Parser.startNode(OsmHistoryReader.java:175)
	at org.openstreetmap.josm.io.OsmHistoryReader$Parser.startElement(OsmHistoryReader.java:212)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:504)
	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1320)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
	at org.openstreetmap.josm.io.OsmHistoryReader.parse(OsmHistoryReader.java:245)
	at org.openstreetmap.josm.io.OsmServerHistoryReader.parseHistory(OsmServerHistoryReader.java:70)
	... 6 more

This is the content of http://api.openstreetmap.org/api/0.6/node/306804137/history

<osm version="0.6" generator="OpenStreetMap server">
<node id="306804137" lat="40.4575827" lon="17.8708161" changeset="544985" user="simone" uid="137" visible="true" timestamp="2008-10-24T05:27:52Z" version="1"/>
<node id="306804137" changeset="12120585" user="beddumia" uid="716561" visible="false" timestamp="2012-07-05T13:42:05Z" version="2"/>
</osm>

Attachments (0)

Change History (5)

comment:1 by dforsi, 12 years ago

Component: CorePlugin undelete

comment:2 by Don-vip, 12 years ago

Please upgrade to r5353 to see it it fixes your problem (it should at least correct the exception you have)

comment:3 by skyper, 12 years ago

Can not undelete a node using "n20982228". Progress is shown but nothing appears in map view.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-07-21 01:31:11
Last Changed Author: akks
Revision: 5355
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-07-20 18:48:22 +0200 (Fri, 20 Jul 2012)
Last Changed Rev: 5355

loading plugin 'undelete' (version 28416)
GET http://api.openstreetmap.org/api/0.6/node/20982228/history

but using "Ctrl+A" I can select it. Running validator ends up in following exception:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-07-21 01:31:11
Last Changed Author: akks
Revision: 5355
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-07-20 18:48:22 +0200 (Fri, 20 Jul 2012)
Last Changed Rev: 5355

Identification: JOSM/1.5 (5355 en_GB)
Memory Usage: 96 MB / 592 MB (38 MB allocated, but free)
Java version: 1.6.0_24, Sun Microsystems Inc., OpenJDK 64-Bit Server VM
Operating system: Linux

Dataset consistency test:
[COMPLETE WITHOUT COORDINATES] {Node id=20982228 version=12 MVT } is not incomplete but has null coordinates
Exception during dataset integrity test:
java.lang.NullPointerException
	at org.openstreetmap.josm.data.osm.DatasetConsistencyTest.searchNodes(DatasetConsistencyTest.java:82)
	at org.openstreetmap.josm.data.osm.DatasetConsistencyTest.runTest(DatasetConsistencyTest.java:143)
	at org.openstreetmap.josm.data.osm.DatasetConsistencyTest.runTests(DatasetConsistencyTest.java:157)
	at org.openstreetmap.josm.actions.ShowStatusReportAction.getReportHeader(ShowStatusReportAction.java:70)
	at org.openstreetmap.josm.tools.BugReportExceptionHandler$1.run(BugReportExceptionHandler.java:107)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647)
	at java.awt.EventQueue.access$000(EventQueue.java:96)
	at java.awt.EventQueue$1.run(EventQueue.java:608)
	at java.awt.EventQueue$1.run(EventQueue.java:606)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:617)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)


Plugin: undelete (28416)

java.lang.NullPointerException
	at org.openstreetmap.josm.data.validation.tests.DuplicateNode$NodeHash.getLatLon(DuplicateNode.java:57)
	at org.openstreetmap.josm.data.validation.tests.DuplicateNode$NodeHash.getHashCode(DuplicateNode.java:74)
	at org.openstreetmap.josm.data.osm.Storage.getBucket(Storage.java:280)
	at org.openstreetmap.josm.data.osm.Storage.get(Storage.java:230)
	at org.openstreetmap.josm.data.validation.tests.DuplicateNode.visit(DuplicateNode.java:342)
	at org.openstreetmap.josm.data.osm.Node.visit(Node.java:184)
	at org.openstreetmap.josm.data.validation.Test.visit(Test.java:144)
	at org.openstreetmap.josm.actions.ValidateAction$ValidationTask.realRun(ValidateAction.java:170)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:145)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:679)

Spotted this when trying to undelete way id:13866553 which only did load the its other nodes but not the way.

comment:4 by Don-vip, 12 years ago

In 5356/josm:

see #7847, see #7884 - Fix 2 NPE when dealing with nodes without coordinates + display "(none)" in history when coordinates are missing to distinguish this fact from the deleted state (and be homogenous with conflict dialog)

comment:5 by Don-vip, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in [o28501].

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.