http://bugs.winehq.org/show_bug.cgi?id=35831
Bug ID: 35831 Summary: Age of Mythology The Titans - Multiplayer Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: roi@torkilsheyggi.fo
Multiplayer in "Age of Mythology - The Titans" is only working for two-player games. It is not possible for a third player to join the game.
When a third player tries to join the game it shows the count-down timer (from 119 seconds). It exits at zero.
The third player can type a message to the other two in the queue - the message appears (to the others in queue) but this cancels the count-down and player still isn't able to join.
First two players in queue can start a game. Tested with four machines - all can start two-player games (and it works great!), but none are able to join queue after the first two.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com --- Did you test different combinations of 4 computers to be sure it's not network/firewall related?
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #2 from roi1979 roi@torkilsheyggi.fo --- (In reply to Bruno Jesus from comment #1)
Did you test different combinations of 4 computers to be sure it's not network/firewall related?
Yes. All can host, all can join, none can join as third in queue. Tested on all four machines (hosting, join-as-second, join-as-third).
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #3 from Ken Sharp imwellcushtymelike@gmail.com --- What version of Wine?
Where are the console logs?
http://bugs.winehq.org/show_bug.cgi?id=35831
nous nous@archlinux.us changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nous@archlinux.us
--- Comment #4 from nous nous@archlinux.us --- I'm reporting the same issue as the OP. I've tried to LAN play 1 Linux with 2 Windows computers, hosting in each of them in turn. 2 can play in any combination of OS/hosting (i.e. a windows client connects and plays to the linux host and vice versa).
When a third client tries to connect the countdown timer sticks to 119 seconds. No relevant errors showed in the wine stdout/stderr and I'm not competent enough to use a debugger.
Some rare times a third client managed to connect only briefly before getting the boot from the host (AoM message: Host cancelled the game).
Wine version 1.7.16
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #5 from nous nous@archlinux.us ---
Wine version 1.7.16
Age of Mythology Gold, including the Titans expansion, issue appears on both.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com --- Please attach 2 +winsock from the the working client connection and the failing.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #7 from nous nous@archlinux.us --- I'm sorry but I have no idea how to do that. Googling didn't help. Is there a guide somewhere?
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #8 from nous nous@archlinux.us --- Never mind, I figured it out. You'll have your debug info soon.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #9 from nous nous@archlinux.us --- Created attachment 48336 --> http://bugs.winehq.org/attachment.cgi?id=48336 2-player hosting log; works fine.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #10 from nous nous@archlinux.us --- Created attachment 48337 --> http://bugs.winehq.org/attachment.cgi?id=48337 2-player 2nd player log; works fine.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #11 from nous nous@archlinux.us --- Created attachment 48338 --> http://bugs.winehq.org/attachment.cgi?id=48338 3-player hosting log; awaits connections and accepts 2nd player fine.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #12 from nous nous@archlinux.us --- Created attachment 48339 --> http://bugs.winehq.org/attachment.cgi?id=48339 3-player 2nd player log; connects to host fine.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #13 from nous nous@archlinux.us --- Created attachment 48340 --> http://bugs.winehq.org/attachment.cgi?id=48340 3-player 3rd player log; times out connecting to host.
http://bugs.winehq.org/show_bug.cgi?id=35831
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #14 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 48343 --> http://bugs.winehq.org/attachment.cgi?id=48343 debug patch
Thanks for the logs, the third player is trying to send packets to an invalid/unreachable address. We need to figure out why that is happening, maybe knowing the address will give us a hint.
Please try the attached patch, it's only required on the third player computer. Get a +winsock with the patch compiled.
To ensure the patch is applied the log will contain lines like: trace:winsock:WS2_send Send Address : { family AF_INET, address 127.0.0.1, port 49719 }
* this is just an example, the IP/port will be certainly different.
http://bugs.winehq.org/show_bug.cgi?id=35831
nous nous@archlinux.us changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #48340|0 |1 is obsolete| |
--- Comment #15 from nous nous@archlinux.us --- Created attachment 48344 --> http://bugs.winehq.org/attachment.cgi?id=48344 3-player 3rd player log; times out connecting to host.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #16 from nous nous@archlinux.us --- I apologize for attaching an invalid log (the one I obsoleted); it turns out the 3rd player's box had a duplicate IP address of another PC in the LAN. Please examine the latest log. When the 3rd player tries to connect he times out after a minute or so and the 2nd player gets also a disconnection message. To ensure it's not an individual setup problem, I kept the 2nd player out and reconnected the 3rd player as 2nd successfully.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #17 from Bruno Jesus 00cpxxx@gmail.com --- The logs from the working and non working sessions are identical to my eyes, I can't speculate about anything that could be wrong.
http://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #18 from nous nous@archlinux.us --- I though as much too. If there's anything else you'd find helpful, like packet sniffing, just tell me.
https://bugs.winehq.org/show_bug.cgi?id=35831
Thom Blake thethomblake@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thethomblake@gmail.com
--- Comment #19 from Thom Blake thethomblake@gmail.com --- This exact problem is happening to me. 3 computers running "Age of Mythology - The Titans" under Wine via playonmac plus two windows machines. Any 2 computers can host / connect, but then a third computer can't join the same game.
As far as I can tell based on Internet reading, when the third computer tries to join, it is given a response from the host containing the IP address of the second computer, and then the third computer tries to send a packet to the second computer. This sort of issue happens sometimes via Internet tunneling when a firewall blocks the relevant port, but I have no firewall that would stop traffic on the lan. I think communication with the host and the test packet to the other client happen on different ports, but don't know how to verify that.
https://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #20 from Thom Blake thethomblake@gmail.com --- Now running on 4 windows machines, and all can talk to each other fine. Having even 1 computer running wine as either host or client reduces the max players to 2 for that group.
https://bugs.winehq.org/show_bug.cgi?id=35831
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Age of Mythology The Titans |Age of Mythology The Titans |- Multiplayer |- Multiplayer with more | |than 2 players do not work
https://bugs.winehq.org/show_bug.cgi?id=35831
Cosmin xcosminel@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xcosminel@gmail.com
--- Comment #21 from Cosmin xcosminel@gmail.com --- I can confirm this is happening for me as well. I assume it's to do with this same issue.
After some research I believe it's something related to the issue here: https://forum.winehq.org/viewtopic.php?p=20324
AOM is pointing to the loopback ip, so when it connect to 1 person it works because it's a host>client communication, but then it sends its invalid ip from client>host>second client and when second client tries to communicate with first client (the mac) it times out.
https://bugs.winehq.org/show_bug.cgi?id=35831
Rodrigo P. Fraga rodrigo.p.fraga@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rodrigo.p.fraga@gmail.com
--- Comment #22 from Rodrigo P. Fraga rodrigo.p.fraga@gmail.com --- The same scenario here...
Any news about this bug?
https://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #23 from Bruno Jesus 00cpxxx@gmail.com --- Currently there are no news about fixing this bug, it's practically impossible for a single developer to reproduce since it requires 3 game licences installed on 3 computers (VM may not work due to graphics driver).
I spent some more time reading the logs after reading comment 21. It looks like the 3 IP involved are:
192.168.13.11 192.168.13.12 192.168.13.14
The game tries to bind UDP sockets to the specific interfaces and read the address back before sending to clients, so we can see (in no particular computer order):
Computer #1 trace:winsock:WS_bind socket 01dc, ptr 0x5320108 { family AF_INET, address 192.168.13.12, port 2300 }, length 16 trace:winsock:interface_bind Socket 01dc bound to interface index 2 trace:winsock:WS_getsockname socket: 01dc, ptr 0x5320108, len 00000010 trace:winsock:WS_getsockname => { family AF_INET, address 0.0.0.0, port 2300 }
Computer #2 trace:winsock:WS_bind socket 01b8, ptr 0x47a9108 { family AF_INET, address 192.168.13.14, port 2300 }, length 16 trace:winsock:interface_bind Socket 01b8 bound to interface index 2 trace:winsock:WS_getsockname socket: 01b8, ptr 0x47a9108, len 00000010 trace:winsock:WS_getsockname => { family AF_INET, address 0.0.0.0, port 2300 }
Computer #3 trace:winsock:WS_bind socket 01d8, ptr 0x556c158 { family AF_INET, address 192.168.13.11, port 2300 }, length 16 trace:winsock:interface_bind Socket 01d8 bound to interface index 2 trace:winsock:WS_getsockname socket: 01d8, ptr 0x556c158, len 00000010 trace:winsock:WS_getsockname => { family AF_INET, address 0.0.0.0, port 2300 }
None of the computers is able to read the correct address back, as far as I remember that is by design inside our code.
But, is that really important? Why does it work for 2 computers when the very same operation is done:
trace:winsock:WS_bind socket 01b4, ptr 0x5b0c478 { family AF_INET, address 192.168.13.12, port 2300 }, length 16 trace:winsock:interface_bind Socket 01b4 bound to interface index 2 trace:winsock:WS_getsockname socket: 01b4, ptr 0x5b0c478, len 00000010 trace:winsock:WS_getsockname => { family AF_INET, address 0.0.0.0, port 2300 }
Maybe the game uses different code paths for 2 or more players?
https://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #24 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 51132 --> https://bugs.winehq.org/attachment.cgi?id=51132 try to get the right IP for the interface
Please try the attached hack, it's meant to prove the theory that the problem is related to the interface IP. Get a +winsock with it, there must be a line like:
trace:winsock:WS_bind socket 01b4, ptr 0x2434c48 { family AF_INET, address 192.168.0.190, port 2300 }, length 16 trace:winsock:interface_bind Socket 01b4 bound to interface index 3 trace:winsock:WS_getsockname socket 01b4, ptr 0x2434c48, len 00000010 trace:winsock:WS_getsockname RESTORING ORIGINAL UDP BOUND SOCKET trace:winsock:WS_getsockname => { family AF_INET, address 192.168.0.190, port 2300 }
Not like:
trace:winsock:WS_bind socket 01b4, ptr 0x2434c48 { family AF_INET, address 192.168.0.190, port 2300 }, length 16 trace:winsock:interface_bind Socket 01b4 bound to interface index 3 trace:winsock:WS_getsockname socket 01b4, ptr 0x2434c48, len 00000010 trace:winsock:WS_getsockname => { family AF_INET, address 0.0.0.0, port 2300 }
Naturally the IP values will be different =)
https://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #25 from Rodrigo P. Fraga rodrigo.p.fraga@gmail.com ---
Sorry, but how can I compile and run that?
https://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #26 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Rodrigo P. Fraga from comment #25)
Sorry, but how can I compile and run that?
To do that you need to compile wine yourself with the patch applied: http://wiki.winehq.org/GitWine http://wiki.winehq.org/Patching
Your name is common in Brazil, are you brazilian or portuguese by any chance?
https://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #27 from Rodrigo P. Fraga rodrigo.p.fraga@gmail.com --- Yes!! Aqui é brazuca fera :D (que não vota na Dilma rsrs)
I'll try to apply your patch. As I'm a Java developer and worked with C only in my graduation, I'll need some time to prepare my workbench.
Thanks for now.
https://bugs.winehq.org/show_bug.cgi?id=35831
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch Status|UNCONFIRMED |NEW Summary|Age of Mythology The Titans |Age of Mythology games with |- Multiplayer with more |more than 2 players don't |than 2 players do not work |work (interface bound | |sockets do not return the | |correct address in | |getsockname) Ever confirmed|0 |1
--- Comment #28 from Bruno Jesus 00cpxxx@gmail.com --- I'm now sure about what is the issue and the following patch fixes it: http://source.winehq.org/patches/data/110549
https://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #29 from Bruno Jesus 00cpxxx@gmail.com --- This bug should now be fixed in wine-git with commit http://source.winehq.org/git/wine.git/commitdiff/61ed82fc8685af0cf55de4b547a...
I'll wait for someone to test and give some news.
https://bugs.winehq.org/show_bug.cgi?id=35831
roi1979 roi@torkilsheyggi.fo changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #30 from roi1979 roi@torkilsheyggi.fo --- I'm very pleased to report that this issue has been resolved. We have been playing ~10 games with four players over the last week or so.
This has been done on three machines running Ubuntu 14.04 and one running Ubuntu 14.10. Compiled from source using the LXC container method as specified here: http://wiki.winehq.org/WineOn64bit
I've not tested with more than 4 players, nor on other versions of Linux.
Looking at hours of fun ahead - and as the original reporter of this bug - I would like to thank all involved parties. Especially Bruno for his patching wizardry!
https://bugs.winehq.org/show_bug.cgi?id=35831
--- Comment #31 from Thom Blake thethomblake@gmail.com --- So is this patch going to find its way into a release?
https://bugs.winehq.org/show_bug.cgi?id=35831
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |61ed82fc8685af0cf55de4b547a | |38e3e5893dd99
--- Comment #32 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Thom Blake from comment #31)
So is this patch going to find its way into a release?
It is present since wine 1.7.41.
(In reply to roi1979 from comment #30)
I'm very pleased to report that this issue has been resolved. We have been playing ~10 games with four players over the last week or so.
Thanks for testing and for the kind words =)
https://bugs.winehq.org/show_bug.cgi?id=35831
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |winsock
https://bugs.winehq.org/show_bug.cgi?id=35831
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #33 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.43.