Modify

Opened 4 years ago

Last modified 3 years ago

#20479 new defect

Querying history from custom api server causes crash

Reported by: anonymous Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Followed guide at https://github.com/openstreetmap/openstreetmap-website/blob/master/CONFIGURE.md to create custom rails server hosting local instance of OSM
  2. For loading data to database i used ~/osmosis/bin/osmosis --read-pbf-fast estonia-latest.osm.pbf --write-apidb host="localhost" database="openstreetmap" user="user" password="user" validateSchemaVersion="no"

2.1. Osmosis version was downloaded from https://github.com/openstreetmap/osmosis/releases/download/0.48.3/osmosis-0.48.3.tgz

  1. Data loaded are technically without history, all nodes/ways are at their normal version, but only last edit date is preserved as from anonymous editor
  2. Opened josm for editing just like normally, except i used custom server at localhost:3000/api

What is the expected result?

  1. I don't know. Maybe warning "No history found"?

What happens instead?

Crash reporting window appeared

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-12-28 22:03:23 +0100 (Mon, 28 Dec 2020)
Revision:17428
Build-Date:2020-12-30 02:30:55
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17428 en) Linux Ubuntu 20.04.2 LTS
Memory Usage: 153 MB / 978 MB (64 MB allocated, but free)
Java version: 11.0.10+9-Ubuntu-0ubuntu1.20.04, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1694×928 (scaling 1.00×1.00)
Maximum Screen Size: 1694×928
Best cursor sizes: 16×16→16×16, 32×32→32×32
Desktop environment: ubuntu:GNOME
Java package: openjdk-11-jre:amd64-11.0.10+9-0ubuntu1~20.04
Java ATK Wrapper package: libatk-wrapper-java:all-0.37.1-1
Environment variable LANG: en_US.UTF-8
libcommons-compress-java: libcommons-compress-java:all-1.19-1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:-
Dataset consistency test: No problems found

Last errors/warnings:
- 00122.829 E: org.openstreetmap.josm.io.OsmTransferException: org.xml.sax.SAXException: (3,165)Illegal value for mandatory attribute 'uid' of type long (>=0). Got '-1'.. Cause: org.xml.sax.SAXException: (3,165)Illegal value for mandatory attribute 'uid' of type long (>=0). Got '-1'.
- 00122.872 E: Handled by bug report queue: org.openstreetmap.josm.io.OsmTransferException: org.xml.sax.SAXException: (3,165)Illegal value for mandatory attribute 'uid' of type long (>=0). Got '-1'.. Cause: org.xml.sax.SAXException: (3,165)Illegal value for mandatory attribute 'uid' of type long (>=0). Got '-1'.
- 00122.908 W: {Node id=294840980 version=2 V lat=59.4461779,lon=24.6874945} not found in HistoryDataSet

OSM API: http://localhost:3000/api


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (19) of main
org.openstreetmap.josm.io.OsmTransferException: org.xml.sax.SAXException: (3,165)Illegal value for mandatory attribute 'uid' of type long (>=0). Got '-1'.
	at org.openstreetmap.josm.io.OsmServerHistoryReader.parseHistory(OsmServerHistoryReader.java:77)
	at org.openstreetmap.josm.gui.history.HistoryLoadTask.loadHistory(HistoryLoadTask.java:227)
	at org.openstreetmap.josm.gui.history.HistoryLoadTask.loadHistory(HistoryLoadTask.java:204)
	at org.openstreetmap.josm.gui.history.HistoryLoadTask.realRun(HistoryLoadTask.java:189)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.xml.sax.SAXException: (3,165)Illegal value for mandatory attribute 'uid' of type long (>=0). Got '-1'.
	at org.openstreetmap.josm.io.OsmHistoryReader$Parser.throwException(OsmHistoryReader.java:48)
	at org.openstreetmap.josm.io.AbstractParser.getAttributeLong(AbstractParser.java:71)
	at org.openstreetmap.josm.io.AbstractParser.createPrimitive(AbstractParser.java:118)
	at org.openstreetmap.josm.io.AbstractParser.startNode(AbstractParser.java:151)
	at org.openstreetmap.josm.io.AbstractParser.doStartElement(AbstractParser.java:190)
	at org.openstreetmap.josm.io.OsmHistoryReader$Parser.startElement(OsmHistoryReader.java:58)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
	at org.openstreetmap.josm.tools.XmlUtils.parseSafeSAX(XmlUtils.java:123)
	at org.openstreetmap.josm.io.OsmHistoryReader.parse(OsmHistoryReader.java:94)
	at org.openstreetmap.josm.io.OsmServerHistoryReader.parseHistory(OsmServerHistoryReader.java:70)
	... 10 more

Attachments (0)

Change History (1)

comment:1 by skyper, 3 years ago

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to anonymous.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.