Modify ↓
Opened 4 years ago
Closed 4 years ago
#21359 closed defect (duplicate)
CCE: Way cannot be cast to Node at SortPTRouteMembersAction.sortPTRouteMembers
| Reported by: | anonymous | Owned by: | Biswesh |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin pt_assistant | Version: | |
| Keywords: | template_report sort | Cc: |
Description
What steps will reproduce the problem?
- Install pt_assistant
- Select relation 11052105 and validate
- Click on "Route contains gap that can be fixed by sorting"
- Click on fix
What is the expected result?
Sort relation, remove problem
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: 2021-06-02 22:03:39 +0200 (Wed, 02 Jun 2021) Revision:17919 Build-Date:2021-06-02 20:11:30 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17919 en) Linux Ubuntu 20.04.2 LTS Memory Usage: 698 MB / 1912 MB (396 MB allocated, but free) Java version: 11.0.11+9-Ubuntu-0ubuntu2.20.04, Ubuntu, OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: :0.0 2560×1440 (scaling 2.00×2.00) Maximum Screen Size: 2560×1440 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: en_CA.UTF-8 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_CA Numbers with default locale: 1234567890 -> 1234567890 Desktop environment: ubuntu:GNOME Java package: openjdk-11-jre:amd64-11.0.11+9-0ubuntu2~20.04 Java ATK Wrapper package: libatk-wrapper-java:all-0.37.1-1 fonts-noto: fonts-noto:- Dataset consistency test: No problems found Plugins: + buildings_tools (35756) + pt_assistant (1ff2e15) + terracer (35640) Map paint styles: + https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1 Last errors/warnings: - 00162.806 E: Failed to locate image 'bus.png' - 01385.380 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.data.osm.Way cannot be cast to class org.openstreetmap.josm.data.osm.Node (org.openstreetmap.josm.data.osm.Way and org.openstreetmap.josm.data.osm.Node are in unnamed module of loader 'app') === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (19) of main java.lang.ClassCastException: class org.openstreetmap.josm.data.osm.Way cannot be cast to class org.openstreetmap.josm.data.osm.Node (org.openstreetmap.josm.data.osm.Way and org.openstreetmap.josm.data.osm.Node are in unnamed module of loader 'app') at org.openstreetmap.josm.data.osm.RelationMember.getNode(RelationMember.java:71) at org.openstreetmap.josm.plugins.pt_assistant.actions.SortPTRouteMembersAction.sortPTRouteMembers(SortPTRouteMembersAction.java:484) at org.openstreetmap.josm.plugins.pt_assistant.validation.RouteChecker.fixSortingError(RouteChecker.java:350) at org.openstreetmap.josm.plugins.pt_assistant.validation.PTAssistantValidatorTest.fixError(PTAssistantValidatorTest.java:478) at org.openstreetmap.josm.data.validation.TestError.getFix(TestError.java:433) at org.openstreetmap.josm.gui.dialogs.ValidatorDialog$FixTask.fixError(ValidatorDialog.java:630) at org.openstreetmap.josm.gui.dialogs.ValidatorDialog$FixTask.realRun(ValidatorDialog.java:658) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
Attachments (0)
Change History (3)
comment:1 by , 4 years ago
| Keywords: | sort added |
|---|
comment:2 by , 4 years ago
They are the same but has a bit different stack traces because of the plugin versions.
I miss a YouTrack/Jira/GitHub like ticket reference system in Trac. Doing it by hand is error-prone and mechanical work.
comment:3 by , 4 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
| Summary: | pt assistant sorting bug → CCE: Way cannot be cast to Node at SortPTRouteMembersAction.sortPTRouteMembers |
Closed as duplicate of #19480.
It looks like PT_Assistant assumes all stop positions are nodes. It really should do validation earlier. Or not assume that all stop positions are nodes.
Note:
See TracTickets
for help on using tickets.



Similar to or duplicate of #19480 and #19640.