Wargus / wargus

Importer and scripts for Warcraft II: Tides of Darkness, the expansion Beyond the Dark Portal, and Aleonas Tales
GNU General Public License v2.0
355 stars 55 forks source link

"Player" has sent bad command - Network out of sync #390

Closed Bomfunk closed 2 years ago

Bomfunk commented 2 years ago

Describe the bug Sometimes after some time of playing multiplayer (local game) suddenly one of the players gets an " sent bad command", which is followed by many "network out of sync" messages before and/or after. After this the game crashes for one of the players, leaving the other one alone playing.

To Reproduce Steps to reproduce the behavior:

  1. Set up a local multiplayer game (one player clicks "create", the other one joins).
  2. Play for a while with some AI as enemies.
  3. ? Not sure what exactly causes it - maybe the general "business" of the map. For me a big map with many enemies seems to have done it, but it also happens randomly.
  4. Observe the messages and inability to play together any longer.

Expected behavior The game is uninterrupted until the end of the scenario.

Screenshots and Logs This is an archive of logs for the 2 most recent times I have reproduced this on the same map. It is about 260 MB but be careful - it can extract to about 5 GB, as both Wargus instances were launched with "-i -p". https://drive.google.com/file/d/11X759nNDQ5XHlUym7n2UuTQPYQogB8Mp/view?usp=sharing

Desktop (please complete the following information):

timfel commented 2 years ago

Thanks! This is super helpful. I can see it got out of whack:

-25034: 91 unit-peasant 20 P6 Refs 2: CC7DD17B 117,85 0,29
+25034: 91 unit-peasant 20 P6 Refs 3: CC7DD17B 116,87 29,-29

Before this cycle, everything is exactly the same in both client and server, but here player 7 (client) suddenly has a peasant at location 117,85 where player 7 sees the same peasant at 116,87. And from there, everything goes bad. Now I need to figure out how that happened :)

timfel commented 2 years ago

I got further with this, it seems I can reproduce this bug now. It's something to do with pathfinding back from a goldmine to the town hall.

timfel commented 2 years ago

This specific issue is fixed.