#17003 closed defect (fixed)
IAE at DateUtils.tsFromString
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 18.11 |
Component: | Core | Version: | |
Keywords: | template_report gpx date timestamp | Cc: | mark.handcock@… |
Description
What steps will reproduce the problem?
- Read in gpx file
- Convert to OSM
- Export as GPX
What is the expected result?
Exception on export
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2018-10-28 22:27:31 +0100 (Sun, 28 Oct 2018) Build-Date:2018-10-28 21:33:32 Revision:14382 Relative:URL: ^/trunk Identification: JOSM/1.5 (14382 en) Mac OS X 10.14.1 OS Build number: Mac OS X 10.14.1 (18B75) Memory Usage: 879 MB / 10923 MB (521 MB allocated, but free) Java version: 1.8.0_172-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: Display 722471373 2560x1600, Display 722472655 2560x1600 Maximum Screen Size: 2560x1600 Dataset consistency test: No problems found Last errors/warnings: - E: Old Id 'idecor-wms' is not unique - used by 'Córdoba SDI (WMS)' and 'Córdoba SDI (WMS)'! - W: No configuration settings found. Using hardcoded default values for all pools. - W: org.openstreetmap.josm.tools.UncheckedParseException: The date string (2018-11-03T15:28.31Z) could not be parsed.. Cause: java.lang.IllegalArgumentException: 2018-11-03T15:28.31Z - W: org.openstreetmap.josm.tools.UncheckedParseException: The date string (2018-11-03T15:28.31Z) could not be parsed.. Cause: java.lang.IllegalArgumentException: 2018-11-03T15:28.31Z - W: org.openstreetmap.josm.tools.UncheckedParseException: The date string (2018-11-03T15:28.31Z) could not be parsed.. Cause: java.lang.IllegalArgumentException: 2018-11-03T15:28.31Z - W: org.openstreetmap.josm.tools.UncheckedParseException: The date string (2018-11-03T15:28.31Z) could not be parsed.. Cause: java.lang.IllegalArgumentException: 2018-11-03T15:28.31Z - E: Handled by bug report queue: org.openstreetmap.josm.tools.UncheckedParseException: The date string (2018-11-03T15:28.31Z) could not be parsed.. Cause: java.lang.IllegalArgumentException: 2018-11-03T15:28.31Z - E: Handled by bug report queue: org.openstreetmap.josm.tools.UncheckedParseException: The date string (2018-11-03T15:28.31Z) could not be parsed.. Cause: java.lang.IllegalArgumentException: 2018-11-03T15:28.31Z === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (18) of main org.openstreetmap.josm.tools.UncheckedParseException: The date string (2018-11-03T15:28.31Z) could not be parsed. at org.openstreetmap.josm.tools.date.DateUtils.tsFromString(DateUtils.java:145) at org.openstreetmap.josm.tools.date.DateUtils.fromString(DateUtils.java:74) at org.openstreetmap.josm.gui.layer.OsmDataLayer.nodeToWayPoint(OsmDataLayer.java:799) at org.openstreetmap.josm.gui.layer.OsmDataLayer.nodeToWayPoint(OsmDataLayer.java:779) at org.openstreetmap.josm.gui.layer.OsmDataLayer.lambda$waysToGpxData$2(OsmDataLayer.java:757) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:423) at org.openstreetmap.josm.gui.layer.OsmDataLayer.waysToGpxData(OsmDataLayer.java:732) at org.openstreetmap.josm.gui.layer.OsmDataLayer.toGpxData(OsmDataLayer.java:718) at org.openstreetmap.josm.gui.layer.OsmDataLayer.toGpxData(OsmDataLayer.java:911) at org.openstreetmap.josm.gui.io.importexport.GpxExporter.exportData(GpxExporter.java:174) at org.openstreetmap.josm.actions.GpxExportAction.export(GpxExportAction.java:109) at org.openstreetmap.josm.actions.GpxExportAction.actionPerformed(GpxExportAction.java:82) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: java.lang.IllegalArgumentException: 2018-11-03T15:28.31Z at com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl$Parser.skip(XMLGregorianCalendarImpl.java:2847) at com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parse(XMLGregorianCalendarImpl.java:2769) at com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl.<init>(XMLGregorianCalendarImpl.java:435) at com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl.newXMLGregorianCalendar(DatatypeFactoryImpl.java:536) at org.openstreetmap.josm.tools.date.DateUtils.tsFromString(DateUtils.java:143) ... 55 more
Attachments (2)
Change History (10)
by , 6 years ago
comment:1 by , 6 years ago
Keywords: | gpx date timestamp added |
---|---|
Summary: | Exception on export to GPX. There may be a GPX error I can not identify. → IAE at DateUtils.tsFromString |
comment:2 by , 6 years ago
i checked the GPX file and I had a typo where a time stamp had a "." rather then a ":" in the time. This caused the exception.
comment:3 by , 6 years ago
Shouldn't this bug be closed then? JOSM can't and should not provide capability to read malformed gpx. Plus the error reporting in the stack trace is good enough to pinpoint to the source of the error.
comment:4 by , 6 years ago
I understand you attached the file exported by JOSM. Can you please share the original GPX file so we can see what is the best way to handle those invalid files? The error should be clearer and not result in an exception.
comment:5 by , 6 years ago
I added the bad GPX file as an attachement. See line 5116 for the typo, explicitly:
diff deadhorse.gpx deadhorse_bad.gpx
5116c5116
< <time>2018-11-03T15:28:31Z</time>
---
<time>2018-11-03T15:28.31Z</time>
So this is my error.
comment:8 by , 6 years ago
Milestone: | → 18.11 |
---|
Dead Horse Trail