Modify

Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#627 closed defect (duplicate)

crash on opening gpx file

Reported by: daveemtb Owned by: framm
Priority: blocker Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

I tried opening a GPX file (had just opened it ok in an older build) and got the following crash:

Path: josm
URL: http://www.openstreetmap.de/svn/josm
Repository Root: http://www.openstreetmap.de/svn/josm
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 553
Node Kind: directory
Last Changed Author: david
Last Changed Rev: 553
Last Changed Date: 2008-02-21 19:53:16 +0100 (Thu, 21 Feb 2008)

java.lang.NullPointerException

at org.openstreetmap.josm.data.gpx.WayPoint.setTime(WayPoint.java:38)
at org.openstreetmap.josm.io.GpxReader$Parser.endElement(GpxReader.java:250)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.openstreetmap.josm.io.GpxReader.<init>(GpxReader.java:304)
at org.openstreetmap.josm.actions.OpenAction.openFileAsGpx(OpenAction.java:88)
at org.openstreetmap.josm.actions.OpenAction.openFile(OpenAction.java:57)
at org.openstreetmap.josm.actions.OpenAction.actionPerformed(OpenAction.java:48)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Attachments (0)

Change History (4)

comment:1 by daveemtb, 17 years ago

I found that renaming the file name to remove the space in the name, and removing the waypoints from the file (done at the same time i'm afraid, don't know which caused it) allows me to open the file. However, if I then try to download GPX data, I get the following exception:

Path: josm
URL: http://www.openstreetmap.de/svn/josm
Repository Root: http://www.openstreetmap.de/svn/josm
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 553
Node Kind: directory
Last Changed Author: david
Last Changed Rev: 553
Last Changed Date: 2008-02-21 19:53:16 +0100 (Thu, 21 Feb 2008)

java.lang.NullPointerException

at org.openstreetmap.josm.data.gpx.WayPoint.setTime(WayPoint.java:38)
at org.openstreetmap.josm.io.GpxReader$Parser.endElement(GpxReader.java:240)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.openstreetmap.josm.io.GpxReader.<init>(GpxReader.java:304)
at org.openstreetmap.josm.io.BoundingBoxDownloader.parseRawGps(BoundingBoxDownloader.java:54)
at org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTask$Task.realRun(DownloadGpsTask.java:37)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:84)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

comment:2 by Daveemtb, 17 years ago

For reference, I think the waypoints in the files that may be causing the crash don't match any points in the GPS exactly. They are created in NoniGPSplot, which by default saves old waypoints in new GPX files if they are close to the track. Perhaps the GPX reader component is having trouble matching up waypoints with times as the point at the same location aren't in the log?

comment:3 by justin@…, 17 years ago

I'm having a similar problem, with a gpx that has no waypoints, only trackpoints.

Path: josm
URL: http://www.openstreetmap.de/svn/josm
Repository Root: http://www.openstreetmap.de/svn/josm
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 554
Node Kind: directory
Last Changed Author: david
Last Changed Rev: 554
Last Changed Date: 2008-02-22 18:31:49 +0100 (Fri, 22 Feb 2008)

java.lang.NullPointerException

at org.openstreetmap.josm.data.gpx.WayPoint.setTime(WayPoint.java:41)
at org.openstreetmap.josm.io.GpxReader$Parser.endElement(GpxReader.java:236)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.openstreetmap.josm.io.GpxReader.<init>(GpxReader.java:304)
at org.openstreetmap.josm.actions.OpenAction.openFileAsGpx(OpenAction.java:88)
at org.openstreetmap.josm.actions.OpenAction.openFile(OpenAction.java:57)
at org.openstreetmap.josm.actions.OpenAction.actionPerformed(OpenAction.java:48)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

comment:4 by tom_evans_a@…, 17 years ago

Resolution: duplicate
Status: newclosed

#633, #636. Fixed in r571.
Can't be certain without an attached gpx to test with, but I'm pretty sure this is the same thing again.

Modify Ticket

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