http://bugs.winehq.org/show_bug.cgi?id=33753
Bug #: 33753 Summary: Titan Quest : Multiplayer not working Product: Wine Version: 1.5.15 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winsock AssignedTo: wine-bugs@winehq.org ReportedBy: papon.jonathan@laposte.net CC: erich.e.hoover@gmail.com Classification: Unclassified Regression SHA1: 57019615b51378187b9a09be55e262dc664cfc4f
Multiplayer isn't working anymore in Titan quest Immortal throne since wine 1.5.15.
Done a regression test within a fresh wineprefix :
57019615b51378187b9a09be55e262dc664cfc4f is the first bad commit commit 57019615b51378187b9a09be55e262dc664cfc4f Author: Erich Hoover ehoover@mines.edu Date: Wed Sep 26 16:38:29 2012 -0600
ws2_32: Permit broadcast packets on interface-bound sockets for systems with IP_UNICAST_IF and SO_ATTACH_FILTER.
:100755 100755 54675b44e71c43c31db8c26a82bd0607cb2725b7 2be377a96a90cd23e650563ccb6a8d407c3ea921 M configure :100644 100644 79b1175a62982c8108d79d155f243abe735caa7f eb57696d7c6f0fc7803d29f649ade9a52ae92637 M configure.ac :040000 040000 b44a50d13ab931d436a02b8a69669167b8237678 5c6a58e59fa06d5c5332071e98516b001e7db206 M dlls :040000 040000 daaa99bf9fc0828a963a9ee20657fff6e664030a 883df919659a58b9363a21bc2aab6df5199cb952 M include
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #1 from Erich Hoover erich.e.hoover@gmail.com 2013-06-08 09:00:43 CDT --- What kernel version are you using?
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #2 from papon.jonathan@laposte.net 2013-06-08 10:49:03 CDT --- 3.9.4-1 at the moment, but I noticed this bug some months ago. (I should have reported it earlier, my bad)
http://bugs.winehq.org/show_bug.cgi?id=33753
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #3 from Erich Hoover erich.e.hoover@gmail.com 2013-06-08 11:29:41 CDT --- (In reply to comment #2)
3.9.4-1 at the moment, but I noticed this bug some months ago. (I should have reported it earlier, my bad)
Ok, could you run Wine with WINEDEBUG="+winsock" and see what messages show up? I'd expect to see "Socket <x> bound to interface index <y>" when it's working properly. Also, what kind of network adapter situation do you have?
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #4 from papon.jonathan@laposte.net 2013-06-08 11:44:38 CDT --- Created attachment 44696 --> http://bugs.winehq.org/attachment.cgi?id=44696 WINEDEBUG=+winsock,-d3d,-font wine-1.5.14
Here's an output on wine 1.5.14 when the game is working as intended when hosting a lan game.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #5 from papon.jonathan@laposte.net 2013-06-08 11:47:55 CDT --- Created attachment 44697 --> http://bugs.winehq.org/attachment.cgi?id=44697 WINEDEBUG=+winsock,-d3d,-font wine-1.5.31
Output when hosting a lan game alone on 1.5.31; Spell's aren't working, ennemies can't be hit.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #6 from papon.jonathan@laposte.net 2013-06-08 11:53:31 CDT --- Ok, I've added 2 attachement in both situation (when working as intended and when it's not).
My bad, I forgot to be more specific on my test case : Hosting a lan game from the client result in the game launching just fine, but ennemies can't be hit, and spells aren't working. Besides movement are working as intended (ie: you can see ennemies walking and trying to hit other entities; but any hit aren't triggered at all)
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #7 from papon.jonathan@laposte.net 2013-06-08 12:05:16 CDT --- (In reply to comment #3)
Also, what kind of network adapter situation do you have?
Well, everything should work on loopback; so I also tried the game when disabling eth0 and wlan0; and got the same behavior.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #8 from Erich Hoover erich.e.hoover@gmail.com 2013-06-08 12:26:43 CDT --- (In reply to comment #7)
(In reply to comment #3)
Also, what kind of network adapter situation do you have?
Well, everything should work on loopback; so I also tried the game when disabling eth0 and wlan0; and got the same behavior.
Uh, that patch shouldn't do anything with the loopback adapter... Have you tried disabling the call to "interface_bind" and seeing if that fixes your problem?
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #9 from papon.jonathan@laposte.net 2013-06-08 14:14:15 CDT --- (In reply to comment #8)
(In reply to comment #7)
(In reply to comment #3)
Also, what kind of network adapter situation do you have?
Well, everything should work on loopback; so I also tried the game when disabling eth0 and wlan0; and got the same behavior.
Uh, that patch shouldn't do anything with the loopback adapter... Have you tried disabling the call to "interface_bind" and seeing if that fixes your problem?
Ok, (haven't touched any C for allmost 10 years), I removed the call to "interface_bind" in the WS_bind function; ie I removed the 2 lines : else if (interface_bind(s, fd, &uaddr.addr)) in4->sin_addr.s_addr = htonl(WS_INADDR_ANY);
And the game is working as intended (Hosting a local lan game result in a fully playable environement).
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #10 from Erich Hoover erich.e.hoover@gmail.com 2013-06-08 14:52:32 CDT --- (In reply to comment #9)
Ok, (haven't touched any C for allmost 10 years), I removed the call to "interface_bind" in the WS_bind function; ie I removed the 2 lines : else if (interface_bind(s, fd, &uaddr.addr)) in4->sin_addr.s_addr = htonl(WS_INADDR_ANY);
And the game is working as intended (Hosting a local lan game result in a fully playable environement).
Ok, put that code back and then remove the line that says: if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER ... and the following line with the goto and see what that does.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #11 from papon.jonathan@laposte.net 2013-06-08 16:35:34 CDT --- (In reply to comment #10)
Ok, put that code back and then remove the line that says: if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER ... and the following line with the goto and see what that does.
It also fixes the problem; I can host a game in multiplayer mode, and cast spell/attack entities.
(in fact, I am in an hotel, so I can't test right away with 2 client, but will try to grab another when I can)
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #12 from Erich Hoover erich.e.hoover@gmail.com 2013-06-08 16:42:19 CDT --- (In reply to comment #11)
(In reply to comment #10)
Ok, put that code back and then remove the line that says: if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER ... and the following line with the goto and see what that does.
It also fixes the problem; I can host a game in multiplayer mode, and cast spell/attack entities.
Can you double check that when you add this part back in that it breaks your application? It sounds like, for some reason, the incoming packet filter isn't working properly for your application.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #13 from Erich Hoover erich.e.hoover@gmail.com 2013-06-08 18:24:08 CDT --- Created attachment 44702 --> http://bugs.winehq.org/attachment.cgi?id=44702 Something to try
Once you've confirmed that the filter is the problem, the attached patch is something for you to try. Currently the filter uses the interface index to screen packets, but I suspect that (if the filter is really the problem) your problem is that the program is looking for packets _sent by itself_ (rather than from another machine). I'm not entirely sure how to detect this circumstance with the filter, but the attached is at least something to try.
http://bugs.winehq.org/show_bug.cgi?id=33753
Erich Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #44702|0 |1 is obsolete| |
--- Comment #14 from Erich Hoover erich.e.hoover@gmail.com 2013-06-08 18:26:20 CDT --- Created attachment 44703 --> http://bugs.winehq.org/attachment.cgi?id=44703 Something to try
Whoops, wrong file.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #15 from papon.jonathan@laposte.net 2013-06-09 03:08:14 CDT --- Ok, so I double checked; adding the 2 lines back did bring back the regression for this application.
Then I applied the patch you've provided; the application is working again in the loopback scenario (ie:hosting a multiplayer game, and playing on your own).
I'll try to get another client to test the patch with another client connecting to the host as soon as possible.
http://bugs.winehq.org/show_bug.cgi?id=33753
Alexander Oblovatniy oblovatniy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |oblovatniy@gmail.com
--- Comment #16 from Alexander Oblovatniy oblovatniy@gmail.com 2013-06-12 13:44:54 CDT --- *** Bug 33791 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #17 from Erich Hoover erich.e.hoover@gmail.com 2013-06-13 15:39:33 CDT --- (In reply to comment #15)
... I'll try to get another client to test the patch with another client connecting to the host as soon as possible.
Have you had a chance to check this? I'd like to get a fix committed as soon as possible if this really is the problem.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #18 from papon.jonathan@laposte.net 2013-06-15 13:40:49 CDT --- (In reply to comment #17)
Have you had a chance to check this? I'd like to get a fix committed as soon as possible if this really is the problem.
I've done some test today remotely with 2 computers on the same lan. Using 2 fresh wineprefix on 2 computers with latest git patched with attachement44703 we weren't able to connect to each other.
I'll be able to further test this after wednesday.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #19 from Erich Hoover erich.e.hoover@gmail.com 2013-06-15 14:27:07 CDT --- (In reply to comment #18)
I've done some test today remotely with 2 computers on the same lan. Using 2 fresh wineprefix on 2 computers with latest git patched with attachement44703 we weren't able to connect to each other.
Would you mind checking that it worked before commit 57019615b51378187b9a09be55e262dc664cfc4f?
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #20 from papon.jonathan@laposte.net 2013-06-16 10:54:17 CDT --- (In reply to comment #19)
(In reply to comment #18)
I've done some test today remotely with 2 computers on the same lan. Using 2 fresh wineprefix on 2 computers with latest git patched with attachement44703 we weren't able to connect to each other.
Would you mind checking that it worked before commit 57019615b51378187b9a09be55e262dc664cfc4f?
Ok, I've checked back today, looks like my 2 computers werehaving trouble to connect to each other (I'll be able to troubleshoot this when I'll be home by wednesday).
Anyway, I've asked my wife to try this out by using one computer on linux and the other one on windows 7; here's the test results bellow :
⏐ Windows 7 Hosting ⏐ Linux Hosting 9f2f7600c5d79e243b6cd670c1506e273add99c6 ⏐ works ⏐ works 57019615b51378187b9a09be55e262dc664cfc4f ⏐ works ⏐ not working* latest 1.6 + attachment44703 ⏐ works ⏐ works
*ie: By not working I mean, windows can connect to the game, but both players don't see each other, ennemies can't be hit, spells do not work, etc
http://bugs.winehq.org/show_bug.cgi?id=33753
Erich Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1
--- Comment #21 from Erich Hoover erich.e.hoover@gmail.com 2013-06-16 13:05:28 CDT --- (In reply to comment #20)
... Ok, I've checked back today, looks like my 2 computers werehaving trouble to connect to each other (I'll be able to troubleshoot this when I'll be home by wednesday). ...
Alrighty, this sounds like attachment 44703 does the trick. If you are satisfied with it then just let me know and then I'll add a couple comments describing what the old filter rule works for and what the new filter rule does and then submit the fix.
http://bugs.winehq.org/show_bug.cgi?id=33753
Erich Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |erich.e.hoover@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #22 from Erich Hoover erich.e.hoover@gmail.com 2013-06-21 13:53:31 CDT --- I don't mean to be a bother, but are you satisfied with the fix? I'd really like to get this in before 1.6 gets released.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #23 from Bruno Jesus 00cpxxx@gmail.com 2013-06-21 13:59:05 CDT --- (In reply to comment #22)
I don't mean to be a bother, but are you satisfied with the fix? I'd really like to get this in before 1.6 gets released.
Erich, the patch fixes a similar issue in bug 33791. IMO it's safe to send.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #24 from papon.jonathan@laposte.net 2013-06-22 04:40:08 CDT --- (In reply to comment #22)
I don't mean to be a bother, but are you satisfied with the fix? I'd really like to get this in before 1.6 gets released.
I've tested it today, and been able to do a game session without any network problem. It certainly fixed the bug.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #25 from Erich Hoover erich.e.hoover@gmail.com 2013-06-25 14:50:06 CDT --- (In reply to comment #24)
I've tested it today, and been able to do a game session without any network problem. It certainly fixed the bug.
Awesome, would you mind trying with the latest git? This issue should now be fixed by commit 74010aa0e774b8b4e32455e6a42306f714ee66dd.
http://bugs.winehq.org/show_bug.cgi?id=33753
--- Comment #26 from papon.jonathan@laposte.net 2013-06-25 17:33:02 CDT --- (In reply to comment #25)
(In reply to comment #24)
I've tested it today, and been able to do a game session without any network problem. It certainly fixed the bug.
Awesome, would you mind trying with the latest git? This issue should now be fixed by commit 74010aa0e774b8b4e32455e6a42306f714ee66dd.
Confirming, fixed in latest git.
http://bugs.winehq.org/show_bug.cgi?id=33753
Erich Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |74010aa0e774b8b4e32455e6a42 | |306f714ee66dd Status|ASSIGNED |RESOLVED Resolution| |FIXED
--- Comment #27 from Erich Hoover erich.e.hoover@gmail.com 2013-06-25 17:39:19 CDT --- Awesome, thanks! Let me know if you run into any more trouble.
http://bugs.winehq.org/show_bug.cgi?id=33753
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #28 from Alexandre Julliard julliard@winehq.org 2013-06-28 15:03:31 CDT --- Closing bugs fixed in 1.6-rc4.