[kovarex] [0.17.66] Adding a rail signal causes waypoint stops to malfunction

This subforum contains all the issues which we already resolved.
Post Reply
rain9441
Inserter
Inserter
Posts: 42
Joined: Sat Dec 16, 2017 10:30 pm
Contact:

[kovarex] [0.17.66] Adding a rail signal causes waypoint stops to malfunction

Post by rain9441 »

I'm using waypoint stops pretty extensively on a map. Waypoint stops are train destinations that have no wait condition - the train simply drives past it. As of one of the most recent patches, my trains have randomly been stopping at the waypoint stops and no-pathing.

I did some testing and found the cause. When you place a rail signal on the map (anywhere, does not have to even be a connected rail), and at the same time a train is passing by its waypoint stop, it will malfunction. This only happens if the train has a destination stop with no orders and it is currently directly adjacent to that stop the moment the rail signal is placed. When this happens, the train pases by the destination stop but continues to have it's order set to the waypoint station it had just passed. In my case, there was no way to route back to the way point station so it would stop and no path.

Here is a short 1 minute video that shows how to reproduce this: https://youtu.be/J07TbHzy4Es

I would expect that the moment a train can successfully path to a train stop that it is traveling to without wait conditions it immediately changes its destination to the next train stop that is on its schedule, regardless of how many rail signals I place.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2227
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.66] Adding a rail signal causes waypoint stops to malfunction

Post by boskid »

Ha! i see the bug. This is tightly related to fix of 73653

Issue is around when stations are reached. By fix of above issue, regular stations are reached when point in 1/6 of locomotive distance from head of train reaches station. However what i see, waypoints are reached when 1/2 of locomotive distance from head of train reaches station. This creates this bug that when train repaths when station is in between of 1/6 and 1/2, it will repath trying again to reach waypoint A/B and because it is already ahead, it cannot back of.

Here is my reproduction based on your video:
74678-t-rain-s.zip
(488.79 KiB) Downloaded 102 times
Just load and play, at some point in time they will enter no path

-- edit:
Here is abuse of this issue: train will go past "Almost B" train station, but not enough to mark it as reached. When train waits on chain signal it still is marked as going for "Almost B" when it is already on route to "B". After 5 seconds of waiting on chain signal, it repaths and this forces train to perform one circle to again go for "Almost B" station
74678-issue-escalated.zip
(273.42 KiB) Downloaded 110 times
74678-loop.gif
74678-loop.gif (2.54 MiB) Viewed 2823 times

Stevetrov
Fast Inserter
Fast Inserter
Posts: 125
Joined: Tue Jun 14, 2016 7:04 am
Contact:

Re: [kovarex] [0.17.66] Adding a rail signal causes waypoint stops to malfunction

Post by Stevetrov »

https://www.reddit.com/r/factorio/comme ... d_no_path/ seems to be another example of the same problem.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [0.17.66] Adding a rail signal causes waypoint stops to malfunction

Post by kovarex »

Thanks for the report, the fix was more obvious then I thought, and the bugfix just uncovered slight problem in the logic.

Fixed for the next release.
changelog wrote:
  • Fixed that train schedule waypoint was considered to be passed when train departured the related rail rather when it entered it.

Post Reply

Return to “Resolved Problems and Bugs”