Why won’t the train go to the depot for regular maintenance

openttd

In all games I play it seems like my trains are not doing scheduled maintenance at all even though they are scheduled to do so every 150 days. This only happens to my trains i.e. it works fine for planes, road vehicles and ships.

I usually have path signals on my tracks – but it does not seem to differ if I have a path signal in front of the depot or not.

Am I missing something specific to trains regarding the maintenance? Can they use any depot or are they bound to specific ones?

Update: I made a minimal reproduction of my issue and it seems that the train stops doing maintenance when I put the path signal as on the image below (removing the signal and the train immediately goes to the depot). But I am not sure why that signal prevents the maintenance?

Depot with one path signal

Best Answer

Shamelessly copying from Jon:

According to the wiki, the "Two-Way" path signal triggers a penalty in the pathfinder algorithm for trains passing through it on it's back side. I'd venture a guess that when a train is trying to find a maintenance depot, there may be a bug (or feature) where the pathfinder rules out that depot due to the path-finding penalty.