News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

11.12 weird desync problem

Started by choro, October 20, 2013, 07:16:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

choro

I've been trying to extend a station today in an online game - I removed some roads, added a platform, and then the game disconnects.
When I relaunch it, all my work (including a line I managed to add before the disconnection, in one time it stayed connected for a little longer) is still there, except for one tile which keeps becoming a road tile.


This has happened for me for at least 4-5 times today.

It can be seen on Simu.zapto.org, around (1068, 589) (Kiryat Motzkin city)

choro

Update: I think I figured the source of this bug: deleting this tile leaves a building with no road access, which causes the game to crash. This may also be the source of the other desync Asaph mentioned.
The game should either not let you delete roads isolating a building, or make it not crash every time it happens.

jamespetts

Thank you very much for the report. Can you upload a saved game in which this can be reproduced? Is it only the server that crashes, or does the client crash, too?
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.

choro

Quote from: jamespetts on October 20, 2013, 11:36:45 AM
Thank you very much for the report. Can you upload a saved game in which this can be reproduced? Is it only the server that crashes, or does the client crash, too?

I'll check it and let you know.

jamespetts

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.

choro

Ok, it doesn't happen on local games, just on the online game.

I only disconnect from the game, the client doesn't crash.

This reminds me that I also disconnect from the game when saving the game (say, for backup reasons) - the download (save) is complete and then I disconnect.

jamespetts

Thank you for that report - that is helpful. I will look into this when I get a chance.

Incidentally, desynchronising on saving locally is normal behaviour.
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.

choro

Thanks a lot for your quick replies, James. Your efforts are really appreciated!

asaphxiix

indeed this is the bug I reported. Good catch on the disconnected house trigger, choro!

jamespetts

I have now fixed on the 11.x branch what I can reproduce of this problem. I have not been able to reproduce a crash, but I have found and fixed a desync relating to deleting roads: it is intended that the public player can delete any road, even if it would disconnect a building. Other players should not be allowed to disconnect roads from public buildings. What was happening, however, was that the game was checking for whether the roads were being deleted by the public player by checking whether the active player was the public player, which, of course, is likely to be different on the server than on any given client, meaning that roads would often be deleted on the client but not the server (as reported in the original message). This would eventually cause a desync. I have now fixed this by checking specifically the deleting player.

However, I am not sure what was causing a crash, as I could not reproduce it. It might or might not be related to the issue that I describe. Do either of you know of any instances where any of these problems occurred in circumstances that cannot be accounted for by what I describe above?
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.

asaphxiix

Nope this was a straight desync problem, I think choro used the word crash by mistake, but really meant desync. (since he later reported the client didn't crash, and I know the server didn't, either).

asaphxiix

thanks very much for fixing it james!