Page 1 of 1

[Rseding91] [0.17.58] Trainmanager doesn't check for the station surface

Posted: Mon Jul 22, 2019 5:47 pm
by Haphollas
I am currently playing Space Exploration (several surfaces) and I am using a train system which relies on disabled stations.
I saw that a train had a 'no path' error on one of my surfaces (Nauvis Orbit) because the station was disabled. Usually, the train will skip that station and head to the next one. The problem is that on another surface (galactic Graveyard in my game) I have a stop with exactly the same name which was enabled.
It looks like the train manager only checks for station names and not for the surface.

The reason why i think this is a bug:
- If you setup a schedule you only see the train stops at that specific surface. (even if they are in separate rail networks) - It is not possible to choose a station from another surface.
- My trainsystem works without flaws when using stations with the same name on one surface (enable / disable them on storage signals). Due to the fact that i'm using circuits to control the trains the train system is separated from other surfaces.
- The 'no path' error only occours if a train stop on the current surface is disabled but a station on another surface with exactly the same name in enabled.

Savegame: https://drive.google.com/open?id=1EWQpp ... 10CVy_atyN
You can use the constant combinator next to the character to enable / disable the train stop.

Re: [0.17.58] Trainmanager doesn't check for the station surface

Posted: Tue Jul 23, 2019 9:55 am
by Rseding91
Thanks for the report. I loaded up your save but the train drove away before I could see that it was no-pathing. Is that how it's supposed to work?

Re: [Rseding91] [0.17.58] Trainmanager doesn't check for the station surface

Posted: Tue Jul 23, 2019 10:29 am
by Haphollas
Steps to reproduce:
Enable the station (the constant combinator should be switched to 'On') - a train should be dispatched from the depot
Before the train reaches the train stop turn the constant combinator off - this will shut down the train stop and the train will have a no path error. I think it is because the rerouting can see a station with the same name on another surface

Re: [Rseding91] [0.17.58] Trainmanager doesn't check for the station surface

Posted: Tue Jul 23, 2019 10:40 am
by Loewchen
Just to be sure, you still have an active station of that name on the main surface? A train will NOT skip a station when no station of said name is active afaik.

Re: [Rseding91] [0.17.58] Trainmanager doesn't check for the station surface

Posted: Tue Jul 23, 2019 11:07 am
by Haphollas
Loewchen wrote:
Tue Jul 23, 2019 10:40 am
Just to be sure, you still have an active station of that name on the main surface? A train will NOT skip a station when no station of said name is active afaik.
Space Exploration works with several surfaces. You can switch between the surfaces by pressing 'N' (or use the navigation satelite button in the hotbar)
The interesting surfaces are:
Nauvis Orbit (one station which is named [item=water-ice] Water Ice [/color=red]OUT[/color] )
Galactic Graveyard (the station over there is also named [item=water-ice] Water Ice [/color=red]OUT[/color] )

In my trainsystem (circuit based) i disable the stations based on supply / demand. Usually the train will skip the train stop as soon as it is disabled. Yesterday during my stream i found a train with a no path error. I could track it back because the stop in Nauvis Orbit was disabled (i had only one over there) while the stop at galactic graveyard was active (mining outpost).

I could try to make a video of the issue.

EDIT:

It is confusing because:
- In the train schedule you can only choose stations of the current surface -It doesn't matter if the rail networks are connected or not.
- As soon as the train tries to repath there is no check if the station with the same name is on the same surface as the train - This is causing the issue.

Due to the fact that there is a surface check in the schedule i would assume that the same check would be done in the trainmanager / pathfinder when repathing - which is not the case.

Re: [Rseding91] [0.17.58] Trainmanager doesn't check for the station surface

Posted: Tue Jul 23, 2019 11:34 am
by Rseding91
Can you give me a save file which shows a train that's no-pathing that shouldn't be? I want to test that my fix actually works but your reproduction steps involve first fixing mods so they load then figuring out your rail system and it's just too much to do for what should have already been a "load save, see it's broken".

Re: [Rseding91] [0.17.58] Trainmanager doesn't check for the station surface

Posted: Tue Jul 23, 2019 12:15 pm
by Haphollas
Ok i removed a lot of mods (except for space eploration) and uploaded a 'Debug_no_path.zip' to the google drive
The left train is working as intended - the right one tries to reach a train stop in space (different surface).
You can enable / disable the Unloading trainstops with the constant combinator.

Re: [Rseding91] [0.17.58] Trainmanager doesn't check for the station surface

Posted: Tue Jul 23, 2019 1:18 pm
by Rseding91
Ok, thanks for the save file. It's now fixed for the next version of 0.17.