bugWarmux - Bugs: bug #16316, Game state becomes inconsistent in...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #16316: Game state becomes inconsistent in network game, synchronization issue

Submitted by:  Rhywek <rhywek>
Submitted on:  Wed Jul 28 20:53:14 2010  
Category: NetworkSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: Matthieu Fertré <gentildemon>Open/Closed: Open
Release: 0.9.2

Tue Feb 1 16:51:54 2011, comment #5:

Tile::GetTilesToSynch() could be used to further validate that all tiles (= the ground map) are valid. However this requires specific network code, which doesn't appeal to me. I prefer seeing reports of the bug still occurring with 11.01.

Kurosu <kurosu>
Project Administrator
Fri Aug 6 15:44:35 2010, comment #4:

I did some more tests, to locate some weapon that causes the bug. Just as I suspected, the building tool seems to be responsible. We played test games using only two weapons: bazooka and building. Some state differences appeared quickly. For instance, I built a platform over a character to block it, but on one computer it could walk out, on the other not.

So now we have a workaround for the bug: We haven't noticed any problems when playing with only bazooka+grenade+handgun. Probably many other weapons are OK as well.

But with the platform building it looks like the platform is built in slightly different positions on both computers (maybe only one pixel of a difference, so it's not visible with a naked eye).

Rhywek <rhywek>
Wed Aug 4 19:34:55 2010, comment #3:

Thanks again for this very precise bug report!

I have to think more about how to better track the bug. 32 bit vs 64 bit should be supported but of course it may be one of the reason of the bug.

Matthieu Fertré <gentildemon>
Project AdministratorIn charge of this item.
Tue Aug 3 09:18:11 2010, comment #2:

I remembered one thing yesterday - that when we started playing Wormux, we didn't experience any problems. The problems started later, after 2-3 weeks of playing. This led me to the conclusion that perhaps it's some advanced weapons that produce this bug, because when we were beginners, we played using only some basic weapons and we never got any problems.

Having that in mind, we have played 3 games yesterday to verify this hypothesis. One game using only green bazooka, one using only the simplest handgun, and one using only green grenades. We played the last one on the map without water, so it took us almost two hours to finish. Guess what - in all 3 games we did not experience any problems.

The conclusion is that my previous statement was probably incorrect. It's not the movement that creates the bug. It's some of the more advanced weapons.

Of course it could be just a coincidence that no error occurred, but this is very unlikely to be just a coincidence. When we play with all weapons, we always get some problems.

I don't know which weapon is responsible yet. It takes a lot of time to play a game with only one weapon, but we can try to test few others to see whether any causes the bug.

My guess for now is that it's one of the terrain modifying weapons that causes the bug - maybe the "platform building". We never used those weapons as beginners, and now we use them all the time. I noticed once that when I wanted to use it, the platform was built on one computer, but not on the other. I wanted to build it as close to the character as possible, so maybe if the location of characters was already desynchronized, that could allow it to be built only one place. But the character location seemed the same.

Also, could the fact that one system is 32 bit and the other 64 bit have influence on this?

Rhywek <rhywek>
Sun Aug 1 20:05:10 2010, comment #1:

Thanks for your bug report!

It's interesting to notice that the desync may come from movements. I will have a look (and thought seriously about introducing some synchronisation messages again).

You get several message of this type in the log :
include/action_handler.cpp:815: Missed assertion "remote_seed == local_seed".

That means that the random generator was getting out of sync, it can leads to a lot of problem. I don't understand why the game is not interrupted with a message saying "Game interrupted because of a network unsync".

Matthieu Fertré <gentildemon>
Project AdministratorIn charge of this item.
Wed Jul 28 20:53:14 2010, original submission:

Almost every time I play Wormux via LAN, some inconsistencies arise in
the game state. I estimate this happens in 80% of games I play.

The typical scenario is like this:
Player 1 creates game server, player 2 connects.
A standard game 6 against 6 is started.
The game goes normally for 10 minutes or so.
Then some inconsistency arises.

I have tried to evaluate what kind of inconsistency arises first and I
think in most cases it's the movement information. I mean player 1 moves
the character around using arrows and the character moves on his
machine, but on the other machine (which player 2 sees) the character
moves by fewer pixels. For instance player 1 holds the left arrow for 1
second, moving the character by 100 pixels, but on player 2's screen the
character moves only 90 pixels. It looks to me as if some movement
information wasn't fully transferred to the other computer via network.

This movement inconsistency results in further inconsistencies. Now
player 1 will use some weapon, but due to the fact that the character is
positioned differently on the map on both computers, the weapon will
have different effect on both computers. It explodes in different
places, so that the terrain is now different on both computers. Also the
injuries to characters are different on both computers. On one computer
the character could loose 40% life, on the other 26%. Sometimes the
character dies on one computer, but not on the other.

Another thing is that as soon as some inconsistencies arise, the game
slows down. Sometimes it's just the graphics that gets low fps (say 10
fps instead of 30). Sometimes it's also the controls - when you press
arrows on the keyboard, your character responds to that after a second
or so.

This bug is of course not strictly reproducible. I get it almost each
time I play, but every time it occurs at different point in time.

I attach the output printed by wormux on both computers in one game
where inconsistencies occurred. In that game, inconsistencies were quite
small (just few pixels' misplacement of a character), but big enough to
be noticed, because some terrain differences occurred.

The server machine runs Ubuntu 10.04 i686 and wormux 1:0.9.2-0~ppa2.
The client machine runs Gentoo x86_64 and wormux

Rhywek <rhywek>


Attached Files
file #9607:  wormux_server.out added by rhywek (468kB - application/octet-stream)
file #9608:  wormux_client.out added by rhywek (475kB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by kurosu (Posted a comment)
  • -unavailable- added by gentildemon (Posted a comment)
  • -unavailable- added by rhywek (Submitted the item)
  • -unavailable- added by rhywek

    Error: not logged in



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Aug 1 20:05:10 2010gentildemonAssigned toNone=>gentildemon
    Wed Jul 28 20:53:15 2010rhywekAttached File-=>Added wormux_server.out, #9607
      Attached File-=>Added wormux_client.out, #9608
      Carbon-Copy-=>Added rhywek
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup