Modify

Opened 17 months ago

Closed 9 months ago

Last modified 9 months ago

#22652 closed defect (fixed)

DataIntegrityProblemException: Complete node with null coordinates -- converting GPX markers layer to data layer

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

Description

What steps will reproduce the problem?

  1. Import GPX file
  2. Convert to data layer

What is the expected result?

Should become a data layer

What happens instead?

Crashes

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

Revision:18622
Build-Date:2023-01-04 12:54:08

Identification: JOSM/1.5 (18622 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19045)
Memory Usage: 526 MB / 3012 MB (146 MB allocated, but free)
Java version: 17.0.5+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.25×1.25)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18622, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]
Dataset consistency test: No problems found

Last errors/warnings:
- 00000.485 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.490 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00003.683 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
- 00136.983 E: Handled by bug report queue: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Complete node with null coordinates: {Node id=-139578 version=0 VT }



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (24) of main
org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Complete node with null coordinates: {Node id=-139578 version=0 VT }
	at org.openstreetmap.josm.data.osm.Node.setDataset(Node.java:205)
	at org.openstreetmap.josm.data.osm.DataSet.lambda$addPrimitive$5(DataSet.java:518)
	at org.openstreetmap.josm.data.osm.DataSet.update(DataSet.java:1008)
	at org.openstreetmap.josm.data.osm.DataSet.addPrimitive(DataSet.java:511)
	at org.openstreetmap.josm.gui.layer.gpx.ConvertFromMarkerLayerAction.convert(ConvertFromMarkerLayerAction.java:55)
	at org.openstreetmap.josm.gui.layer.gpx.ConvertToDataLayerAction.actionPerformed(ConvertToDataLayerAction.java:67)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Attachments (0)

Change History (9)

comment:1 by taylor.smock, 17 months ago

Owner: changed from team to anonymous
Status: newneedinfo
Summary: Crash while converting GPX markers layer to data layerDataIntegrityProblemException: Complete node with null coordinates -- converting GPX markers layer to data layer

@anonymous: It would be highly helpful to have a sample GPX file where this happens.

The only way for this to happen, given the code, is if marker.getCoor() returns null or an invalid LatLon at ConvertFromMarkerLayerAction.java#L36.

comment:2 by taylor.smock, 9 months ago

Resolution: needinfo
Status: needinfoclosed

comment:3 by GerdP, 9 months ago

It's easy to reproduce. Edit a valid gpx file and remove the lat/lon values for a wpt, e.g.

<wpt lat="52.800715" lon="7.907797">
  <name>42</name>
</wpt>

gets

<wpt >
  <name>42</name>
</wpt>

JOSM doesn't complain when you open such a *.gpx file and crashes when you try to convert the Markers layer.

comment:4 by taylor.smock, 9 months ago

Resolution: needinfo
Status: closedreopened

comment:5 by taylor.smock, 9 months ago

Do we have any idea of what we should do? I think we should error out early (on load) and maybe offer to continue if the user wants us to.

comment:6 by GerdP, 9 months ago

I think it would be okay to reject the input file with a proper message saying what's wrong. We'll find out soon enough if there are generators which create this error and users still want to import the remaining data.

comment:7 by taylor.smock, 9 months ago

Resolution: fixed
Status: reopenedclosed

In 18817/josm:

Fix #22652: Stop parsing gpx files when wpt elements do not have valid coordinates

This does move the parsing code out of GpxReader into GpxParser and refactors it
so that it is (hopefully) easier to understand and debug.

comment:8 by taylor.smock, 9 months ago

Milestone: 23.08

I'm not handling the other objects that might cause issues, specifically trkpt and rtept since when I did the same thing for wpt, it just caused a failure in parsing the file without adding additional context. And debugging wasn't terribly helpful. I would anticipate trkpt and rtept to be less likely than wpt to have missing lat/lon information. But I could be wrong.

comment:9 by taylor.smock, 9 months ago

In 18819/josm:

See #22652, r18817: Stop parsing gpx files when point elements have invalid coordinates

This adds back the wpt check that was temporarily removed in r18818 to get back
to the previous "known good" state and additionally adds checks for rtept and
trkpt elements.

This also removes a change to build.xml that was accidentally committed in r18818.
The specific change (adding Automatic-Module-Name to the JOSM manifest) will
probably be done in a separate commit in the future.

Modify Ticket

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