https://bugs.winehq.org/show_bug.cgi?id=39878
Bug ID: 39878 Summary: Diablo II does not start Product: Wine Version: 1.7.25 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: wylda@volny.cz Distribution: ---
Diablo 2 does not start under wine-1.9.0. This is actually regression caused by wine-1.7.24-57-g7cdaece:
commit 7cdaece711e696447b10ea9c0ab00b7ced799165 Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Aug 18 08:26:20 2014 +0200
wined3d: Store the amount of video memory as a UINT64.
Diff in console log between 1.7.24 and 1.7.25:
fixme:dbghelp_dwarf:dwarf2_parse_subprogram Unhandled Tag type 0x26 at ctx(0x32b964,L"kernel32<elf>"), for debug_info(abbrev:0x7a40c30,symt:0x7b9b0d8)
fixme:dbghelp_dwarf:dwarf2_parse_subprogram Unhandled Tag type 0x26 at ctx(0x32b964,L"advapi32<elf>"), for debug_info(abbrev:0x8631ce0,symt:0x86f81fc)
fixme:dbghelp_dwarf:dwarf2_parse_subprogram_block Unhandled Tag type 0x26 at ctx(0x32b964,L"comdlg32<elf>"), for debug_info(abbrev:0x8791fa0,symt:(nil))
...
https://bugs.winehq.org/show_bug.cgi?id=39878
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |hverbeet@gmail.com Regression SHA1| |7cdaece711e696447b10ea9c0ab | |00b7ced799165
--- Comment #1 from Wylda wylda@volny.cz ---
Filling some field... BTW: commit cannot be cleanly reverted on top of 1.9.0.
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #2 from Wylda wylda@volny.cz ---
As this will be related to amount of graphic memory - tested on: * GeForce GTX 970 * 4GB DDR5 * driver version 352.63
https://bugs.winehq.org/show_bug.cgi?id=39878
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Debian
https://bugs.winehq.org/show_bug.cgi?id=39878
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.kucia@gmail.com
--- Comment #3 from Józef Kucia joseph.kucia@gmail.com --- Could you attach a log with +d3d?
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #4 from Wylda wylda@volny.cz --- Created attachment 53246 --> https://bugs.winehq.org/attachment.cgi?id=53246 WINEDEBUG=+d3d from wine-1.7.24-80-g7596dc6
For comparison i could also attach good trace from wine-1.7.24 if needed. I also tried to rework this commit, so i could revert it on top of wine-1.9.0, but that does not start either. I guess that i messed the revert patch. I don't thing that there is another problem, because if fails consistently in newer wines.
Tested good versions: 1.7.{13,20,21,22,23,24}
Tested bad versions: 1.7.{25,35,40,45,47,48,50,51,52,53,54,55}, 1.9.0
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #5 from Józef Kucia joseph.kucia@gmail.com --- (In reply to Wylda from comment #4)
Created attachment 53246 [details] WINEDEBUG=+d3d from wine-1.7.24-80-g7596dc6
This log shows that the used adapter memory is decremented incorrectly but it was fixed in bd460bca1ccade89400515fa004c5e3204e55d11.
Please attach another log using a newer version, preferably 1.9.0.
https://bugs.winehq.org/show_bug.cgi?id=39878
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #53246|0 |1 is obsolete| |
--- Comment #6 from Wylda wylda@volny.cz --- Created attachment 53253 --> https://bugs.winehq.org/attachment.cgi?id=53253 WINEDEBUG=+d3d from wine-1.9.0
Please attach another log using a newer version, preferably 1.9.0.
I thought that good/bad trace comparison will save you time. Sorry if wasted. Attached.
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #7 from Wylda wylda@volny.cz --- I don't know if i'm looking at the same place, but 1.7.24 says:
trace:d3d:wined3d_device_get_available_texture_mem Emulating 768 MB, returning 768 MB left.
and 1.9.0 says:
trace:d3d:wined3d_device_get_available_texture_mem Emulating 0x100000000 bytes. 0x0 used, returning 0x100000000 left.
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #8 from Józef Kucia joseph.kucia@gmail.com --- Created attachment 53254 --> https://bugs.winehq.org/attachment.cgi?id=53254 ddraw: Limit reported free and total memory to INT_MAX.
It seems that Diablo II doesn't like when total or free memory is greater than INT_MAX. It probably interprets it as int32. The attached patch should help. However, I'm not sure if it's correct. It would be nice to check if Diablo II works on Windows with 4GB VRAM. If it works, it would be useful to check how much available memory native ddraw reports.
Other workaround: winetricks videomemorysize=2048
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #9 from Wylda wylda@volny.cz --- (In reply to Józef Kucia from comment #8)
Created attachment 53254 [details] ddraw: Limit reported free and total memory to INT_MAX.
Other workaround: winetricks videomemorysize=2048
Patch works. Limit to 2048 by registry/winetricks works too for vanila wine-1.9.0.
I will try Diablo2 on Win8.1 64bit (same machine). Is there a wine test, which i could run, which would report max memory reported by Win8.1 64bit?
https://bugs.winehq.org/show_bug.cgi?id=39878
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Diablo II does not start |Diablo II does not start on | |64bit system with more than | |2GB VRAM cards
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #10 from Józef Kucia joseph.kucia@gmail.com --- Created attachment 53255 --> https://bugs.winehq.org/attachment.cgi?id=53255 ddraw/tests: Print free and total memory.
(In reply to Wylda from comment #9)
I will try Diablo2 on Win8.1 64bit (same machine). Is there a wine test, which i could run, which would report max memory reported by Win8.1 64bit?
You could run ddraw2, ddraw4 and/or ddraw7 test with the attached patch.
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #11 from Wylda wylda@volny.cz --- (In reply to Józef Kucia from comment #8)
It would be nice to check if Diablo II works on Windows with 4GB VRAM.
Result is, that Diablo 2 does not run on Win8.1. Even if i tried following steps:
https://eu.battle.net/support/en/article/diablo-ii-compatibility-issues-and-...
I still got the same message box pop-up saying "UNHANDLED EXCEPTION: ACCESS_VIOLATION (c0000005)". The same message box pops up on Wine-1.9.0. So compatibility has been reached ;-))
The only way to run it on Win8.1 is through second workaround, i.e. run in windowed mode: "C:\DiabloII\Diablo II.exe" -w (not tested on Wine).
You could run ddraw2, ddraw4 and/or ddraw7 test with the attached patch.
I'm not able to get working Binary. I don't have those minigw stuff. Based on above expirence, if this is still interesting test, would you mind to attach final EXE. Or if this test-patch goes in, i can download pre-compiled test and report back.
If Diablo 2 AppDB admin is still active, it would be nice to mention working winetrick recipe as this bug is going to be invalid i guess :c(
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #12 from Wylda wylda@volny.cz ---
Just an idea - what about limiting max. mem on 32bit prefix & Win ver <= WinXP by Wine's default? 4Gigs VRAM wouldn't fit WinXP 32bit address space anyway, would it?
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #13 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Wylda from comment #12)
Just an idea - what about limiting max. mem on 32bit prefix & Win ver <= WinXP by Wine's default? 4Gigs VRAM wouldn't fit WinXP 32bit address space anyway, would it?
Sounds reasonable to me, currently there are some similar things done in GlobalMemoryStatus [1]
[1] http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/kernel32/heap.c#l1381
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #14 from Józef Kucia joseph.kucia@gmail.com --- (In reply to Wylda from comment #11)
I'm not able to get working Binary. I don't have those minigw stuff. Based on above expirence, if this is still interesting test, would you mind to attach final EXE. Or if this test-patch goes in, i can download pre-compiled test and report back.
ddraw2 test precompiled by Wine Test Bot: https://testbot.winehq.org/GetFile.pl?JobKey=19337&StepKey=2 ddraw7 test precompiled by Wine Test Bot: https://testbot.winehq.org/GetFile.pl?JobKey=19338&StepKey=2
You could run these two tests. If I remember correctly only "local video memory" cannot exceed INT_MAX to make Diablo 2 happy.
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #15 from Wylda wylda@volny.cz --- Created attachment 53299 --> https://bugs.winehq.org/attachment.cgi?id=53299 DDRAW Test result from 3 different systems
(In reply to Józef Kucia from comment #14)
You could run these two tests. If I remember correctly only "local video memory" cannot exceed INT_MAX to make Diablo 2 happy.
The ddraw7 does not report the memory. For sure i run it also on different systems, but ddraw7 did not report mem info.
As there are various DDRAW failures which makes the log bit longer, i rather attach them.
https://bugs.winehq.org/show_bug.cgi?id=39878
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #16 from Józef Kucia joseph.kucia@gmail.com --- (In reply to Wylda from comment #11)
I still got the same message box pop-up saying "UNHANDLED EXCEPTION: ACCESS_VIOLATION (c0000005)". The same message box pops up on Wine-1.9.0. So compatibility has been reached ;-))
From the logs you provided one can see that IDirectDraw2_GetAvailableVidMem()
returns 0xc0000000 on your "Win8.1 64bit 16GB RAM, GTX970 4GB VRAM ver361.43" for DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM. So it seems that this is the same crash as on Wine.
The only way to run it on Win8.1 is through second workaround, i.e. run in windowed mode: "C:\DiabloII\Diablo II.exe" -w (not tested on Wine).
This workaround works on Wine as well.
The amount of video memory returned by GetAvailableVidMem() could be potentially limited to INT_MAX. However, this is not how native ddraw works so I doubt such change would be accepted in Wine.
https://bugs.winehq.org/show_bug.cgi?id=39878
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |joseph.kucia@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #17 from Wylda wylda@volny.cz --- (In reply to Józef Kucia from comment #16)
...However, this is not how native ddraw works so I doubt such change would be accepted in Wine.
I see you "Assigned To" yourself. What is your plan with this bug?
What i actualy tested is 64bit Win against 32bit wine. To be fair, i should run this testcase also on 32bit Win - idealy XP, which come from that era. Unfortunately nvidia does not produce drivers for 4GB 970 for 32bit WinXP.
So what about the idea at Comment #13 ?
https://bugs.winehq.org/show_bug.cgi?id=39878
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #53254|0 |1 is obsolete| |
--- Comment #18 from Józef Kucia joseph.kucia@gmail.com --- Created attachment 53597 --> https://bugs.winehq.org/attachment.cgi?id=53597 wined3d: Limit reported amount of video memory for older Windows versions.
(In reply to Wylda from comment #17)
I see you "Assigned To" yourself. What is your plan with this bug?
I've talked briefly about this bug with Henri. Generally, we could limit the reported amount of video memory for older Windows version. The attached patch allows Diablo II to run when Windows version is set to Windows XP.
https://bugs.winehq.org/show_bug.cgi?id=39878
--- Comment #19 from Wylda wylda@volny.cz --- Patch works perfectly on wine-1.9.3. Thank you Józef and Henri!
https://bugs.winehq.org/show_bug.cgi?id=39878
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |565a5715468fa990cf9e7cbfe38 | |ac59ddcde1e76 Status|NEW |RESOLVED Resolution|--- |FIXED Assignee|joseph.kucia@gmail.com |wine-bugs@winehq.org
--- Comment #20 from Józef Kucia joseph.kucia@gmail.com --- The patch was committed (http://source.winehq.org/git/wine.git/?a=commit;h=565a5715468fa990cf9e7cbfe3...).
https://bugs.winehq.org/show_bug.cgi?id=39878
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@redhat.com Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=39878
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #21 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.6.
https://bugs.winehq.org/show_bug.cgi?id=39878
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #22 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.2.