https://bugs.winehq.org/show_bug.cgi?id=50558
Bug ID: 50558 Summary: ntdll-Dealloc_Thread_Stack cause memory leak for C# game Product: Wine-staging Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: trufanovan@gmail.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
I've traced down a memory leak in one game to the ntdll-Dealloc_Thread_Stack in wine-staging. No other wine versions or staging patches cause such problem. I've reproduced it on actual wine master branch from github with `./staging/patchinstall.py ntdll-Dealloc_Thread_Stack`
The game is "Delta's Shadow" released in 2020. Demo is available at https://zxonline.net/game/deltas-shadow/ Its Windows version is written in C# with SDL. The memory leaks every time game plays SFX and only in this case. A music doesn't cause leak. I've asked the author: music is played via SDL and SFX is played with System.Media.SoundPlayer::Play(). It looks like this class is just calls PlaySound function from winmm.dll and pass a stream with WAV into it. And this somehow and ups in ntdll.
So, to reproduce the problem: 1. Install wine-staging 2. Install the demo 3. Launch game in wine-staging 4. Press ALt+Enter to switch the game into a windowed mode and launch Task manager to see the RAM it consumes. 5. Start pressing W and S keys (Up and Down) in game main menu to produce a menu item change SFX.
Result: Game RAM usage grows each time you press the key and don't decrease later.
Expected: No significant RAM usage change.
https://bugs.winehq.org/show_bug.cgi?id=50558
--- Comment #1 from Alexander Trufanov trufanovan@gmail.com --- The game consumes 150-250 Mb RAM. It's 32bit and will crash if leak ~3Gb of RAM..
https://bugs.winehq.org/show_bug.cgi?id=50558
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |e3cca687befffb4baee144dcd55 | |f01a3204176eb
--- Comment #2 from Zebediah Figura z.figura12@gmail.com --- The patch set has been removed in e3cca687befffb4baee144dcd55f01a3204176eb. Thanks for reporting.
https://bugs.winehq.org/show_bug.cgi?id=50558
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Zebediah Figura z.figura12@gmail.com --- Closing bugs fixed in wine-staging 6.11.