Create icon indicating copy to clipboard operation
Create copied to clipboard

Train routing fails despite route being available.

Open SabrCat opened this issue 1 year ago • 2 comments

Description

A bit of a peculiar one. I have a setup like this:

Image

the station home is at the bottom, the upper two stations have post boxes (Ignore the middle rail, that was for other tests). The train schedule looks like this:

Image

As you can see, the train should go to the first package, then go to a second package if it exists, then return home. This works as expected most of the time. (both entries of the schedule are configured to target packages targeting home, the name of the station and mailbox at the bottom.)

However, when the top left station has a package inserted, then the train leaves home, and then there's a package inserted into the top right station, the train will pathfind correctly to the top left station, and then it's pathfinding fails despite there clearly being a path around the loop and to the second station.

Image

I am guessing this happens because the pathfinding for packages does not respect station or train direction, finds the shortest path which would be backwards along the line, and then fails to apply that to the train. This is reinforced by the fact that if the rail between the top right and top left station is broken, the pathfinding fixes itself.

New World.zip here is a world download. If you choose to use it just press the button between the top two stations. It will put a package into the top left, wait a bit for the train to depart, then put a package into the top right station, causing the bug reliably.

I've also observed something else interesting: Occasionally, when breaking the track between the top two stations to fix the pathfinding and then repairing the track, the train overshot the top right station, rolled past it very slowly, then went around for another loop to actually stop and collect the package. Seems like it occasionally miscalculates it's braking distance.

Game Log

https://mclo.gs/1n1ypAI

Debug Information

Client Info
Create:
	Mod Version: 6.0.1
	NeoForge Version: 21.1.127
	Minecraft Version: 1.21.1

Graphics:
	Flywheel Version: 1.0.1-11
	Flywheel Backend: flywheel:indirect
	OpenGL Renderer: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2
	OpenGL Version: 4.6.0 NVIDIA 560.94
	Graphics Mode: Fancy

System Information:
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 21.0.3, Microsoft
	JVM Flags: 5 total; -XX:+UseShenandoahGC -XX:+AlwaysPreTouch -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms10240m -Xmx10240m
	Memory: 9694610120 bytes (9245 MiB) / 10737418240 bytes (10240 MiB) up to 10737418240 bytes (10240 MiB)
	Total Memory: 30339874816 bytes (28922 MiB) / 34255409152 bytes (32655 MiB)
	CPU: AMD Ryzen 9 5900X 12-Core Processor @ 3.70 GHz; 12 cores / 24 threads on 1 socket(s)
	Graphics cards: none

Other Mods:
	Ponder: 1.0.39
Server Info
Create:
	Mod Version: 6.0.1
	NeoForge Version: 21.1.127
	Minecraft Version: 1.21.1

System Information:
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 21.0.3, Microsoft
	JVM Flags: 5 total; -XX:+UseShenandoahGC -XX:+AlwaysPreTouch -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms10240m -Xmx10240m
	Memory: 9694610120 bytes (9245 MiB) / 10737418240 bytes (10240 MiB) up to 10737418240 bytes (10240 MiB)
	Total Memory: 30339874816 bytes (28922 MiB) / 34255409152 bytes (32655 MiB)
	CPU: AMD Ryzen 9 5900X 12-Core Processor @ 3.70 GHz; 12 cores / 24 threads on 1 socket(s)
	Graphics cards: none

Other Mods:
	Ponder: 1.0.39

SabrCat avatar Mar 03 '25 00:03 SabrCat

I just did some more testing because I was curious if the bug still occurred if the rail segment between the stations was split by a signal. Unfortunately, even with this split, the bug still occurs.

This also confirms the bug is still present in 6.0.3 which I just downloaded.

Image

New debug info for my current tests:

Client Info
Create:
	Mod Version: 6.0.3
	Mod Git Commit: 7f14bcc64b0eed202617fe08f0dbf5a1e74443d3
	Ponder Version: 1.0.45
	NeoForge Version: 21.1.133
	Minecraft Version: 1.21.1

Graphics:
	Flywheel Version: 1.0.1-11
	Flywheel Backend: flywheel:indirect
	OpenGL Renderer: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2
	OpenGL Version: 4.6.0 NVIDIA 560.94
	Graphics Mode: Fancy

System Information:
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 21.0.3, Microsoft
	JVM Flags: 5 total; -XX:+UseShenandoahGC -XX:+AlwaysPreTouch -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms10240m -Xmx10240m
	Memory: 4377839776 bytes (4175 MiB) / 10737418240 bytes (10240 MiB) up to 10737418240 bytes (10240 MiB)
	Total Memory: 6367902360 bytes (6072 MiB) / 10737418240 bytes (10240 MiB)
	CPU: AMD Ryzen 9 5900X 12-Core Processor @ 3.70 GHz; 12 cores / 24 threads on 1 socket(s)
	Graphics cards: none

Other Mods:
	EMI: 1.1.20+1.21.1+neoforge
	Jade Addons: 0.0NONE
	Jade: 15.10.0+neoforge
	HotBaaaar: 0.2.0
Server Info
Create:
	Mod Version: 6.0.3
	Mod Git Commit: 7f14bcc64b0eed202617fe08f0dbf5a1e74443d3
	Ponder Version: 1.0.45
	NeoForge Version: 21.1.133
	Minecraft Version: 1.21.1

System Information:
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 21.0.3, Microsoft
	JVM Flags: 5 total; -XX:+UseShenandoahGC -XX:+AlwaysPreTouch -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms10240m -Xmx10240m
	Memory: 4377839776 bytes (4175 MiB) / 10737418240 bytes (10240 MiB) up to 10737418240 bytes (10240 MiB)
	Total Memory: 6367902360 bytes (6072 MiB) / 10737418240 bytes (10240 MiB)
	CPU: AMD Ryzen 9 5900X 12-Core Processor @ 3.70 GHz; 12 cores / 24 threads on 1 socket(s)
	Graphics cards: none

Other Mods:
	EMI: 1.1.20+1.21.1+neoforge
	Jade Addons: 0.0NONE
	Jade: 15.10.0+neoforge
	HotBaaaar: 0.2.0

SabrCat avatar Mar 14 '25 14:03 SabrCat

It does seem that this error does not always occur reliably. When I started the world again for testing, the error did not occur on the first three button presses, but after that, the error did occur almost every time.

I have also just tried making the train drive the route normally without the package insertions. It appears that the issue can be replicated with a purely manual schedule too, with no packages or postboxes involved.

Even when manually driving the train to the first station, then giving it a schedule to go to the second, it fails to do so.

SabrCat avatar Mar 14 '25 14:03 SabrCat