-
Notifications
You must be signed in to change notification settings - Fork 829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warcraft III: staying in menus quickly gobs all system memory #1866
Comments
apitrace? Also, does the leak show up with Sounds like a really weird problem since there pretty much hasn't been any game with memory leaks, and Warcraft III is fairly old so I'd somehow expect people to have run into this before... |
I can't manage to make one. When trying the 64-bit release of apitrace, I'm getting:
and when trying with the 32-bit libraries, the program doesn't load. I'm left with that output that doesn't stop: The thing is that any executable shipped by Blizzard will lead to start Battle.Net and require the user to start the game from the Battle.Net app. The Battle.Net app is 32-bit while the Warcraft III reforged executable is 64-bit. Therefore, I think that I can't start the apitrace in that configuration. Actually, I have two choices for starting Warcraft III:
and
The first will launch Battle.Net directly. I will get the first message about using 32-bit apitrace if I'm using 64-bit and the program not loading when trying 32-bit. As for the second choice of executable, when trying to run with 64-bit, the program will start Battle.Net, but I don't see any trace written anywhere. Here is what I entered:
There is no file apitrace.log in any subdirectory. If you have any suggestion, I'm ready to follow your instructions.
No. It seems like it is the
The game is Warcraft III Reforged. It has been "remastered" recently in the last year. Addtional logsI have also found those logs: BlizzardBrowser_d3d11.log I think that BlizzardBrowser is the program that executes when running the game menu. It's a web based app that launches the game when you start an actual Warcraft game. |
You can just copy the correct d3d11.dll, dxgi.dll and dxgitrace.dll from apitrace next to the game's executable (correct architecture of course). If the problem isn't the game itself but rather the launcher, just setting DLL overrides for the launcher itself (d3d11 and dxgi to |
I managed to make spawn an |
@K0bin is it due to the fact that I did |
NVM. This file was not the right one. I doubted so I changed the file name and reran the program. The new file is 600MB. I'm uploading it right now to mega.nz. |
The file is here. |
You can launch the game directly, skipping Battle.net App, by going to
This will take you to the login screen inside the game (since login info is not provided by Battle.net App), where the memory leak can already be observed. For me with 16 GB of RAM it's a matter of 5-10 seconds before OOM killer is invoked.
It's neither the game nor the launcher, but I can confirm this workaround: setting d3d11 and dxgi to builtin just for BlizzardBrowser.exe makes the issue go away. Also I gathered an apitrace for BlizzardBrowser. It's with DXVK enabled, since with WineD3D I get an exception when launching the game. |
What was the trace recorded with? I'm just getting |
I followed the instructions in the Wiki, and copied the four dlls into I then launched Warcraft III.exe as described above. I got BlizzardBrowser.trace files (there are multiple BlizzardBrowser processes spawned when launching the game), and I also got apitrace logs in the Wine output, so I thought it had worked (I've never made an apitrace before). My system info:
|
can you open your own trace file with qapitrace? |
Nope, I get the same error as you. I'm not sure how/if I can get a useful trace. I see in the new issue template that for D3D11, instead of copying apitrace wrapper dlls, I should run Then, according to this comment, it should nevertheless be possible to use the "copy dlls" method; but no matter how I try to do this, I still get |
Can you explicit how you go about overriding the DLL just for EDIT: I tried doing the following: ln -s /usr/lib32/wine/d3d11.dll $BLIZZARDBROWSERDIR/d3d11.dll
ln -s /usr/lib32/wine/fakedlls/dxgi.dll $BLIZZARDBROWSERDIR/dxgi.dll but it didn't go around the issue. Memory was still leaking like before. |
I have the same issue. I enabled DXVK_HUD=memory and I don't see the game eating memory from HUD infos nor with "top" command. But, the GPU memory get filled very quickly. I set up the OoM Killer and it is not triggered. I suspect memory allocated on GPU and never released. That's why the OoM Killer does nothing. I have NVIDIA GTX 960. It seems not related to GPU driver as other reports issue on AMD. Hope it can help. |
Thanks, stanczew, the workaround seems to have worked for me. BlizzardBrowser still leaks memory a bit, but at such a slow pace that it's going to be unnoticeable in practice, since you aren't going to stay in the main menu for that long. |
This workaround is working for me as well. |
Workaround gives just a little extra time to start Campaign. It makes game navigable, but not really enjoyable.. just yet. |
hello, |
I made a mistake while overriding the DLLs didn't set the correct ones. And it does fix the leak the game doesn't freeze but i can't actually see anything for the game just renders a black screen and the ingame mouse cursor. EDIT: Managed to fix it by not overriding the dxgi dll, just the d3d11 and d3d9. |
Same issue, the workaround from above works. I could not get a useful trace on Windows 7 x64 either. Most of the 67MB trace are calls to "ID3D11Device1::CheckMultisampleQualityLevels" and then basically The End. I'm ready to provide the game files, I don't think it needs an account/installation for repro as you can access the main menu; or my account if the dev is willing to test. Detailed information:Warcraft 3 Reforged uses CEF/Chromium v69 for all the new menu parts. This includes: main menu, map loading screen, settings screen. The old game renderer was left untouched, I think it looks like this:
Note: the only place, where both renderers are "visible" and overlayed, is when you go to Menu>Options while in-game. Game's launch options The CEF renderer leaks ~1GiB of memory every time you hover over all 6 main menu buttons (see on the left behind htop window). Basically it leaks memory any time a menu element is re-rendered. You can get quite far with 32GB RAM and 8GB swap, but you'll freeze/OOM eventually. htop does not show an increase in res/virt memory for the BlizzardBrowser.exe process. This excessive garbage creation explains the low menu FPS too (buffer not reused?). For my tests the main menu background animation removed and not rendered (see "Allow Local Files", the video was replaced with an empty PS: Trying to execute apitrace the way it's meant to be prints: "error: failed to execute inject". Putting all three .dll's (d3d11.dll, dxgi.dll, dxgitrace.dll) prints: "error: unavailable function CreateDXGIFactory2" and exits the game process (this method was suggested above). Removing dxgi.dll floods a lot of "apitrace: warning: caught exception 0xc000001d", "0xc0000420", "0x80000003" etc. but produces no useful trace (only CheckMultisampleQualityLevels). I'm not sure how to do it right. [1]: See "Warcraft III/Patch 1.31.0" changelog |
I've tried the above workarounds (overriding d3d11 and dxgi in wine configuration) and I still have horrible memory leaks where even with 32gb ram I'll crash before entering a custom or a normal game. Anybody made some progress with this? |
@epatpol tried 1 week ago, same issue yes |
I have the same problem. I had the game running for more than a year, but recently deleted and reinstalled the game (nothing else in my system). I lost the config I had, but now I can't get it to not leak memory anymore. |
@Arnoldi Yea same for me, I tried setting older versions of wine or dxvk in lutris but it's always the same, as soon as I arrive in the menu my memory consumption ramps up so quickly I have to find a game within a minute or so. It's basically unplayable for me right now. I have no idea what the culprit is however, does it leak in Windows as well but maybe at a slower rate? I've seen wc3 streamers having to restart their wc3 every couple of hours because they say it ends up crashing if you let it running... |
I've had this too. A few observations:
It's definitively BlizzardBrowser eating VRAM, I would assume it's a bug in the texture sharing between libcef and warcraft too. The rate at which the VRAM fills is directly related to the resolution of the warcraft window. You can watch the VRAM being eaten live e.g. with On AMD you can
I don't know if it's a useful data point but setting d3d9/d3d11 to native didn't have any effect here. With wine lutris 7.2 I didn't get it to stop eating VR with many tries but with wine lutris 6.14 I did eventually. |
Played without any issues pretty much on release. Right now it memory leaks all the way to game freeze (vram and ram), none of the workarounds helped. Ubuntu 20.04 + Nvidia 470 |
Indeed a few months ago I could still play normally, right now I'm almost always getting memory leaks on menu and it fills up my 32 GB ram so quickly, none of the workarounds worked, tried different wine versions/settings, sometimes it does not leak on wined3d. Arch + Nvidia 510.60.02 |
Glad you got it working. If any of you find any new problems where you think dxvk is the cause then i encourage you to make a new issue. 🙂 |
@Blisto91 I download Wine-GE-Proton7-26 with lutris, and it still shows me a black screen. |
Do I need to set to Win 7 compat mode? I tried to set to Win7 compat mode, but battle net client can not opened. |
I don't own the game so i can't check for myself atm. Post dxvk logs if you can. When using Lutris you need to set "Output debugging info" to enabled under runner options. |
Okay, I need to do everything from scratch, will upload the log later. |
@Blisto91 It seems there is no log appear next to my .exe file. |
Even after enabling Output debugging info for the games runner? |
Yes, I have enabled Output debugging info in the games runner at the bottom of the window. |
In the lutris environment variables can you add |
Thank you for your tips, I will try it later. Now i am building wine-tkg from what @kolAflash suggested, and install dxvk 1.10.3 by winetricks. |
Roger. This should hopefully start working better out of the box when when more custom wine versions start including the work required. E.g lutris and bottles own wine. A separate thing to try would be to add it as a non steam game in steam and then force it through proton experimental. |
@Biswa96 I tried that yesterday, with proton experimental it still the same issue. |
Do you still have that setup? Launching that with |
@Blisto91 Do you mean the non-steam games with proton experimental setup? |
Ye |
No, I have removed it. |
k. I kinda forgot to ask. What is your gpu and drivers. |
Mesa Intel® Iris(R) Plus Graphics 640 (Kaby Lake GT3e) (KBL GT3) Ubuntu 22.04 with default GPU driver. |
Okay that could maybe be part of the cause. I don't have any experience myself with intel iGPU's but i think don't they have as well of a track record as amd and nvidia with dxvk. At least not the older ones. |
I just setup non-steam proton game, and here is the log by setting |
Again there is no need to post many times in a row. Just edit your first post. Anyway no i don't see anything interesting in your log in relation to dxvk. You could try turning off esync in lutris ui or steam ( |
@Blisto91 I finally make it work to run Warcaft III Reforged on Lutris with Thank you @Blisto91 for your help. :) |
Good to hear you managed to get it working 👍 and that it wasn't just your GPU that wouldn't work with it. |
@Blisto91 I checked the Wine-GE github repo, they have a GPU list which they support, and my Intel GPU is in the list, so I just try some different settings, and it works fine. It's not my GPU issue. |
Good to hear. I know almost nothing about intel GPUs hehe |
https://github.com/lutris/docs/blob/master/InstallingDrivers.md Yeah, In this page, it mentioned that I prefer to switch to classic graphic in Warcraft III Reforeged, I can get full stable 60fps, but i would not like to try Reforged graphic, which is too hard for my GPU to get good performance, and I also prefer classic graphics, so that's good for me. |
I'm not sure if this is a dxvk issue or wlroots/wayland issue but anytime I try to run wc3 in a wlroots window manager, I keep getting the following error over and over again and it just hangs at the loading screen. This happens when I set the blizzardbrowser.exe library overrides to wine instead of native
If I keep the overrides set to native, it will result in the following over and over again. Everything is working properly though in x window managers, but I would like to get this working in wayland if possible. Anyone have any thoughts? |
In a matter of at most 20 seconds of staying in the menus, dxvk will reserve all of my 32 GBs or RAM. Starting an game stops the leak though. But as soon as I get back in the menus after a game finishes, the memory leaks accumulate again.
Uninstalling dxvk will remove the memory leak problem and the same attempt at reproducing the issue is not successful. Therefore, dxvk must be leaking.
I did try and the same happens. The bug is not solved in
master
.Software information
The game is Warcraft III Reforged.
System information
Log files
Warcraft III_d3d11.log
Warcraft III_dxgi.log
wine.log
The text was updated successfully, but these errors were encountered: