Always "network out of sync" in multiplayer mode

Bug #901393 reported by Bomfunk on 2011-12-07
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Stratagus
Fix Released
High
cybermind

Bug Description

This game is so great to play with friends, but it has very unstable multiplayer.
For example, I've tried to play with my friend several times, and while we were playing, we were always getting message "Network out of sync". In spite of it, the game looked good, but it gives only approx. 5 minutes, then says "Player send bad command".
I use 2.2.5.5 version of both Stratagus and Wargus. 32-bit Windows.
Also, in previous versions I've used previous versions of this game at Linux, and there was another problem: I was able to play with only 1 friend, but it was okay. When second friend tried to connect, it seemed that all connections were broken, but there was no any error reports, so I was able to start the game and play alone. Not sure about now, but I can try to test this with some of my friends, if you need.

I will repeat it again: the game is great, so I hope you'll fix this as soon as possible.

Related branches

Joris Dauphin (joris-dauphin) wrote :

All players should have the same version of stratagus/wargus.

If it is not that the problem,
can you give some info to reproduce the error ?

Bomfunk (mrbomfunk) wrote :

All players were using the same version 2.2.5.5.

Some info to reproduce the error, hmm... That's what I did:
Hosted a game with 3-player map. A friend connected and I started the game, so we were against one computer player. And from the first minute of playing both of us were seeing the "Network out of sync" error, then, after some minutes playing, game freezed with the "Player send bad command" error.

Also I tried to launch 3 copies of the game on one computer and connected all of them to one game. All of them were getting "Network out of sync" error, so it's not a network issue, I suppose.

Kyran Jackson (erstmap) wrote :

Stratagus has always had this problem. I remember back when I was at school we were forced to play Freecraft instead as Wargus 2.4 would go out of sync with more then three players.

I wonder if BOS Wars has fixed this issue? Back porting might be the answer.

Pali (pali) wrote :

Bos Wars did not fix it too :-(

Changed in wargus:
status: New → Confirmed
importance: Undecided → High
affects: wargus → stratagus
Pali (pali) wrote :

Now I tested 2 instances of Wargus 2.2.6 on Ubuntu Oneiric in multiplayer game, both on localhost. And there was no out of sync problem.

Can somebody test network multiplayer game on localhost too? And also on LAN?

cybermind (iddqd-mail) wrote :

Yes, i've just tested localhost on Stratagus 2.2.6 Windows XP SP3 with Doom Wars and everything was OK. Replays are also played well.

cybermind (iddqd-mail) wrote :

Checked on real LAN too with 2 players and 2 computers. Everything was OK, no desyncing

Pali (pali) wrote :

Bomfunk, can you test if you have still problems with version 2.2.6?

Bomfunk (mrbomfunk) wrote :

Hmmm, I just can't launch it on my Windows 7... It just says nothing and doesn't appear.
I can try it on Debian Linux though, but I want it to work on Windows. Maybe I'm doing something wrong...

Pali (pali) wrote :

Yes, there is problem with wargus.exe binary on Windows, see bug 909532

Bomfunk (mrbomfunk) wrote :

It seems to work good with 2 launched instanses of Wargus, but I can't test it with friends now.

Pali (pali) wrote :

Seems that bug is fixed on localhost (confirmed by me, cybermind and bomfunk) and on real lan too (confirmed by cybermind). So I closing this bug as fixed, reopen if not. No idea which commit fixed this problem.

Changed in stratagus:
status: Confirmed → Fix Released
Bomfunk (mrbomfunk) wrote :

No, don't close it.
I tried to play with my friend, but he only can join to my lobby, but when game starts, he is left in lobby, or game is out of sync immediately.
On LAN it works ok, but on the Internet...

Bomfunk (mrbomfunk) on 2012-02-02
Changed in stratagus:
status: Fix Released → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for Stratagus because there has been no activity for 60 days.]

Changed in stratagus:
status: Incomplete → Expired
Bomfunk (mrbomfunk) on 2012-04-03
Changed in stratagus:
status: Expired → Incomplete
cybermind (iddqd-mail) wrote :

Check, if bug is still present in game

Changed in stratagus:
status: Incomplete → Fix Committed
Pali (pali) on 2012-04-19
Changed in stratagus:
assignee: nobody → cybermind (iddqd-mail)
milestone: none → 2.2.7
Pali (pali) on 2012-08-20
Changed in stratagus:
status: Fix Committed → Fix Released
Julio (artofwar) wrote :

After many years, this bug continues to affect us. Currently on stratagus rev 8922, building in OS X 10.10 (Yosemite)

All computers running same version of OS and stratagus, all computers connected to same router.

Starts with "network out of sync" messages and finally ends with "player sent bad command."

Problem seems to worsen as army get bigger on both sides until game eventually stalls.

I build my own binaries for OS X and would not mind building a special version with debugging/logging params to trace this problem down. Thanks for any help.

cybermind (iddqd-mail) wrote :

I need information about game used (Wargus, Doom Wars, Wyrmsun ...), game's version (rev. number for Wargus), map used in game. And please send replay files from all computers. You may also run stratagus with "-i" key to get a more detailed information about game (stratagus will generate a big log file in game's directory (where stratagus.exe is located)). It would be good if you will send those log files from all computers (don't forget to compress them first)

Karol Krenski (mimoohowy) wrote :

Just about any multiplayer wargus game gets 'network out of sync' within 20 minutes or so. I tried stratagus 2.2.7 linux to linux, linux to windows, and also windows to windows. Windows to windows was the least affected. I would imagine it can be easily reproduced since it happens so regularly to me on different machines, but I can provide the logs if stratagus developers never experience these problems.

When it comes to network play, I can also mention that I have problems joining the game unless I start 'startagus -P 6667' - such a server (6667) can be easily connected to.

Karol Krenski (mimoohowy) wrote :

Yes, I can confirm. Freshly built stratagus 2.2.7 + wargus 2.2.7. Compiled on my machine amd64. On this machine I start two instances of wargus in this manner:
./stratagus -W -v 1024x768 &
./stratagus -W -v 1024x768 &

and I play a mutiplayer game between two windows on 192.168.1.2 interface. I start getting 'network out of sync' within 15 minutes on a map that I created in the editor. (BTW, the editor doesn't save many values to the files, like the race, the AI-style, the values of the starting resources (wood, gold, oil) so I edited the map file with a text editor).

The option -i suggested by cybermind is not working:
wszafie:wargus$ ./stratagus -i
./stratagus: invalid option -- 'i'

cybermind (iddqd-mail) wrote :

Please use the recent version from trunk instead of 2.2.7

Julio (artofwar) wrote :

Just built the latest version 8961 with wargus 1823 scripts.
Network out of sync happens for us immediately upon game start.
ran stratagus with "-i" key and attached resulting log files.

Note: I'm now building stratagus in OS X 10.10.2

I'm available for further testing/debugging when needed.

Thanks for your continued development on this great game.

cybermind (iddqd-mail) wrote :

Please update your Stratagus to rev. 8964 and Wargus to rev.1827 and report if this continues to happen. It would be good if you will describe your network (# of computers, pings, network speed etc)

Julio (artofwar) wrote :

Updated to Stratagus rev. 8968 / Wargus rev. 1832- "Network out of sync" problem persists.

Local Network: Gigabit network...4 computers in same room, on same hub, all wired.

Only two computers playing on this test, here's the ping statistics between the two computers:

10 packets transmitted, 10 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.487/0.546/0.594/0.030 ms

We continued playing through the "Network out of sync" until we got to the point where someone "sent bad command."
(We suspect this happens when one of the players selects a large army, 40+ troops, but it may be coincidence)

When someone get's the dreaded "player sent bad command" message, it's all downhill from there.

This time around, only the client player saved a log file (attached.) The computer who hosted the game did not leave a log (not sure why because game did not crash, could be operator error I guess.)

In any case, wanted to get this info to you as soon as possible.

Karol Krenski (mimoohowy) wrote :

Fresh Stratagus 2.3.0 + Wargus 2.3.0 @ ubuntu. Still network out of sync :(

I am trying to understand how it works, so that I can help to resolve
this bug:

So there are cycles in the game. Within each cycle the state of each
single unit (each critter even) is passed thru the network. Each record
is plain text, but also contains some hex tag and this tag is checked
against network syncing (what is the "nature" of this hex tag BTW?). At
some point I spotted the "network out of sync" in the console. As I
understand I need to collect both the -p output in the console (network
problems are reported here) and -i output (the state of the units).

Then the first bad cycle should be compared against the previous one and
this is basicaly how I should report it, right?

Please change
 -P port Network port to use
into
 -P port Network port to use for the client

my tests show this is the meaning of -P option (server fixed to 6660),
unless I am wrong.

Regards,
Karol

micronizer (micronizer) wrote :

Me and my group have been affected by this bug since the first version we tried (2.1), and we always try again with each new release with no result. In fact, each new version seems to get out of sync slightly faster. It always surprises me how multiplayer issues don't seem to get noticed; I suppose few people play wargus multiplayer.

Andy Alt (andy001973) wrote :

When playing BosWars, I've noticed the "network out of sync" too, but it usually only happens on certain maps. Most of them work perfectly in multiplayer mode though. But some maps give a problem every time; not right away, but the issues start several minutes after the game starts. I thought I read somewhere that Ihe problem had something to do with LUA and how paths are determined. But I'm not a coder so I couldn't say anything beyond that.

--
-Andy
BosWars multi-player lobby (unofficial) ##boswars-lobby on Freenode

Stratagus was moved to github (https://github.com/wargus/stratagus) and some work was done in that regard.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers