Author Topic: Train waiting for train staff is "moving" on the spot  (Read 694 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

Train waiting for train staff is "moving" on the spot
« on: March 12, 2017, 10:49:26 PM »
Watch a train waiting at one train staff box. It is emitting smoke and the speed in info box varies between 0-2 km/h.
Trains waiting for clearance at other signals have no smoke and speed constantly at zero. I have not checked if it also costs money as if running or not.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #1 on: April 01, 2017, 10:01:29 PM »
Can I ask whether this can still be reproduced, and, if it can, whether you can upload a saved game in which this can be seen? Thank you for the report.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #2 on: April 08, 2017, 11:11:56 AM »
This can be reproduced, save game here: http://server.exp.simutrans.com/debug-saves/one-train-staff.sve

Look for the train (55) - cattle train heading to bohdanovce farm

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #3 on: April 20, 2017, 11:22:49 PM »
I think that I have been able to fix this. Would you be able to re-test? I should be most grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #4 on: April 23, 2017, 11:24:53 AM »
The moving on spot is gone, but another error appeared: The first  train after passing the staff-box is still in track circuit mode, and second train is allowed to enter the area causing a deadlock. (while the seciond train preperly switches to on-staff mode)

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #5 on: April 23, 2017, 01:51:23 PM »
I think that I may have fixed this; would you be able to re-test? I should be most grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #6 on: April 23, 2017, 02:45:58 PM »
Oh no!
The T-signal segfault is back  :-[

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #7 on: April 23, 2017, 03:55:48 PM »
Can you give more detailed instructions on how to reproduce this? It is very unlikely to be exactly the same error though the symptoms may be similar.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #8 on: April 23, 2017, 04:39:00 PM »
Just load the on-train...save from above link. Quickly move to Osterskar station, and watch the DMU approaching, loading, reversing, and segfault

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #9 on: April 23, 2017, 07:24:37 PM »
I think that I have fixed this - would you be able to re-test?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #10 on: April 23, 2017, 08:57:15 PM »
T-signal bug is fixed, but the one-train staff is still broken. First train passes in track-circuit mode, and second train crashes the game:

FATAL ERROR: vector_tpl<T>::[] - 7koord3d: index out of bounds: 65528 not in 0..120
Aborting program execution ...

For help with this error or to file a bug report please see the Simutrans forum at
http://forum.simutrans.com
Neúspěšně ukončen (SIGABRT)

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #11 on: April 23, 2017, 09:18:59 PM »
I am afraid that I am not able to reproduce this. Can you give me exact steps to reproduce from the uploaded saved game? I should be most grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #12 on: April 23, 2017, 09:39:15 PM »
I have updated the save game. Watch the train with livestock - when it will approach the on-staff-box, the game will crash.

Then load the game again, and release the milk train quickly after loading the game. It should leave the one-staff area before the livestock train arrives. Then the livestock train will pass one-staff-box still in track circuit mode.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #13 on: April 23, 2017, 09:46:27 PM »
I think that I have managed to fix this; would you be able to re-test?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #14 on: April 23, 2017, 10:27:37 PM »
OMG, you are fixing it faster then I can break it ;-)

It does not crash any more, but the train still stays in track-circuit after passing along the one-staff-box

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #15 on: April 23, 2017, 11:29:52 PM »
This is a very odd one: the problem appears to occur only when the train already in the station had already failed to reserve the whole line. If you stop the approaching train by opening its schedule window, set the other train going manually by moving it to its next item in its schedule, and, once that train has cleared the section, close the schedule window of the other train. The problem then does not appear to recur.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #16 on: April 24, 2017, 12:09:47 AM »
I tried what you suggested, but still have a train in one-staff area running in trac-circuit mode. Can you share a savegame where it is OK?

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #17 on: April 24, 2017, 11:29:20 PM »
I have had another look at this and I think that I have managed to fix the underlying issue. Would you be able to have another look at this? I should be most grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #18 on: April 27, 2017, 10:15:22 PM »
Well now it seems to work better - no deadlock. But is is still quite weird. I'll describe what happens:

Train in track circuit block mode is approaching the staff box at full speed. When the box is few tiles ahead (visibility range), the one-staff area is reserved, and train continues at full speed (mode unchanged). Train changes to one-staff mode only at the moment of passing the staff-box. I think the train should stop at the box in any case, and the area should be reserved only after the train has stopped.

Getting out of on-staff area is also a bit unusual. Train does not stop at the exit box, reserves the path to next signal and stays in on-staff mode. It changes to other mode upon approach to another signal. I think the train should stop on exit as well, as the staff has to be returned to the box, and then it should continue in drive-by sight mode.

Oh, and if the on-staff area is occupied, second train properly stops and waits at the staff box. But is waits for clearance no only until the first train goes past the exit box, but until it passes another signal ahead of the one-staff box. In this case, it reserves the path no only to exit staff-box, but all way ahead to the next signal.

You can test it on the same save game as before.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #19 on: April 27, 2017, 10:30:19 PM »
I am not able to reproduce the second issue that you describe using the version of this saved game that I produced for testing (with the train in the siding/stop turned around and ready to depart, or else one had to wait a very long time for this to happen); can you upload a saved game in which this reliably occurs?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #20 on: April 27, 2017, 10:50:55 PM »
Updated the save game referenced above. You can fast forward a little to cca 3:13
http://server.exp.simutrans.com/debug-saves/one-train-staff.sve

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15131
  • Total likes: 353
  • Helpful: 154
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train waiting for train staff is "moving" on the spot
« Reply #21 on: May 07, 2017, 03:11:15 PM »
I think that I have managed to fix the latter problem. would you be able to re-test?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Train waiting for train staff is "moving" on the spot
« Reply #22 on: May 09, 2017, 09:01:04 PM »
The last issue seems to be fixed, but the two others - entering and leaving the one-staff area at full speed are still present