http://bugs.winehq.org/show_bug.cgi?id=32798
Bug #: 32798 Summary: Memory leak in Path of Exile Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: marceel@gmail.com Classification: Unclassified
Just logged in the game doing nothing and game is just taking up memory. The thing is on forums i found out that in wine 1.5.6 this isn't an issue and games works fine but in the latest git there is this big flaw.
USER CMD RSS VSZ m Client.exe 1119716 1990616
USER CMD RSS VSZ m Client.exe 1275720 1991640
USER CMD RSS VSZ m Client.exe 1362888 1991640
USER CMD RSS VSZ m Client.exe 1645432 2132952
USER CMD RSS VSZ m Client.exe 2059104 2550824
I don't know what should i attach to this report so if you have other question just ask
http://bugs.winehq.org/show_bug.cgi?id=32798
marceel marceel@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.pathofexile.com/ Platform|x86 |x86-64 Version|unspecified |1.5.22
http://bugs.winehq.org/show_bug.cgi?id=32798
--- Comment #1 from Henri Verbeet hverbeet@gmail.com 2013-01-24 07:44:59 CST --- That doesn't necessarily prove there's a memory leak, but if this is a regression your best option is probably to do a regression test.
http://bugs.winehq.org/show_bug.cgi?id=32798
--- Comment #2 from marceel marceel@gmail.com 2013-01-26 07:07:25 CST --- 2123f049d30cad9d79867999eb49f46211e0e23c is the first bad commit commit 2123f049d30cad9d79867999eb49f46211e0e23c Author: Aric Stewart aric@codeweavers.com Date: Mon Jul 16 07:23:42 2012 -0500
usp10: Change OpenType_GSUB_GetFontLangaugeTags to OpenType_GetFontLanguageTags and load languages from GPOS table as well.
:040000 040000 ae3e5fd43a7495101bba553b8227e5ae3f0af410 598a4cd9630b0430cb3fa296f9a1c3d69245db09 M dlls
http://bugs.winehq.org/show_bug.cgi?id=32798
marceel marceel@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aric@codeweavers.com
http://bugs.winehq.org/show_bug.cgi?id=32798
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Regression SHA1| |2123f049d30cad9d79867999eb4 | |9f46211e0e23c
http://bugs.winehq.org/show_bug.cgi?id=32798
Wojciech Pyczak nissarin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nissarin@gmail.com
--- Comment #3 from Wojciech Pyczak nissarin@gmail.com 2013-01-26 20:52:39 CST --- No, there is a memory leak somewhere, you can confirm it by looking at PoE forum where a lot of people encountered this problem.
Anyway, since marceel narrowed it down to this commit I poked it a bit, first of all here [1] is a log from game client with "WINEDEBUG=trace+uniscribe", it's over 400MB unpacked (you've been warned..), basically I started the game (takes some time on wine) and keep it open (at login screen) for a few seconds, probably not more than one minute total. You can see a lot of those:
trace:uniscribe:GPOS_expand_language_cache Deflang 0x2c8e278e, LangCount 0
I can only guess - I've no idea how wine internals work - that calling HeapAlloc with 0 size is the source of the leak, so I put simple check in GPOS_expand_language_cache function which will cause return if count is 0 and I think it works. At least after several minutes of gameplay (servers seems to be overloaded so I keep getting disconnected all the time) I didn't notice any increasing memory usage.
As a side note, perhaps _initialize_language_cache should use separate variable to store it's state in case situation like this, i.e. language_count = 0, occurs in the future.
[1] http://www.sendspace.com/file/o49fc3
http://bugs.winehq.org/show_bug.cgi?id=32798
--- Comment #4 from Wojciech Pyczak nissarin@gmail.com 2013-01-27 08:48:59 CST --- Created attachment 43361 --> http://bugs.winehq.org/attachment.cgi?id=43361 Proof of concept patch
I've added state variables to every "cache" just for the sake of symmetry, not sure if this is really necessary.
http://bugs.winehq.org/show_bug.cgi?id=32798
--- Comment #5 from Aric Stewart aric@codeweavers.com 2013-01-28 08:18:52 CST --- (In reply to comment #4)
Created attachment 43361 [details] Proof of concept patch
I've added state variables to every "cache" just for the sake of symmetry, not sure if this is really necessary.
Hi,
Thanks for looking into this. I think that checking for a zero count is the correct way to do this. As for adding the _initialized flag, I can take or leave that as a concept but I do not think your patch puts it in the right place. I think we would want it to have 2 values, one for when GSUB gets intitialized and then after the cache gets expanded with GPOS. and it should get checked and set right at the top of each function.
Thanks again, -aric
http://bugs.winehq.org/show_bug.cgi?id=32798
Vidar Haarr vhaarr+wine@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |vhaarr+wine@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=32798
julusp@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |julusp@gmail.com
--- Comment #6 from julusp@gmail.com 2013-01-29 13:13:20 CST --- Confirming the same bisect result on OSX.
http://bugs.winehq.org/show_bug.cgi?id=32798
P Rittner jedimasterpedro@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jedimasterpedro@hotmail.com
http://bugs.winehq.org/show_bug.cgi?id=32798
--- Comment #7 from Aric Stewart aric@codeweavers.com 2013-02-07 07:45:03 CST --- Just checking,
Wojciech are you planning to clean up that patch and submit it? Or do you want me to do that?
-aric
http://bugs.winehq.org/show_bug.cgi?id=32798
Olive sacolpa@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sacolpa@hotmail.com
--- Comment #8 from Olive sacolpa@hotmail.com 2013-02-07 12:59:23 CST --- hi,
please , note that there are no more memory leak with wine 1.5.23 and usp10 (Uniscribe 1.325) installed with winetricks.
http://bugs.winehq.org/show_bug.cgi?id=32798
--- Comment #9 from Wojciech Pyczak nissarin@gmail.com 2013-02-08 04:17:23 CST --- @Aric
I think it will be a lot faster if someone who actually know (wrote) the code and know how it works fixed it, so I'm counting on you :)
http://bugs.winehq.org/show_bug.cgi?id=32798
--- Comment #10 from Aric Stewart aric@codeweavers.com 2013-02-08 14:29:33 CST --- (In reply to comment #9)
@Aric
I think it will be a lot faster if someone who actually know (wrote) the code and know how it works fixed it, so I'm counting on you :)
Ok a patch has been committed that should resolve this issue.
-aric
http://bugs.winehq.org/show_bug.cgi?id=32798
Marcel Stranak marceel@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #11 from Marcel Stranak marceel@gmail.com 2013-02-20 15:52:15 CST --- fixed in 1.5.24
http://bugs.winehq.org/show_bug.cgi?id=32798
--- Comment #12 from Alexandre Julliard julliard@winehq.org 2013-03-01 14:50:48 CST --- Closing bugs fixed in 1.5.25.
http://bugs.winehq.org/show_bug.cgi?id=32798
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org 2013-03-01 15:10:03 CST --- Really closing bugs fixed in 1.5.25.
https://bugs.winehq.org/show_bug.cgi?id=32798
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |237ed21737de24fb7f0a508eb87 | |b3c7937164258 CC| |focht@gmx.net Component|-unknown |usp10
https://bugs.winehq.org/show_bug.cgi?id=32798
Fincer fincer89@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fincer89@hotmail.com
--- Comment #14 from Fincer fincer89@hotmail.com --- Memory leak issues are present again with the newest Path of Exile (3.0) & Wine 2.18 Staging.
I played the game yesterday and finally got an OUTOFMEMORY pop-up error while loading a new area in the game.
Before the error message appeared, some contents got glitched: minimap rendering disappeared, texture artefacts, struttering etc.
I think this bug should be reopened.
Using
Arch Linux x86_64 Nvidia GTX 760M (drivers: 384.59) 64-bit prefix without overrides
Using DX9 mode (in-game).