Modify

Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#23001 closed defect (fixed)

Converting data layer to gpx layer failed

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

Description

What steps will reproduce the problem?

  1. Record track with GPS logger GNS3000
  2. Convert result to GPX by using gpsbabel
  3. Load GPX file in josm
  4. Convert GPX Layer to data layer
  5. Edit GPX Layer deleting some nodes [5a. Save layer as OSM file, 5b. save layer as GPX file]
  6. Convert GPX Layer to data layer

What is the expected result?

successfull conversion

What happens instead?

crash

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-06-02 17:23:29 +0200 (Fri, 02 Jun 2023)
Revision:18746
Build-Date:2023-06-03 01:31:02
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18746 de) Linux Ubuntu 18.04.6 LTS
Memory Usage: 314 MB / 1024 MB (66 MB allocated, but free)
Java version: 11.0.19+7-post-Ubuntu-0ubuntu118.04.1, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1080 (scaling 1.00×1.00) :0.1 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: de_DE.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: de_DE
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: KDE
Java package: openjdk-11-jre:amd64-11.0.19+7~us1-0ubuntu1~18.04.1
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-20ubuntu0.1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:all-20171026-2
Program arguments: [LOG00011.gpx]

Plugins:
+ CADTools (1008)
+ ColorPlugin (v1.1.2.1)
+ apache-commons (36034)
+ apache-http (35924)
+ buildings_tools (36011)
+ imagery_offset_db (36079)
+ jna (36005)
+ terracer (36079)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/MaxspeedIcons&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1

Last errors/warnings:
- 00340.048 E: Handled by bug report queue: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Float (java.lang.String and java.lang.Float are in module java.base of loader 'bootstrap')



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (20) of main
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Float (java.lang.String and java.lang.Float are in module java.base of loader 'bootstrap')
	at org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper.calculateColors(GpxDrawHelper.java:662)
	at org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper.drawAll(GpxDrawHelper.java:486)
	at org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper.paint(GpxDrawHelper.java:413)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:469)
	at org.openstreetmap.josm.gui.MapView.drawMapContent(MapView.java:584)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:491)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JSplitPane.paintChildren(JSplitPane.java:1024)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5255)
	at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:246)
	at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1323)
	at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5203)
	at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5013)
	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:865)
	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:848)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:848)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:823)
	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:772)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1890)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Attachments (2)

LOG00011.gpx (2.0 MB ) - added by hatzfeld 18 months ago.
GPS track in Würzburg (Germany)
LOG00011-simplified.gpx.osm (207.9 KB ) - added by hatzfeld 18 months ago.
Loading this file into josm and trying to convert the layer to GPX is a more direct way to reproduce the bug

Change History (6)

by hatzfeld, 18 months ago

Attachment: LOG00011.gpx added

GPS track in Würzburg (Germany)

by hatzfeld, 18 months ago

Attachment: LOG00011-simplified.gpx.osm added

Loading this file into josm and trying to convert the layer to GPX is a more direct way to reproduce the bug

comment:1 by taylor.smock, 18 months ago

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

comment:2 by taylor.smock, 18 months ago

It looks like we aren't changing the values back to the "expected" values.

comment:3 by taylor.smock, 18 months ago

Resolution: fixed
Status: newclosed

In 18753/josm:

Fix #23001: ClassCastException in GpxDrawHelper#calculateColors

This occurs when a working GPX file with HDOP information is converted to an OSM
Data Layer and back to a GPX Data Layer. This is fixed by (a) converting casts
for get operations to Number instead of Float/Integer and (b) actually
putting the number in the attribute map instead of a string.

comment:4 by taylor.smock, 18 months ago

Milestone: 23.06

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. 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.