fredpiston84 / luaforwindows

Automatically exported from code.google.com/p/luaforwindows
0 stars 0 forks source link

LuaXML clib delivered with LuaForWindows causes memory leaks (LuaXML_lib.dll) #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I discovered memory leaks when using the LuaXML module delivered with 
LuaForWindows 5.1.4-40 (i think older versions are also affected). I tracked 
down the problem using depwalker: LuaXml_lib.dll is built using mingw and 
therefor is not linked against MSVCR80 SP1 as all other LuaForWindows binaries.

This causes troubles when the Lua garbage collector tries to collect memory 
allocated inside LuaXML_lib.dll: Lua can not deallocate memory allocated inside 
LuaXML_lib.dll because of the different C runtimes.

Solution:
Find a VS2005 SP1 solution attached to this issue. It contains a solution to 
build LuaXML against MSVCR80 SP1. You can also find the prebuilt DLL in the 
Release subfolder.

Installation:
Replace the file LuaXML_lib.dll in your LuaForWindows clib folder (usually 
"C:\Program Files\Lua\5.1\clibs") with the file found in the attached file. 
This solved the problem for me.

Perhaps the LuaForWindows maintainers include the fixed DLL in future releases.

Regards
Joerg

Original issue reported on code.google.com by joerg.bl...@gmail.com on 10 Jan 2011 at 4:11

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by rpusz...@gmail.com on 11 Jan 2011 at 1:22

GoogleCodeExporter commented 9 years ago
Added to the next release.

Original comment by rpusz...@gmail.com on 11 Jan 2011 at 1:23

GoogleCodeExporter commented 9 years ago
IMPORTANT:

The prebuilt binary LuaXML_lib.dll depends on the latest patched version of the 
VS2005 SP1 runtime DLLs. Make shure you have the vcredist_x86.exe available 
here 
<http://www.microsoft.com/downloads/en/details.aspx?familyid=766a6af7-ec73-40ff-
b072-9112bab119c2&displaylang=en#Overview> installed
(The title states its an update for the ATL runtime libraries only, but its 
actually a full version of the latest MSVC80 SP1 runtime)

@rpusztai:
Please make sure the version linked above is part of the next LuaForWindows 
setup version.

THANK YOU MICROSOFT!
Installing updates of the C libraries through windows update behind my back is 
what all we developers need to fill our boring days. Especially if it also 
changes runtime dependency DLL versions without any notice.

Original comment by joerg.bl...@gmail.com on 14 Jan 2011 at 2:53

Attachments: