lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Can some tell my why the following crashes my program with a page fault error please, when I uncomment 'number="475";' in the example below?

This is my C code, "LuaMemBlockPtr", contains the file 475_run.lua shown below, every thing in this line is set correctly such as the size et.al.:


status = lua_dobuffer( Lua, LuaMemBlockPtr, lua_size, module_name );


-- This is the file 475_run.lua
config_file="475_cfg.lua";
dofile( config_file );


-- This is the file 475_cfg.lua
x=1;
-- number="475";


I'm using BCC551 as the compiler and have built the Lua library with this
compiler.  I've run this for several weeks, but this is the first time
I've tried to use dofile to start up other Lua code.

I'm using Lua 4.0.

Just speculation on my part but I can't do a 'dofile' from inside
a 'lua_dobuffer' because there is no memory allocated for the 'dofile',
maybe?