Trains get removed from request schedule due to bug

Fixed Trains
Captain Jeremy Captain Jeremy · 11 months ago

And none of the mods alter anything to do with trains?

I also find it very strange that it only happens in one place, and rarely. When trains check other destinations they always keep the one they're currently going to in reserve, in case none of those destinations are closer, so the slot should never be stolen.

slopth [discord] · 11 months ago

COIE does yes - it doubles all the train capacity and station capacity

though ive not fiddled with anything else, just the default increase it applies.

happening to only one specific station is the most perplexing, especially since there is an identical rock loading station directly next to it

maybe its RNG and hasn't happened to that one yet idk

raciper [discord] · 11 months ago

I've captired 5 saves just before the back up happened where the train stopped mid tracks, every time the re-loaded save did not show the stopping. The only difference is on the reply I am just watching, and not playing. Something is causing it with my actions, that causes the which N trains are going to the stop and that train does not make the cut. When I removed station limits, the trains did not stop mid tracks any more. There is a problem I have 12 two-car diesel tanker trains and 16 4-car watertankers trains that reload the station when they run low on fuel, when a station runs low, the request ALL of them. In that case I am happy when trains get re-routed after leaving the station. Usually they reroute. after the first two show up, but in some case they all rerouote and the demand goes unmet.

I have tried forcing it by pausing the game, breaking and rebuilding tracks, but so far cannot make it happen.

I finally just move on and removed station limit on the stations that were causing the issue, there were only two Sausage loading (the first train would pick up all the sausage, and second would stop), the other was copper scap, where first strain would pick up all the scrap, and second would stop. in both cases the stations where near busy interections there the time between two trains even starting right behind each other, would get separated by traffic and may ba a minute or two between arrivals, or in some cases the second train would be re-routed and arrive first.

eryk500 [discord] · 11 months ago

Ok, how about this, is it possible to leave the game running & have this happen
(basically have it happen on it's own, when not interacting with the game) 🤔.

This will require at least one of the players that have this happen to leave the game running
(likely while doing something else besides playing the game,
as doing nothing but looking is pretty boring) & watch over the problem areas.

slopth [discord] · 11 months ago

I think the prupose is so the devs can monitor the code and see how it breaks, and, run a/b testing on a potential fix

Step 1 is they gotta recreate

Captain Jeremy Captain Jeremy · 11 months ago

Right. If it's very rare, but reproducible, it's much easier to find and test a fix. If it's something we can't even reproduce, we have no way of knowing if we've actually fixed it for certain, unless we find a clear bug in the code.

eryk500 [discord] · 11 months ago

Perhaps this is completely unrelated, but this looks like "dead code" to me;
if it wasn't supposed to be "dead", then this can be source of a bug,
assuming if both were meant to be triggereable in the game,
(this method is used to narrow down the available goals to ones with
the same priority, so they can be checked priority-by-priority,
it's likely a named lambda defined & used inside of the tryNavigateTo method of the Train class):

Potential_dead_code.png

Captain Jeremy Captain Jeremy · 10 months ago

Logs from the session where the train gets stuck may also be useful

We have some error logging in this code which may fire if something unexpected is happening, though that doesn't necessarily help us to track down the cause of that unexpected thing, it might!

slopth [discord] · 10 months ago

does it get saved to the log file?

image.png

or within the save itself

there's not a ton of info being displayed

image.jpg

Captain Jeremy Captain Jeremy · 10 months ago

Every play session should generate a log file in that directory. The play session with the bug may show something interesting.

Captain Marek Captain Marek · 10 months ago

This was fixed (by Jeremy) in patch v0.7.9a currently live on the Experimental branch. Struck trains won't unstuck themselves, so you need to either recover them or toggle their goal station, but trains should not get stuck again. If they do, please ping Jeremy. It will be available on the main branch in a few days. Please let us know if you test the experimental patch! Thanks for the report.

slopth [discord] · 10 months ago

ty - I never was able to capture it in the log file, I fell off playing the game around the time of this discussion. you guys are the best

Captain Marek Captain Marek · 10 months ago

These were the reproduction steps:

  1. The reservation to reserve the first block of the station (i.e. arrives) is done while a train has a pathfinding task queued.
  2. Module limits is set
  3. Module limits are not met at the point where the train arrives at the station so it refuses to "arrive" at the station and is dead-locked.
slopth [discord] · 10 months ago

I FINALLY got the issue to reproduce and get a usable log file.

Considering this issue has been fixed in the latest b497 build which I had not yet updated to, this data is probably of little use. But in case that this bugfix didn't work, here is the log file.

This log file is a short interval of time, between an autosave without bugged trains, and the final save with a bugged train.

the tricky bit is skimming through the log file, I don't see any unique error reports indicating a pathfinding issue. the errors which show up in the log file are present dozens of times throughout the rest of my log file from that play session, there isn't a unique error that occured during this final 15 minutes when the train became bugged.

here's the full log for reference

again, hopefully not needed as this issue should be fixed. much love to jeremy who figured it out without me helping provide info

2 attachments only for registered users
Captain Marek Captain Marek · 10 months ago

This should be fixed now, make sure you are running the latest patch. If it happens again, please share details and save, thanks!

Closed as ✅ Fixed

22 Showing 101–117 of 117