The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: peehaa on October 03, 2016, 06:25:16 PM

Title: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: peehaa on October 03, 2016, 06:25:16 PM
In one-staff driving mode with only one train in the game, the train is skipping a lot of stations and/or returning mid route. A save game can be found at: http://simutrans-germany.com/files/upload/train_one-staff_problems.sve

After leaving depot and going to the end of the line, trains have trouble returning, sometimes not beiing able to return to the first station, or to any station on the return route. Afterward you usually see the train pendel between two stations.
Sometimes you can send a train to the previous station and a new turn can be made. Otherwise you have to reload an older save.

Edit:
It is quite easy to see when it happens, because the train is not turning the way it is supposed to, but driving over itself.
Title: Re: Trains in one-staff-mode are not delivering goods
Post by: Ves on October 03, 2016, 07:43:30 PM
Hi Peehaa, and welcome to the forums!

I think James is going to ask you which executable you are using (which one did you download or is it self compiled). :-)
Title: Re: Trains in one-staff-mode are not delivering goods
Post by: jamespetts on October 03, 2016, 08:48:28 PM
Indeed - it would be very helpful if you could confirm that. A second welcome to the forums from me, too! It is always good to see new people.
Title: Re: Trains in one-staff-mode are not delivering goods
Post by: peehaa on October 05, 2016, 07:52:21 AM
I use a self compiled executable from the devel-new-2 branch. I was using 411112e, while I have not tested it with the current version, I am quite confident that it has the same bug, since I do not see any relevant changes (unless it this bug comes from a really strange file).
The pak is also self compiled.
I am using 32-bit Linux with gcc, but my computer is not as fast as I would like so I will not build a new executable every day.
Title: Re: Trains in one-staff-mode are not delivering goods
Post by: jamespetts on October 06, 2016, 12:03:49 AM
Thank you for confirming that. However, I am afraid that I cannot download your saved game: it reports that the file was not found on the server. Would you be able to make it available again? I should be most grateful.
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: peehaa on October 06, 2016, 09:37:43 AM
I have uploaded the savegame again, at the same url.
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: jamespetts on October 06, 2016, 08:47:10 PM
I am afraid that I cannot load your saved game: did you create it using a custom-built pakset?
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: peehaa on October 06, 2016, 10:33:02 PM
That might be a possibility, I will rebuilt my pakset and resave the file or make a new file that shows the problem.
Although it is not too difficult to reproduce:
-Build a track with a couple stations (I have always used 5 or more).
-Build a depot and a convoy (I have not used other than steam traction).
-Build a cabinet in between the depot and the main line and start the convoi. At first it starts correctly, but after returning the train stays in one-staff mode, but the problems start.

This is not a problem with the current pakfile though, I have run in to this problem before a couple times, when I did have a stock pakfile.

Edit: Also I used xml_bzip2 for the saveformat.
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: jamespetts on October 06, 2016, 10:38:15 PM
You write, "this is not a problem with the current pakfile"; do you mean that you cannot reproduce this with the pakset built from the half-heights branch unaltered?
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: peehaa on October 06, 2016, 10:53:54 PM
Sorry, typo: I meant it is not a problem of the current pakfile.
That is why I did end with stating that I also ran into this problem with a stock pakfile.

Uploaded the same? file at http://simutrans-germany.com/files/upload/train_one-staff_problems-3.sve
I hope you can open this one, I know I can, which was not the case with the previous two. It is also saved in a different format
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: jamespetts on October 12, 2016, 06:16:30 PM
I am afraid that I cannot download the latest version of the file; do they expire after a few days? I am often not able to respond to a bug report for a few days if I am busy with other things, as I have been in the last few days.
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: jamespetts on October 14, 2016, 12:00:25 AM
I have now managed to reproduce this on my own testing setup, but I am afraid that I have not had time to try to find the fix to this as I have spent a long time trying to fix the reversing issue (which I hope is fixed now). I will have another look at this when I have time (although I need to make quite a lot of pudding this week-end); thank you for the report.
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: jamespetts on October 14, 2016, 11:13:17 PM
I think that I have managed to fix this now - would you be able to re-test?  Thank you for reporting this.
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: peehaa on October 17, 2016, 04:03:44 PM
The bug I posted is solved, but now we have an old bug back.

Trains do not seem to come out of one-train-staff mode. Not with end of signalling, not at a station. This breaks signalling severly when you upgrade from a one convoy line to a multi convoy line. The only way to get it out of one-train-staff mode is by sending it to its depot.

I hope you can solve this problem as well.
Title: Re: [devel-new-2] Trains in one-staff-mode are not delivering goods
Post by: jamespetts on October 17, 2016, 04:15:07 PM
I have just tested this briefly, and trains do seem to exit one train staff mode correctly when they encounter a one train staff cabinet in the way described in this (https://www.youtube.com/watch?v=iqmP8ju9YYE) video. A station should not cause a train to leave the one train staff working method, as a stretch of line with multiple stations might all be part of a one train staff section (as demonstrated in the video): a train should leave one train staff only if it encounters a signal or a sign to the opposite effect.

I will look into the end of signalling sign apparently not working to this end.

Edit: Actually, on proper consideration, I do not think that this is a bug, as only passing a one train staff cabinet should allow a train to exit the one train staff working method, as only by doing so can it release its staff for the line. One train staff is not intended to be used in the same way as staff and ticket working (which would be too prone to deadlocks if implemented accurately, or not significantly different from token block if implemented inaccurately so as to avoid deadlocks): it is intended to be used only either on entirely self-contained railways with a single train in operation, or on dead-end sections, as shown in the video. In neither of these cases is it possible to have a system in which one train staff mode can be exited except by passing the original cabinet (or one right next to it). Given that, if you are upgrading a railway from one train operation to multiple train operations, you will only ever need to send one train to the depot, this is not too great a hardship. It is hard to think of any other way that this could work, as allowing a signal or sign other than a one train staff cabinet to take a train out of the one train staff working method would violate the basic assumptions of the system.