lua-users home
lua-l archive

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


Well, thankyou for the bug fix, Christian Vogler.

However, that did not fix my problem.

Im calling tolua_TestClass_open() from within a public non-static member function.

The debugger followed the program like this:::::::
TestClass::StartUp()   ->  
tolua_TestClass_open(LuaState *)   ->
tolua_open(lua_State *)    ->
toluaI_getregistry (lua_State* L, char* field)   ->
lua_getref (lua_State *L, int ref)

The debugger stops inside LUA in lua_getref() at the following point:
(marked with @@)
LUA_API int lua_getref (lua_State *L, int ref) {
  if (ref == LUA_REFNIL)
    ttype(L->top) = LUA_TNIL;
  else if (0 <= ref && ref < L->refSize &&
@@(L->refArray[ref].st == LOCK || L->refArray[ref].st == HOLD))
    *L->top = L->refArray[ref].o;
  else
    return 0;
  api_incr_top(L);
  return 1;
}


At this point, ref is 0 and the L->refArray[ref] is something like {...} (i guess it means empty).
However, L->refSize is 119539488. 

I hope it gives some kind of picture of my problem.

Tue Madsen