[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua 5.1.1 dll:s
- From: "Anders Backman" <andersb@...>
- Date: Tue, 29 Aug 2006 09:35:15 +0200
Hi all.
Im using Lua 5.1.1 (together with tolua++1.0.94) under WindowsXP (.NET 2003)
I have been using earlier versions (up to Lua5.0) for years with no
problems.
Now when I updated to Lua 5.1.1 (and 1.0.94 of tolua) I started getting into
trouble.
First, I have several dynamic libraries (.dll:s) that are loaded during
runtime as plugins.
These plugins uses one common LuaState, so there is only one global
LuaState, initialized once.
Earlier versions of Lua was compiled into a static library and was linked
into all runtimes and libraries. This worked just fine.
Problem:
Now with the new versions of Lua and Tolua this stopped working effectively.
I got all kinds of strange memory problems during loading of the dynamic
libraries that used the global luastate.
After quite a while of debugging with no clear result! I decided to compile
and link lua into a shared library (dll), then I got some problems with
linking of luac, It later turned out that I had to include all source files
into the luac project to get it to link correctly.
Ok, so after I had a lua51.dll most of the problems with the runtime errors
were gone.
Except for one, I commonly get a crash when calling tolua_pushusertype() (It
can be called during a tolua.cast), now this could of course be a strictly
tolua++ related problem, if so, then ignore this posting.
But I still wanted to see if there is anyone else with similar problems
regardin static/dynamic libraries when upgrading from lua5.0 and some
earlier tolua++ versions.
The callstack during the crash in tolua_pushusertype is:
luad.dll!luaH_getstr(Table * t=0x00000000, TString * key=0x01299148) Line
456 + 0x3 C
luad.dll!luaH_get(Table * t=0x00000000, const lua_TValue *key=0x01291738)
Line 472 + 0xf C
luad.dll!lua_rawget(lua_State * L=0x012914e0, int idx=-2) Line 558+ 0x15
C
osg_luaplugind.dll!_tolua_pushusertype() Line 59 + 0xb
Cheers,
Anders
________________________________________________________________
Anders Backman Email: andersb@cs.umu.se
HPC2N/VRlab Phone: +46 (0)90-786 9936
Umea university Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax: +46 90-786 6126
http://www.cs.umu.se/~andersb
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.6/428 - Release Date: 2006-08-25