Cannot Connect for networked game

Bug #1176468 reported by Julio
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Stratagus
Fix Released
High
cybermind

Bug Description

Somewhere between 8637 and 8677 I stopped being able to connect to play local network games.

Network game can be created, but unable to join from other machines.

8636 works okay, but the next revision I tried 8677 does not work... the problem persists in the latest 8720

I'm compiling on Mac OS X 10.8.3

Related branches

Revision history for this message
Julio (artofwar) wrote :

Just a quick bump to let you know this still doesn't work as of the latest 8746.

Fresh build on OS X 10.8.3, no errors or warnings during compile.

Revision history for this message
cybermind (iddqd-mail) wrote :

I have this bug too, though I can connect on the localhost if I launch 2 instances of stratagus.exe each with different port using -P command line option

Changed in stratagus:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
cybermind (iddqd-mail) wrote :

The bug-creating change was added in rev.8675. Will try to investigate the problem.

Revision history for this message
Joris Dauphin (joris-dauphin) wrote :

Little explanation:
In InitNetwork1(),
instead of trying to use a port in range CNetworkParameter::Instance.localPort + [0; 10[
we use only the one specified (CNetworkParameter::Instance.localPort).
(So if it is the server, its port is the one specified, and client don't have to guess which port in range is used).
If we can't use the port, an error message should be displayed on stderr.

This should affects only when using multiple instance on a single machine though...

Revision history for this message
cybermind (iddqd-mail) wrote :

Well, I've mistaken, the real problem is revision 8665, when UDP protocol handling was changed

Revision history for this message
cybermind (iddqd-mail) wrote :

Just tested it on network between Windows 2000 SP4 and Windows 7 SP1 and rev.8664 worked well whereas rev.8665 refused to join to game

Revision history for this message
cybermind (iddqd-mail) wrote :

Looks like i've fixed the bug, but the fix is ugly, need to fix it more correctly

Revision history for this message
Joris Dauphin (joris-dauphin) wrote :

I see you removed an usage of CNetworkParameter::Instance.localHost

I would say this var may be useful when computer has several network cards...
(but I'm not an expert).

The last usage of this variable is in master.cpp for TCP.
So, if you solution is correct,
Can you try if it is useful there and if not remove completely this var ?
I cannot test this network bug since I have only one machine (and previous code worked in that case :-/ ).
Thanks.

Revision history for this message
Julio (artofwar) wrote :

Just wanted to note that this appears to be fixed for me now.

Thanks cybermind!

cybermind (iddqd-mail)
Changed in stratagus:
status: Confirmed → Fix Committed
assignee: nobody → cybermind (iddqd-mail)
cybermind (iddqd-mail)
Changed in stratagus:
status: Fix Committed → Fix Released
milestone: none → 2.3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.