https://bugs.winehq.org/show_bug.cgi?id=45525
Bug ID: 45525 Summary: Heroes 3 Horn of the Abyss crashes on create a host TCP/IP multiplayer game Product: Wine Version: 3.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: mo78@abv.bg Distribution: ---
Created attachment 61913 --> https://bugs.winehq.org/attachment.cgi?id=61913 wine.log
Heroes 3 Horn of the Abyss crashes on create a host multiplayer TCP/IP game with tje last 1.5.3 version. I tried multiple wine versions, including 2.xx to no avail.
https://bugs.winehq.org/show_bug.cgi?id=45525
mo78@abv.bg changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mo78@abv.bg
--- Comment #1 from mo78@abv.bg --- Created attachment 61914 --> https://bugs.winehq.org/attachment.cgi?id=61914 wine+d3d.log
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #2 from mo78@abv.bg --- Created attachment 61915 --> https://bugs.winehq.org/attachment.cgi?id=61915 wine+d3d_shader,+dxgi,+d3d11.log
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #3 from mo78@abv.bg --- Created attachment 61916 --> https://bugs.winehq.org/attachment.cgi?id=61916 wine+tid,+seh,+relay,+dplay
https://bugs.winehq.org/show_bug.cgi?id=45525
mo78@abv.bg changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Heroes 3 Horn of the Abyss |Heroes 3 Horn of the Abyss |crashes on create a host |freezes on create a host |TCP/IP multiplayer game |TCP/IP multiplayer game
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #4 from Matteo Bruni matteo.mystral@gmail.com --- You should probably fix your setup first:
00d0:err:winediag:gnutls_initialize failed to load libgnutls, no support for encryption
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #5 from mo78@abv.bg --- I have this lib installed in my system bur Wine doesn't see it. With this setup I play many games, including modern games like Far Cry 5, Battlefield 1, NFS Payback, Red Faction 2018 etc. I tried the game on Arch Linux and on Linux Mint on four computers all with the same result.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #6 from mo78@abv.bg --- I just tried logging in Linux Mint - rhere is the same libgnutls error and I'm shure that it'll be there in all distributions. I'm ready for advice how to fix this first.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #7 from Matteo Bruni matteo.mystral@gmail.com --- Make sure you have the 32-bit version of the library installed. If you need further instructions please seek help on our forum at https://forum.winehq.org/
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #8 from mo78@abv.bg --- Yes I have it installed:
https://s15.postimg.cc/6dpl4thff/Screenshot_20180730_225655.png
As I already said, I play many games via Wine and I have all prerquisites, including all needed libraries. I'm posting thi because it's a bug didn't it?
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #9 from Matteo Bruni matteo.mystral@gmail.com --- Well, you're not supposed to get that message, so it looks like there is still something amiss on your machine.
I don't know that has to do anything with the bug though, which is the reason this bug is still open and appreciated :)
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #10 from mo78@abv.bg --- That error is present on other machines too, not only here. It's a Wine bug, not my setup fault.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #11 from mo78@abv.bg --- Now I tried it on my brother's computer at work which is with Linux Mint Cinnamon 18.3. The libgnutils error isn't there but it's still impossible to create TCP/IP game for the game freezes immediately. I'll attach this log too.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #12 from mo78@abv.bg --- Created attachment 61951 --> https://bugs.winehq.org/attachment.cgi?id=61951 Linux Mint Cinnamon 18.3 log
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #13 from mo78@abv.bg --- Hello again :) I created a thread in the Wine forum, and the gnutils problem is solved. Now I didn't get this error but the game still crashes at TCP/IP creation so it's obvious that the gnutils error was not relevant.
You can find my theme here: https://forum.winehq.org/viewtopic.php?f=8&t=30962
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #14 from mo78@abv.bg --- Created attachment 61953 --> https://bugs.winehq.org/attachment.cgi?id=61953 Arch Linux Wine log file
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #15 from mo78@abv.bg --- Wine 3.14 - the problem is still here :(
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #16 from mo78@abv.bg --- Wine 3.18 - the problem is still here
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #17 from mo78@abv.bg --- Wine 3.20 - the problem is still here.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #18 from mo78@abv.bg --- Wine 4.0-rc1, the problem is still here :(
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #19 from mo78@abv.bg --- Wine 4.0 RC3 - the problem is still here.
https://bugs.winehq.org/show_bug.cgi?id=45525
Paul Gofman gofmanp@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gofmanp@gmail.com
--- Comment #20 from Paul Gofman gofmanp@gmail.com --- Created attachment 63109 --> https://bugs.winehq.org/attachment.cgi?id=63109 Test event namespace visibility
I have surfed through the log from comment #3 a bit. It seems like the application goes into infinite wait:
004d:err:ntdll:RtlpWaitForCriticalSection section 0x2c119d8 "?" wait timed out in thread 004d, blocked by 0030, retrying (60 sec) 004c:err:ntdll:RtlpWaitForCriticalSection section 0x2c119f8 "?" wait timed out in thread 004c, blocked by 0030, retrying (60 sec) 004d:err:ntdll:RtlpWaitForCriticalSection section 0x2c119d8 "?" wait timed out in thread 004d, blocked by 0030, retrying (5 min) 004c:err:ntdll:RtlpWaitForCriticalSection section 0x2c119f8 "?" wait timed out in thread 004c, blocked by 0030, retrying (5 min)
Here is the relevant part from the thread 0030 which is seemingly holding the others (the wait in the last line never returns):
------- 0030:Call KERNEL32.OpenEventA(00100000,00000000,5df01310 "__DPHelpStartupEvent__") ret=5df05721 0030:Ret KERNEL32.OpenEventA() retval=00000000 ret=5df05721 0030:Call KERNEL32.CreateProcessA(00000000,5df01328 "dplaysvr.exe",00000000,00000000,00000000,00000020,00000000,00000000,00339894,003398d8) ret=5df0575c 0030:Ret KERNEL32.CreateProcessA() retval=00000001 ret=5df0575c 0030:Call KERNEL32.CreateEventA(00000000,00000001,00000000,5df01310 "__DPHelpStartupEvent__") ret=5df056dc 0030:Ret KERNEL32.CreateEventA() retval=00000184 ret=5df056dc 0030:Call KERNEL32.WaitForSingleObject(00000184,ffffffff) ret=5df056ed -------
And here are the relevant calls from the process created by thread 0030: ----- 004f:Call KERNEL32.CreateEventA(01008560,00000001,00000000,01001278 "Global\__DPHelpStartupEvent__") ret=01002183 004f:Ret KERNEL32.CreateEventA() retval=00000020 ret=01002183
... 004f:Call KERNEL32.SetEvent(00000020) ret=01002312 004f:Ret KERNEL32.SetEvent() retval=00000001 ret=01002312 -----
So the child process signals the event, but apparently the events "Global\__DPHelpStartupEvent__" and "__DPHelpStartupEvent__" are different event objects and signalling the former has no effect on process waiting on the latter. I've made a small test (attached), and according to my testing such event objects are the same under Windows XP but different on Vista+.
So the question is, does this work, e, g, on Windows 7? If no, this event visibility thing is most likely the cause of the issue observed.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #21 from Paul Gofman gofmanp@gmail.com --- PS I suppose that if dplaysvr.exe is started on Windows as a service, these events objects should end up being the same too, though I did not test it. Unfortunately I don't have the game to test, but after some googling on this game LAN issues under Windows I suppose that starting dplaysvr.exe on the way is a fallback path which is not used on Windows when dplaysvr.exe is started as service. So to correctly test this problem with Windows 7 one should stop and disable dplaysvr.exe if it is in the services list.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #22 from mo78@abv.bg --- Thank you Paul Gofman. Finaly someone to look at tjis problem. Your help is appreciated!
How can I stop the dplaysvr.exe service in Wine? I tried to set dlloverride for it to "disabled" to no avail.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #23 from Paul Gofman gofmanp@gmail.com --- (In reply to mo78 from comment #22)
How can I stop the dplaysvr.exe service in Wine? I tried to set dlloverride for it to "disabled" to no avail.
I was thinking of doing some tests on Windows, not in Wine, to understand how it was supposed to work natively. I think I will try to get the game and take a look myself. Do you have a link for download for the exact game version which you are using (an official download link which is free to download or can be bought)?
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #24 from mo78@abv.bg --- It's free:
https://www.hota.acidcave.net/download.html
With it you can run and vanilla Heroes of Might and Magic III :)
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #25 from mo78@abv.bg --- It's important to say that creating a TCP/IP game works without problems with vanilla HOMM III. If you use HOTA launcher however, it breaks for some reason.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #26 from Paul Gofman gofmanp@gmail.com --- 1. Vanilla version (from GoG.com)
TCP multiplayer host creation does not work out of the box (hits builtin directplay unimplemented features) but works with native direct play ('winetricks directplay').
2. HD patch Game hangs on attempt to create a TCP multiplayer host exactly the same way as in above comments (even if original unmodified executable is run). This is caused by DPWSOCKX.DLL which HD patch installs into the game directory. It gets loaded instead of the one installed c:\windows\system32. The version and size of the file suggests this dll is from DirectX 7.0 (Win95/98). Simply deleting the file fixes the issue (does not hang and opens the next window; I did not test actual multiplayer game though).
Some Windows users experience similar problems (google for "homm3 hd mod "dpwsockx.dll"") and solve this problem the same way.
I tested the game with HD patch on Windows XP and Windows 7. It worked fine out of the box in both versions for me without deleting DPWSOCKX.DLL.
As for Windows 7, it worked only because of different (newer) version of dplaysvr.exe. Replacing dplaysvr.exe by the one installed by winetricks leads to the same hang under Windows 7. Replacing dplaysvr.exe in Wine did not work for me as the newer dplaysvr.exe from my Windows 7 installation hits various unimplemented API functions under Wine (which can probably be qualified as bugs but unrelated to this one).
As for WinXP, there is no hang even with dplaysvr.exe taken from winetricks directplay version. This is consistent with my event visibility testing in Comment #20. This is probably supposed to work the same way under Wine if Windows version set to somewhat earlier than Vista (e. g. XP), but it doesn't. I've tested a workaround patch which simply "swallows" Global\ prefix in sync object names and it fixes the issue too.
So as a bottom line in respect to this bug Wine seems to work exactly the same way as Windows Vista+. The issue can be fixed by deleting DPWSOCKX.DLL from game directory after installing HD patch.
Yet I suppose here is a bug in (not) handling sync objects events namespaces for Windows versions set below XP. Besides, for Vista+ versions Windows docs claim that Global\ prefixes are assumed by default for service processes (those having session id 0), and, while unrelated to this bug, can potentially be of some issue too as Wine currently seems to not handling namespace prefixes anyhow.
https://bugs.winehq.org/show_bug.cgi?id=45525
--- Comment #27 from mo78@abv.bg --- Man you are GREAT!!! I tried to delete the dll and it really works! This solves this bug too: https://bugs.winehq.org/show_bug.cgi?id=45507 Thank you very, very much!!!
https://bugs.winehq.org/show_bug.cgi?id=45525
i.Dark_Templar idarktemplar@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |idarktemplar@mail.ru
https://bugs.winehq.org/show_bug.cgi?id=45525
Dispossessed Spirit 8090asdfghjkl@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |8090asdfghjkl@gmail.com
--- Comment #28 from Dispossessed Spirit 8090asdfghjkl@gmail.com --- As more than 2 years have passed since last test, and the HD Mod is frequently updated, tested again to see if the problem persists. Tested and confirmed with Wine 6.1, HotA 1.6.1, HD Mod 5.2 RC28, HoMM III GOG.com version. Freeze happens both with directplay.dll enabled and disabled. Setting dpwsockx to overwrite (native, then builtin) in winecfg does not fix the issue. Workaround suggested in https://bugs.winehq.org/show_bug.cgi?id=45525#c26 works.