http://bugs.winehq.org/show_bug.cgi?id=10229
Summary: Serious Sam TSE 1.07 - network connection fails Product: Wine Version: 0.9.47. Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: wine-net AssignedTo: wine-bugs@winehq.org ReportedBy: liquid.acid@gmx.net
Hi there,
I recently installed Serious Sam: The Second Encounter for some intense LAN gaming experience with my friends. There were two linux boxes and 4 windows boxes, me hosting the server.
The problem was that nobody could connect to the server. Connection attempts always resulted in the error message "CRC error in DIFF" (explanation here: http://forums.seriouszone.com/showthread.php?t=8556). This affected both the windows boxes AND the other linux box.
If a windows box was hosting the server the other windows boxes could connect, but the linux boxes couldn't (I have to look up the error message there).
The problem isn't related to the safedisc copy protection removal I had to do to make the game run under wine. We double checked this by applying the removal patch on the windows server and also on the clients (while the server was uncracked), no difference at all.
This was all with SS TSE patched to the most recent offical version 1.07.
Now we somehow managed to evade the problem by updating to the public beta patch 1.50 which let everyone connect to the linux server, again independent from crack status of the clients. But we soon realized why the 1.50 patch was marked beta. Network trouble en masse, resulting in highly instable connection, spontaneous client drops and the server misbehaving (moving around the players without the client pushing any buttons). This problem exists both when running the server through wine or natively on a windows box. Frankly, when running the 1.50 server on a linux box we experienced fewer problems when running natively (speaks in favor of the linux network capabilities *g*).
Now I'm asking how to analyze the problem. I don't get any network related output on the console while wine is running, only a few things about D3D and stuff, but nothing on network.
Going to attach some in-game logs when I have access to the server box again.
Thanks, liquid
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #1 from Kai Blin blin@gmx.net 2007-10-29 14:07:02 --- Can you please give the output of running "getent hosts yourhostname" in a console, replacing "yourhostname" with your real host name, of course?
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #2 from Tobias Jakobi liquid.acid@gmx.net 2007-10-29 14:44:57 --- That gives: 192.168.0.8 voodoomaster.entropy voodoomaster
If I'm right this is information directly from /etc/hosts, right?
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #3 from Kai Blin blin@gmx.net 2007-10-29 17:23:25 --- Yes, and as far as I can see, it looks ok. Can you please provide a +winsock trace?
WINEDEBUG=+winsock wine app.exe > ssam_winsock.txt 2>&1
http://bugs.winehq.org/show_bug.cgi?id=10229
Tobias Jakobi liquid.acid@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |liquid.acid@gmx.net Version|0.9.47. |0.9.55.
--- Comment #4 from Tobias Jakobi liquid.acid@gmx.net 2008-02-20 08:16:23 --- Hi there,
sorry it took so long. Me and my colleagues had a "serious" gaming session yesterday and we rechecked the winsock problem there.
Machines in the network: 1) Win XP machine (192.168.0.7) 2) Win XP machine (192.168.0.122) 3) Windows Vista machine (192.168.0.243) 4) Gentoo Linux machine (192.168.0.8) <--- ME 5) Gentoo Linux machine (192.168.0.22)
All machines had Serious Sam TSE 1.07 installed, no copy protection fix was applied (optical disc emulators on every system).
I bumped the wine version to 0.9.55, that's the version that was installed on both machine 4 and 5.
The bug still appears and I made some logs with different configurations.
However we managed to get connecting working between the two gentoo machines. As I was making the logs we produced one log with ME being the server and machine 5 the connecting client, and one log with machine 5 being server and ME connecting.
We also tried the config "windows machine to linux server", "linux client to windows machine", etc.
I'm going to attach the logs and maybe some further informations this evening.
Like I said connecting from linux to linux works, so there seems to be some incompatibility between the winsock implementations.
Greets, Tobias
http://bugs.winehq.org/show_bug.cgi?id=10229
Jan Buecken jb.faq@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jb.faq@gmx.de
http://bugs.winehq.org/show_bug.cgi?id=10229
Jan Buecken jb.faq@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #5 from Jan Buecken jb.faq@gmx.de 2008-02-20 08:26:03 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=10229
Kai Blin blin@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|0.9.55. |0.9.47.
--- Comment #6 from Kai Blin blin@gmx.net 2008-02-20 13:20:06 --- Please don't change the reported version. Waiting for the logs.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #7 from Tobias Jakobi liquid.acid@gmx.net 2008-02-20 15:39:36 --- Oh sorry, I didn't know this was forbidden (may I ask why?).
Going to attach the logs now. Some are quite large, so I'm going to bzip2 all of them. I hope this is no problem!
Thanks, Tobias
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #8 from Tobias Jakobi liquid.acid@gmx.net 2008-02-20 15:41:04 --- Created an attachment (id=10869) --> (http://bugs.winehq.org/attachment.cgi?id=10869) Serious Sam TSE 1.07 WinSock log (fail)
ME (linux machine) being the server Server setup: Non-dedicated and waiting for players Windows machines joining, all are dropped (usual error message)
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #9 from Tobias Jakobi liquid.acid@gmx.net 2008-02-20 15:43:29 --- Created an attachment (id=10870) --> (http://bugs.winehq.org/attachment.cgi?id=10870) Serious Sam TSE 1.07 WinSock log (fail)
A Windows XP machine is hosting the server Setup: Non-dedicated and waiting for players ME (linux machine) tries joining the server
Connection attempt by the game client but I'm dropped after some seconds.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #10 from Tobias Jakobi liquid.acid@gmx.net 2008-02-20 15:45:30 --- Created an attachment (id=10871) --> (http://bugs.winehq.org/attachment.cgi?id=10871) Serious Sam TSE 1.07 WinSock log (fail)
Like the previous one. But now we have three different servers open and I'm doing three connection attempts:
1) xp machine (192.168.0.7) 2) xp machine (192.168.0.122) 3) vista machine (192.168.0.234)
All three attempts however fail.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #11 from Tobias Jakobi liquid.acid@gmx.net 2008-02-20 15:48:49 --- Created an attachment (id=10872) --> (http://bugs.winehq.org/attachment.cgi?id=10872) Serious Sam TSE 1.07 WinSock log (works)
My friends is hosting the linux server on his Gentoo box.
ME (also linux system) tries to connect to: 1) XP machine (fails, didn't expect anything different) 2) Linux server (connection works, I'm in game and I can see my buddy)
Server setup like always.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #12 from Tobias Jakobi liquid.acid@gmx.net 2008-02-20 15:50:32 --- Created an attachment (id=10873) --> (http://bugs.winehq.org/attachment.cgi?id=10873) Serious Sam TSE 1.07 WinSock log (works)
This time I'm hosting the server and my friend tries to connect with his Gentoo box.
Connection is established, we're in game -> Works! Server setup: again the same
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #13 from Tobias Jakobi liquid.acid@gmx.net 2008-02-20 15:52:08 --- "Waiting for players": Server setup option so the server waits for the configured amount of players to join the server before the game is really started. When doing inter-connects (win<->lin) this didn't change the situation that establishing a connection was impossible.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #14 from Kai Blin blin@gmx.net 2008-02-20 15:55:45 --- (In reply to comment #7)
Oh sorry, I didn't know this was forbidden (may I ask why?).
In case of a regression it's helpful to know when it started breaking. If it stays broken the bug stays open, and a simple message that it was retested with a new version is sufficient.
Going to attach the logs now. Some are quite large, so I'm going to bzip2 all of them. I hope this is no problem!
No, that's fine. I'm not sure when I'll have time to have a look at it, though.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #15 from Tobias Jakobi liquid.acid@gmx.net 2008-02-20 16:09:46 --- In case you need more logs just ask for it.
Good excuse for us doing another frag session ;-)
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #16 from Tobias Jakobi liquid.acid@gmx.net 2008-03-09 07:16:51 --- Reconfirming this bug with wine-0.9.57
We made an additional check so see if this is really a wine bug. So I used my Windows 2000 SP4 VM to start the dedicated server and hosting the game. Windows machines could connect to the VM, but by local wine could not and other linux machines also received the famous CRC error in DIFF.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #17 from Tobias Jakobi liquid.acid@gmx.net 2008-03-14 15:57:52 --- I found this ChangeLog interesting: http://www.seriousengine.com/wiki/Change_Log_%281.x%29 (because it mentions changes on the network implementation)
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #18 from Tobias Jakobi liquid.acid@gmx.net 2008-06-04 19:18:33 --- Reconfirming with wine-1.0_rc3
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #19 from Tobias Jakobi liquid.acid@gmx.net 2008-06-18 16:57:45 --- Reconfirming with wine-1.0_rc5
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #20 from Tobias Jakobi liquid.acid@gmx.net 2008-06-18 17:44:29 --- I have create some more logs. This time with Wireshark so traffic can be analysed.
Server is running in a win2k VM on my linux system. Three logs were created: (i) Wine running on the same system (outside of the VM of course) trying to join the game (on the VM server) -> fails, usual error (ii) Wine running on a remote system, same thing (iii) Remote system this time with a vista setup, connecting works
Attaching logs...
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #21 from Tobias Jakobi liquid.acid@gmx.net 2008-06-18 17:45:17 --- Created an attachment (id=14169) --> (http://bugs.winehq.org/attachment.cgi?id=14169) wireshark log (setup (i))
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #22 from Tobias Jakobi liquid.acid@gmx.net 2008-06-18 17:45:42 --- Created an attachment (id=14170) --> (http://bugs.winehq.org/attachment.cgi?id=14170) wireshark log (setup (ii))
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #23 from Tobias Jakobi liquid.acid@gmx.net 2008-06-18 17:46:25 --- Created an attachment (id=14171) --> (http://bugs.winehq.org/attachment.cgi?id=14171) wireshark log (setup (iii))
http://bugs.winehq.org/show_bug.cgi?id=10229
Kai Blin kai.blin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #24 from Kai Blin kai.blin@gmail.com 2008-06-19 02:23:44 --- I'll have a look at the wireshark traces.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #25 from Tobias Jakobi liquid.acid@gmx.net 2008-06-19 10:09:48 --- Thanks Kai,
if these logs don't help you / you need additional information / you want logs with more precise information (there is some "noise" from samba in the first log) just ask for them!
Greets, Tobias
http://bugs.winehq.org/show_bug.cgi?id=10229
Robert Austen the_worm2@bestmail.us changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |the_worm2@bestmail.us
--- Comment #26 from Robert Austen the_worm2@bestmail.us 2008-06-19 15:36:31 --- I agree with Jakobi that this bug is related to:
http://bugs.winehq.org/show_bug.cgi?id=7996
(dedicated servers for TFE1.05 and TSE1.07 do not allow windows clients to connect)
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #27 from Tobias Jakobi liquid.acid@gmx.net 2008-07-11 06:19:02 --- Hi there, I asked Ryan C. Gordon from icculus.org about the problem (since he ported SS to linux) and post the discussion here:
------------------------------
Ryan responded to some other user asking:
Is there a chance you guys fixed the bug between Windows + linux users in Serious Sam: The First Encounter, Network gameplay?
No, it needed a patch to the Windows version to fix it (they rely on the checksum of floating point numbers matching, which vary between what code generated by Microsoft Visual C++ and gcc would calculate).
Sorry, --ryan.
------------------------------
I became curious and asked him about the details:
Hi Ryan,
I have a question concerning this. Could it be possible that not only GCC is a problem here but also some other linux components.
I mention this because of these two wine bugs: http://bugs.winehq.org/show_bug.cgi?id=7996 http://bugs.winehq.org/show_bug.cgi?id=10229
Both have to do with problems between SS clients connecting to each other from different operating systems (CRC errors). Games hosted by windows machines (like the VM I mention in the bugreports) enable windows cients to connect to it, but linux clients (running through wine) can't.
On the other hand when a linux user is hosting the server through wine the linux clients can connect, but not the windows clients. Maybe this is not only related to wine's network code emulating windows behaviour, but probably the problem lies deeper (since you mention floating point matching; recently a D3D bug was fixed that had to do with FP math: http://bugs.winehq.org/show_bug.cgi?id=13225 - this one came to my mind when I read your post).
I would really appreciate it if you could take a look at the bugreport (mine also contains wireshark logs).
Thanks, Tobias Jakobi
------------------------------
Ryan responded:
On the other hand when a linux user is hosting the server through wine the linux clients can connect, but not the windows clients. Maybe this is not only related to wine's network code emulating windows behaviour, but probably the problem lies deeper (since you mention floating point matching; recently a D3D bug was fixed that had to do with FP math: http://bugs.winehq.org/show_bug.cgi?id=13225 - this one came to my mind when I read your post).
Without research, I'd guess that Wine doesn't change the FPU precision (which DirectX does by default behind the scenes). But I could be wrong.
It was a terrible, inexcusable design decision on Microsoft's part, and has caused everyone trouble: Windows developers, Linux people, Wine people...
The Sacrifice bug report is possibly related, but it's hard to say. Precision issues are nasty.
As far as Serious Sam goes: basically, one machine adds two numbers and comes up with 0.385419, the other comes up with 0.385420, and it's fine for game play, but since it's not a perfect match, the game thinks you have incompatible data and refuses to connect. It's not an FPU precision setting, or a bug in gcc...if you shuffle around the order that the math instructions run, you'll get a different result, so even a Debug and Release build of the Windows version probably became incompatible with each other.
There was discussion of ways to fix this with Croteam, many years ago, but they were already done with Serious Engine 1 when we got to that point, and didn't want to patch the Windows client to fix it.
My guess is that Wine, vmware, the Linux port, and probably the official win32 binaries on some yet-unannounced version of Windows will all have this problem. It's not a bug in Wine, it's just a bug that never bit Croteam on Windows.
--ryan.
------------------------------
So this might not be a winsock problem after all...
Greets, Tobias
http://bugs.winehq.org/show_bug.cgi?id=10229
Alexander Dorofeyev alexd4@inbox.lv changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexd4@inbox.lv
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #28 from Alexander Dorofeyev alexd4@inbox.lv 2008-07-18 17:12:32 --- What version of d3d does it use? Can be quickly checked by trying out debug channels, i.e. if it's d3d7 then there should be lots of output with +d3d7, if it's d3d8 then there shouldn't be +d3d7 output but should be +d3d8 output.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #29 from Tobias Jakobi liquid.acid@gmx.net 2008-07-18 18:09:50 --- Should use d3d8. I don't get any trace output with WINEDEBUG=+d3d7, but a few bits (attaching inline) with +d3d8.
The 3d engine is based on OpenGL though. At least I'm using the GL backend (since TSE there is also a D3D based backend).
(last bits from d3d8) trace:d3d8:IDirect3D8Impl_EnumAdapterModes (0x153068)->(0, 133, 0x32fb34) trace:d3d8:IDirect3D8Impl_GetAdapterIdentifier (0x153068)->(0,00000002, 0x32f498 trace:d3d8:IDirect3D8Impl_Release (0x153068) : ReleaseRef to 0 trace:d3d8:IDirect3D8Impl_Release Releasing wined3d 0x15f810 trace:d3d8:DllMain fdwReason=0
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #30 from Alexander Dorofeyev alexd4@inbox.lv 2008-07-18 18:40:14 --- (In reply to comment #29)
Should use d3d8. I don't get any trace output with WINEDEBUG=+d3d7, but a few bits (attaching inline) with +d3d8.
The 3d engine is based on OpenGL though. At least I'm using the GL backend (since TSE there is also a D3D based backend).
(last bits from d3d8) trace:d3d8:IDirect3D8Impl_EnumAdapterModes (0x153068)->(0, 133, 0x32fb34) trace:d3d8:IDirect3D8Impl_GetAdapterIdentifier (0x153068)->(0,00000002, 0x32f498 trace:d3d8:IDirect3D8Impl_Release (0x153068) : ReleaseRef to 0 trace:d3d8:IDirect3D8Impl_Release Releasing wined3d 0x15f810 trace:d3d8:DllMain fdwReason=0
FPU mode change by native d3d must be happening somewhere in IDirect3D8_CreateDevice. So if there is no CreateDevice then d3d fpu messing shouldn't be a factor. But maybe one of versions that were trying to connect was using d3d?
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #31 from Tobias Jakobi liquid.acid@gmx.net 2008-07-21 17:39:45 --- Created an attachment (id=14967) --> (http://bugs.winehq.org/attachment.cgi?id=14967) WINEDEBUG=+d3d8 trace
(In reply to comment #30)
FPU mode change by native d3d must be happening somewhere in IDirect3D8_CreateDevice. So if there is no CreateDevice then d3d fpu messing shouldn't be a factor.
I now attached the full log.
But maybe one of versions that were trying to connect was using d3d?
Nope, they were all using the OpenGL backend (which works better in general). For me e.g. the D3D backend doesn't work at all with wine -> just a black screen displayed.
Greets, Tobias
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #32 from H. Verbeet hverbeet@gmail.com 2008-08-28 21:01:33 --- Does the game use msvcrt? If it does, http://www.winehq.org/pipermail/wine-patches/attachments/20080829/4de76dd1/a... might affect this bug.
http://bugs.winehq.org/show_bug.cgi?id=10229
--- Comment #33 from Jan Buecken jb.faq@gmx.de 2008-08-29 08:23:08 --- (In reply to comment #32)
Does the game use msvcrt? If it does, http://www.winehq.org/pipermail/wine-patches/attachments/20080829/4de76dd1/a... might affect this bug.
Yes! Thats it. Just checked out newest git: Without this patch: problem holds With the patch: It works! (Only tested one direction: Windows XP Server (not dedicated), Linux Client)
@Tobias: Musst wohl früher wiederkommen, wir brauchen nen neuen Zockerabend...
http://bugs.winehq.org/show_bug.cgi?id=10229
Tobias Jakobi liquid.acid@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED
--- Comment #34 from Tobias Jakobi liquid.acid@gmx.net 2008-08-29 10:29:29 --- Great! I currently can't test this because I have no access to my desktop system.
But I totally trust Jan in this one. Since the patch is in git master now I'm resolving this (longstanding) bug to FIXED.
A big thanks goes to Ryan for explaining the major problems with SS network and to Henri for creating the patch.
Cheers, Tobias
http://bugs.winehq.org/show_bug.cgi?id=10229
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.0.1
--- Comment #35 from Alexandre Julliard julliard@winehq.org 2008-09-05 10:10:44 --- Nominating for 1.0.1.
http://bugs.winehq.org/show_bug.cgi?id=10229
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #36 from Alexandre Julliard julliard@winehq.org 2008-09-05 10:38:27 --- Closing bugs fixed in 1.1.4.