News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Spurious reservations upon loading

Started by Junna, December 19, 2016, 05:53:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Junna

Upon loading the old large save-game, across the network will appear random spurious reservations. It is hard to pin-point an exact location, because it does not follow any clear pattern; but upon loading will, in places where trains are waiting or close to one-another, spurious reservations appear. The reserving train will reserve, for example, platforms well ahead of it, and/or random (1-4 tiles in length), and cause a dead-lock because other trains cannot pass, and the train that has reserved it, cannot possibly reach. This happens on circuit block and absolute block sections with no clear connection to the type of signalling.

jamespetts

It will be exceedingly hard to track down the problem without a reliable way of reproducing it. Are you able to test further to narrow down more precisely the circumstances in which it occurs? Also, to which saved game are you referring, and do these reservations always appear at the very moment of loading, or are they ever created after the game has been loaded?
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.

Rollmaterial

It occurs when reloading a save in zipped format. Try it out with my UK map (by saving in zipped and reloading), it should occur.

jamespetts

Quote from: Rollmaterial on December 19, 2016, 09:47:38 PM
It occurs when reloading a save in zipped format. Try it out with my UK map (by saving in zipped and reloading), it should occur.

That is very interesting. Does it not occur in any other format? Junna - can you confirm that this can be reproduced only when loading/saving in zip (rather than bzip) format?

May I ask both of you whether you use Linux, Windows or Mac OS? This may well be relevant to the Windows/Linux desync issue (if, for example, this occurs with Windows and not Linux, this would cause a desync, as multi-player games are saved in zipped rather than bzip format).
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.

Junna

I am using zipped saves and loaded an autosave when I first noticed this. Am using Windows as well.

jamespetts

Quote from: Junna on December 19, 2016, 10:10:01 PM
I am using zipped saves and loaded an autosave when I first noticed this. Am using Windows as well.

Thank you for confirming. Can you test loading/saving in different formats to see whether the problem can be reproduced there?
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.

Rollmaterial

It appears that trains leave a couple of tiles behind them reserved when loading.

jamespetts

Quote from: Rollmaterial on December 19, 2016, 10:57:59 PM
It appears that trains leave a couple of tiles behind them reserved when loading.

Do you mean loading from a saved game in the zipped format or loading at a station?
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.

Rollmaterial


jamespetts

Quote from: Rollmaterial on December 19, 2016, 11:04:55 PM
Loading from a zipped format.

Thank you. May I ask whether you are using Windows or Linux?
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.


jamespetts

Quote from: Rollmaterial on December 19, 2016, 11:07:32 PM
Windows.

Thank you - that is very helpful. May I ask where you are getting your builds from?
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.

Rollmaterial


jamespetts

Quote from: Rollmaterial on December 19, 2016, 11:44:05 PM
Github and compiled with MSVS 2015.

And may I ask where you obtain your zip libraries?
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.

Rollmaterial

From the sources linked to in this thread. I believe I recompiled libbz2.lib myself to make it work in MSVS 2015.

jamespetts

libbz2 relates to bzip, which is a different format. Was it to bzip that you were referring earlier or the plain zipped format?
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.

Rollmaterial

Plain zipped. So for that I should have the ready-made binary.

jamespetts

What is the date of the version of zlibstat.lib that you are using? I am attempting myself to re-compile with an older version.
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.

Rollmaterial


jamespetts

Can you try to download and use some other versions of this file to see whether it makes any difference? Do not forget to clean the build between each attempt and re-name the other file to something like zlibstat.lib.new to make sure that it can only be using the new one.

Edit
: Attempting to connect to the Bridgewater-Brunel server with a Windows client compiled with a version of zlibstat.lib from 2013 instead of the previously used version from 2016 did not affect the desync there.
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.

Rollmaterial

I just got similar (bigger) spurious reservations with an autosave made in bzip2 format. This seems to indicate that it has something to do with autosaving in general rather than a particular format.

jamespetts

Autosaving? Interesting. Can anyone else who has had this problem confirm whether this is confined to autosaving?
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.

Junna

That I cannot narrow down, but now and then random spurious reservations should appear in my save-game previously uploaded without any interference (quite often it is in stations, but can be anywhere). This obviously makes it hard to know ahead of time.

jamespetts

Quote from: Junna on December 22, 2016, 06:41:13 AM
That I cannot narrow down, but now and then random spurious reservations should appear in my save-game previously uploaded without any interference (quite often it is in stations, but can be anywhere). This obviously makes it hard to know ahead of time.

Was that game saved with autosave or otherwise?

Also, are you sure that you and Rollermaterial are describing the same problem; Rollermaterial is, I think, describing spurious reservations that exist at the very moment of loading, but your reference above to random spurious reservations appearing without interference suggests otherwise. Are you both able to clarify?
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.

Junna

Well, I would say that I think they might appear during play, but I cannot guarantee this; it is possible they were upon loading. I only notice them once a number of trains have piled up and become visible on the map. It mostly appears on sections with numerous lines running over them. The trains reserving the sections invariably seem to have passed the section already, but the reservation remains.

It was saved manually, but some time before it did the loading of autosave on closing, so the reservation strangeness might have been from this.

jamespetts

Thank you both for your reports. I will have to try to look into this when I get back from my Christmas holiday (until then, I will not be able to do much coding work). If in the meantime either or both of you could narrow down the problem further, that would be exceedingly helpful.
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.

Junna

I cannot narrow this down any further, the spurious reservation appear all over, but -- mostly where a service reverses. There will be anything from 2-5 or more locations around the network -- particularly in heavy trafficked areas with many trains going around -- each time it is loaded, regardless of the save settings.

jamespetts

Thank you for the information. On loading the exact same saved game, do the reservations appear in different places on different occasions of it being loaded (i.e., do you get a spurious reservation in place X when loading the game on one occasion, and when closing it - without saving - and loading the same saved game again do you get no spurious reservation in X, but perhaps another one in Y that was not present when the game was last loaded)? Also, can you confirm precisely which saved game that you mean by the "old large saved game", and the minimum amount of time before these reservations occur?

Thank you again.
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.

jamespetts

I am not sure whether or not this is the same problem, but I have found and fixed a problem that caused spurious reservations to remain at stations after trains had departed. Can you re-test to see whether this problem now recurs?
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.

Junna

Testing shows that the spurious reservations remain after loading and unloading save  game (both going to menu and restarting the program).

I haven't seen any new spurious reservations appear since updating the exe so far.

jamespetts

The nature of the problem and the fix is that new spurious reservations will not be created, but if the spurious reservations were created in the unfixed version and the game then saved, the fixed game will have no way of knowing which reserved tiles are incorrectly reserved and which are correctly reserved. I recommend using the clear reservation tool on the incorrectly reserved tiles: hopefully, no further tiles will now become incorrectly reserved.
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.