[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Any common bug-inducting mistake going from 5.0 to 5.1alpha?
- From: Marco Pontello <marcopon@...>
- Date: Mon, 19 Sep 2005 22:25:56 +0200
I'm loosing some hairs with a problem with my DogLua plugin:
http://mark0.net/plugins-doglua-e.html
All worked well while I was using a Lua 5.0 Win32 DLL.
It's coded in PowerBASIC (witch as no problem interfacing with C, for
example), and I'm using a set of Lua include files and some
wrappers/helpers that I made and used in many other projects.
Then I read about the Lua 5.1 based LuaJIT, and so I modified a bit
the code to use that.
I have to say that the problems I'm seeing don't depend on LuaJIT,
because I get the same errors with the plain Lua 5.1.
What I basically do is:
- Create a New Lua State (with luaL_NewState(), standard memory allocator)
- Register some functions
- Run some Lua script with a LoadString + PCall
- Close the Lua State
One run goes well. The second also.
Then the app crash when the Lua_Close is called, with an access
violation writing to memory that doesn't belong to that process; or it
stall on the Lua_Close (app doesn't respond for some seconds, like if
it was garbage collecting), and then crash on the subsequent
luaL_NewState().
I have to say that, while I'm able to create the binary DLL starting
from the source package, or some trivial things, I'm no expert (by any
means) in C.
I'm almost sure that I'm doing something really stupid :), but I'm a
bit at loss at finding exactly what. So if anyone have gone trough
similar problems when going from 5.0 to 5.1 have some advise / insight
about what to check, I'm all ears.
Thanks,
Bye!
--
Online TrID File Identifier
http://mark0.net/onlinetrid/trid.aspx