Modify

Opened 11 years ago

Closed 11 years ago

#6321 closed defect (invalid)

some gpx imports throw an exception

Reported by: cmuelle8 Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: gpx import null pointer Cc:

Description

Build-Date: 2011-05-07 20:16:51
Revision: 4077
Is-Local-Build: true

Identification: JOSM/1.5 (4077 SVN de)
Memory Usage: 240 MB / 3569 MB (136 MB allocated, but free)
Java version: 1.6.0_25, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Linux

Plugin: AddrInterpolation (25199)
Plugin: CommandLine (25829)
Plugin: DirectUpload (25199)
Plugin: ElevationProfile (25192)
Plugin: OpeningHoursEditor (25190)
Plugin: PicLayer (25219)
Plugin: RoadSigns (25192)
Plugin: SimplifyArea (25881)
Plugin: alignways (25199)
Plugin: buildings_tools (25469)
Plugin: colorscheme (25192)
Plugin: contourmerge (25626)
Plugin: dataimport (25192)
Plugin: download_along (25190)
Plugin: editgpx (25407)
Plugin: junctionchecking (25497)
Plugin: lakewalker (25192)
Plugin: livegps (25833)
Plugin: mapdust (25839)
Plugin: measurement (25199)
Plugin: openstreetbugs (25664)
Plugin: openvisible (25192)
Plugin: pdfimport (25546)
Plugin: photo_geotagging (25199)
Plugin: public_transport (25192)
Plugin: restart (25199)
Plugin: reverter (25578)
Plugin: routes (25199)
Plugin: routing (25843)
Plugin: terracer (25199)
Plugin: turnrestrictions (25845)
Plugin: waydownloader (25190)
Plugin: waypoint_search (25191)
Plugin: wayselector (25191)

java.lang.NullPointerException

at org.openstreetmap.josm.tools.ImageProvider.getIfAvailable(ImageProvider.java:131)
at org.openstreetmap.josm.tools.ImageProvider.getIfAvailable(ImageProvider.java:114)
at org.openstreetmap.josm.tools.ImageProvider.getIfAvailable(ImageProvider.java:110)
at org.openstreetmap.josm.tools.ImageProvider.getIfAvailable(ImageProvider.java:97)
at org.openstreetmap.josm.gui.layer.markerlayer.Marker.<init>(Marker.java:181)
at org.openstreetmap.josm.gui.layer.markerlayer.Marker$1.createMarker(Marker.java:136)
at org.openstreetmap.josm.gui.layer.markerlayer.Marker.createMarker(Marker.java:239)
at org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer.<init>(MarkerLayer.java:96)
at org.openstreetmap.josm.io.GpxImporter$1.run(GpxImporter.java:52)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
at java.awt.Dialog$1.run(Dialog.java:1046)
at java.awt.Dialog$3.run(Dialog.java:1098)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1096)
at java.awt.Component.show(Component.java:1584)
at java.awt.Component.setVisible(Component.java:1536)
at java.awt.Window.setVisible(Window.java:842)
at java.awt.Dialog.setVisible(Dialog.java:986)
at org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor$3.run(PleaseWaitProgressMonitor.java:83)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Attachments (0)

Change History (4)

comment:1 Changed 11 years ago by cmuelle8

The gpx used was created by the app MyTracks, here is a snippet from the gpx - it contains waypoints, maybe this is the reason why gpx import fails and doesn't digest it:
(timestamps changed)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="details.xsl"?>
<gpx
 version="1.1"
 creator="My Tracks for the G1 running Android"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns="http://www.topografix.com/GPX/1/1"
 xmlns:topografix="http://www.topografix.com/GPX/Private/TopoGrafix/0/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.topografix.com/GPX/Private/TopoGrafix/0/1 http://www.topografix.com/GPX/Private/TopoGrafix/0/1/topografix.xsd">
<wpt lat="51.21086" lon="12.32091">
<ele>109.2</ele>
<time>0000-00-00T00:00:00Z</time>
<name><![CDATA[Holz-Brücke]]></name>
<desc><![CDATA[]]></desc>
</wpt>
<wpt lat="51.1504" lon="12.23546">
<ele>133.8</ele>
<time>0000-00-00T00:00:00Z</time>
<name><![CDATA[Sitze. Mülleimer]]></name>
<desc><![CDATA[]]></desc>
</wpt>
<trk>
<name><![CDATA[0000-00-00 00:00]]></name>
<desc><![CDATA[]]></desc>
<number>10</number>
<extensions><topografix:color>c0c0c0</topografix:color></extensions>
<trkseg>

[...]

comment:2 Changed 11 years ago by cmuelle8

Similar gpx files exported from MyTracks that /do not/ have wpt node elements, work fine. Maybe it's a CDATA problem?

Greetings

comment:3 Changed 11 years ago by jttt

Any chance you have some custom modifications in ImageProvider class? Line numbers from stacktrace doesn't fit to code in svn. Also gpx snippet provided can be loaded without problems in josm.

comment:4 Changed 11 years ago by cmuelle8

Resolution: invalid
Status: newclosed

my error.. the "wiki://" loading patch did not catch the possibility of iconName=null in 131 - just as the call trace suggests..

fixed in my version, but does not apply to josm code in svn..

greetings

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.