protonscr

[Fixed Upstream] memory leak in win32u / gdi

wineclosed
ValveSoftware/wine#180 · opened 2023-03-03 by w-flo · updated 2023-03-07 · 3 comments · github
1 matching comments, n / p to jump
Ww-flo 2023-03-03 github

Proton 7 suffers from a memory leak that was reported and fixed upstream in wine 7.19: https://bugs.winehq.org/show_bug.cgi?id=53645 The leak was a regression introduced around 6.19, I believe, so Proton <= 6 is probably unaffected. Memory is allocated using calloc() repeatedly, but then free'd using free_dc_attr(), which does not actually free it.

This leaks more than 10 gigabytes of memory in ZusiDisplay (part of "ZUSI 3 - Aerosoft Edition", steam game ID 1040731) after playing for 2 or 3 hours in some scenarios, leading to poor performance due to swapping.

I'm not sure about the plans for future Proton 8, which would fix this. If another Proton 7 release is planned, it would be nice to cherry-pick the one-liner fix: https://gitlab.winehq.org/wine/wine/-/commit/903c91fc60aa7f3da127ab81e2c27844eec9bcdd

Edit: For example, launching ZUSI\ 3\ -\ Aerosoft\ Edition/64bit/_Tools/ZusiDisplay/ZusiDisplay.64.exe -diagnose -displayType=ET422 -displayMode=MFD after installing dotnet framework 6.0.13 will trigger the leak. The dotnet installer is in _redist/dotNET/6.0 (I haven't tested with wine-mono.)

BBananaWorks07 2023-03-06 github

a temporary solution would be to use proton-tkg 7.19 or higher i guess

Iivyl 2023-03-06 github

The cherry-pick has been merged into experimental. It should show up in bleeding-edge soon and in the next release of experimental.

Ww-flo 2023-03-07 github

Thank you @ivyl, that was quick!

@Etaash-mathamsetty Yep, I've used Proton-Tkg 8.3 and it is indeed fixed in that build. Also building upstream wine gdiplus.dll and copying it into the correct Proton 7 lib dir works.

Upstream links

DLLs