The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: Jando on July 16, 2017, 01:23:19 PM

Title: Bus changing destination after loading of game
Post by: Jando on July 16, 2017, 01:23:19 PM
I believe this may be a save/load-cycle bug: I had noticed on some occasions that buses (on various lines, not limited to a particular one) did not seem to travel according to schedule after loading a game but didn't yet have a saved game where I could show this. By pure luck this saved game now shows the effect: http://files.simutrans.com/index.php/s/2o0dfZ7HsOnU5yo

1. Load saved game, immediately hit pause, need to be fast.
2. Jump to vehicle #25, serving the Curlingsea-Swainesmouth line.
3. Note that the vehicle is drawn as if it would travel East to Curlingsea. (left side travel)
4. Note that the vehicle carries passengers to Curlingsea.
5. Note that the vehicle's information window shows it's bound for the opposite direction. i.e. to Swainesmouth.
6. Note that hovering the mouse over the vehicle will say "Schedule changing" or "Reversing", depending on how fast you have hit the pause button. :)

After unpausing the game the vehicle will turn around and head into the opposite direction. Vehicle #26 shows a similar behaviour.

Thanks!
Title: Re: Bus changing destination after loading of game
Post by: jamespetts on July 19, 2017, 12:51:25 AM
Thank you for this report. This is a very difficult problem to deal with. I have looked at the provided saved game file, and the saved value for the current schedule entry is 1, which is consistent with it actually going to Swainesmouth. Thus, while it appears as though there may well be an error, the error appears to occur during saving rather than loading, and I cannot reproduce the error (and therefore find out what is causing it) with the saved game provided.

If you find that this occurs again, perhaps you could try to document enough details so that we can try to work out the circumstances in which this arises and I can see if I can find the problem by inference?
Title: Re: Bus changing destination after loading of game
Post by: Jando on July 21, 2017, 09:10:50 AM
Yes, very likely it's an issue caused by saving or just before saving. I re-loaded the saved game about 10-15 times now and see the bug on all loads. Will check the running buses more often after loading a game in the future.
Title: Re: Bus changing destination after loading of game
Post by: jamespetts on July 21, 2017, 12:22:30 PM
You refer to the bug occurring on all loads - do you mean that every 'bus in every saved game always has the wrong schedule entry after loading?
Title: Re: Bus changing destination after loading of game
Post by: Jando on July 21, 2017, 12:57:27 PM
Quote from: jamespetts on July 21, 2017, 12:22:30 PM
You refer to the bug occurring on all loads - do you mean that every 'bus in every saved game always has the wrong schedule entry after loading?

Sorry for the bad wording, I mean that in all cases of loading this particular game the same 2 buses always have the wrong schedule.
Title: Re: Bus changing destination after loading of game
Post by: jamespetts on July 21, 2017, 01:04:36 PM
Ahh, I see, thank you for clarifying. If you can give any insight into the circumstances in which this error comes to occur in a saved game, I should be very grateful.