beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
190 stars 97 forks source link

Lost of connection leads to desync if some player do resign #1406

Closed 6AKU66 closed 3 months ago

6AKU66 commented 4 months ago

Desync end report.zip Lexon desync. P.S Bonus, replay from cluster https://bar-rts.com/replays/94b70966c6456c6bb244637ba50f0096

Reproduce steps: Put yourself in one team and another person in another team; Force to lose internet connection for one player during loading to match; Endgame graph should appear on the screen (if didn't repeat again); Reenable your connection; Place commanders, start the game; As soon commander spawned, trigger self-D for commander; As soon as commander dies desync messages should appear.

Beherith commented 4 months ago

The replay files also differ:

image

marcushutchings commented 4 months ago

Does this only happen when Lua-based AIs are controlled by the player that self-d their commander?

6AKU66 commented 4 months ago

Does this only happen when Lua-based AIs are controlled by the player that self-d their commander?

It's was just me and Lexon. No any AIs. Lexon's IGN name is ScavengersDefenseAI.

marcushutchings commented 4 months ago

Does this happen if the com was destroyed by enemy fire or just with the self-d?

marcushutchings commented 4 months ago

A Commander death triggers a KillTeam call, which is handled by the clients, not the server (not sure why, but it is.) So it seems the clients made the KillTeam call happen on different frames.

6AKU66 commented 4 months ago

Does this happen if the com was destroyed by enemy fire or just with the self-d?

I triggered self-d in commander. No enemy fire.

marcushutchings commented 4 months ago

Can the desync be recreated by using enemy fire instead of a self-d? It would help us get a better understanding of where the desync is.

6AKU66 commented 4 months ago

I think it's can, but self-d option allowed me don't move commanders at all, so my intention was less noise. And i think in real matches this desync happening exactly with enemy fire involved.

6AKU66 commented 4 months ago

I guess something happened here. Also i think this is could be a precursor. It's only happened on Lexon side before desync.

[t=00:04:15.403795][f=-000001] [Initial Spawn] manual spawning based on positions chosen by players in start boxes [t=00:04:25.444335][f=-000001] Error: [GameEnd] lost connection to server; terminating game [t=00:04:25.444853][f=-000001] EndGame Graph disabled [t=00:04:25.447600][f=-000001] Input grabbing is disabled!

marcushutchings commented 4 months ago

The point I'm trying to make is that self-d coms has special code and conditions - that may be why the desync happens, which is why I asked if the desync can be reproduced via other means, like the com being killed by enemy fire. So that the moment, the answer is: we don't know.

6AKU66 commented 4 months ago

The point I'm trying to make is that self-d coms has special code and conditions - that may be why the desync happens, which is why I asked if the desync can be reproduced via other means, like the com being killed by enemy fire. So that the moment, the answer is: we don't know.

Would like to see a version with commander killing another commander via attacking?

6AKU66 commented 4 months ago

@marcushutchings Wait, actually during testings AKU and Lexon was killing commanders with testnuke and we managed to get a desync.

6AKU66 commented 4 months ago

Here a video with killing via nukes: https://youtu.be/79Y268CJDaw

marcushutchings commented 4 months ago

@6AKU66, I'll look to get a special debug version of the engine to you. Then when you trigger a desync we'll get more information about what is going on.