Modify

#22968 closed defect (fixed)

ClassCastException in RoutingGraph#applyAlgorithm

Reported by: anonymous Owned by: franpd
Priority: normal Milestone:
Component: Plugin routing Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

What is the expected result?

What happens instead?

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

Revision:18721
Build-Date:2023-05-03 12:38:30

Identification: JOSM/1.5 (18721 en_GB) Windows 10 64-Bit
OS Build number: Windows 10 Enterprise 2009 (19045)
Memory Usage: 1082 MB / 4096 MB (618 MB allocated, but free)
Java version: 17.0.7+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 2560×1440 (scaling 1.25×1.25)
Maximum Screen Size: 2560×1440
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_GB
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18721, --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

Plugins:
+ log4j (36045)
+ routing (36066)

Last errors/warnings:
- 00001.005 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00001.022 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00005.348 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
- 00295.170 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.gui.layer.OsmDataLayer cannot be cast to class com.innovant.josm.plugin.routing.RoutingLayer (org.openstreetmap.josm.gui.layer.OsmDataLayer is in unnamed module of loader 'app'; com.innovant.josm.plugin.routing.RoutingLayer is in unnamed module of loader org.openstreetmap.josm.plugins.PluginClassLoader @6fca5907)
- 00312.685 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.gui.layer.OsmDataLayer cannot be cast to class com.innovant.josm.plugin.routing.RoutingLayer (org.openstreetmap.josm.gui.layer.OsmDataLayer is in unnamed module of loader 'app'; com.innovant.josm.plugin.routing.RoutingLayer is in unnamed module of loader org.openstreetmap.josm.plugins.PluginClassLoader @6fca5907)
- 00312.914 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.gui.layer.OsmDataLayer cannot be cast to class com.innovant.josm.plugin.routing.RoutingLayer (org.openstreetmap.josm.gui.layer.OsmDataLayer is in unnamed module of loader 'app'; com.innovant.josm.plugin.routing.RoutingLayer is in unnamed module of loader org.openstreetmap.josm.plugins.PluginClassLoader @6fca5907)
- 00315.698 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.gui.layer.OsmDataLayer cannot be cast to class com.innovant.josm.plugin.routing.RoutingLayer (org.openstreetmap.josm.gui.layer.OsmDataLayer is in unnamed module of loader 'app'; com.innovant.josm.plugin.routing.RoutingLayer is in unnamed module of loader org.openstreetmap.josm.plugins.PluginClassLoader @6fca5907)



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (22) of main
java.lang.ClassCastException: class org.openstreetmap.josm.gui.layer.OsmDataLayer cannot be cast to class com.innovant.josm.plugin.routing.RoutingLayer (org.openstreetmap.josm.gui.layer.OsmDataLayer is in unnamed module of loader 'app'; com.innovant.josm.plugin.routing.RoutingLayer is in unnamed module of loader org.openstreetmap.josm.plugins.PluginClassLoader @6fca5907)
	at com.innovant.josm.jrt.core.RoutingGraph.applyAlgorithm(RoutingGraph.java:317)
	at com.innovant.josm.plugin.routing.RoutingModel.getRouteEdges(RoutingModel.java:118)
	at com.innovant.josm.plugin.routing.RoutingLayer.paint(RoutingLayer.java:246)
	at org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable$CompatibilityModeLayerPainter.paint(AbstractMapViewPaintable.java:27)
	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(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedFPScales(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent._paintImmediately(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintImmediately(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$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.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(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.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 (2)

comment:1 by taylor.smock, 21 months ago

Component: CorePlugin routing
Owner: changed from team to franpd
Summary: Not workingClassCastException in RoutingGraph#applyAlgorithm

comment:2 by taylor.smock, 21 months ago

Resolution: fixed
Status: newclosed

In 36085/osm:

Fix #22968: ClassCastException in RoutingGraph#applyAlgorithm

The problem pretty much comes down to the active layer not being the routing
layer.

This additionally fixes many SonarLint issues and drops a dependency on log4j.

Modify Ticket

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