lua-users home
lua-l archive

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

> Occasionally lua_newthread is returning two values - rather than one - as it
> is supposed to do!
> [...]
> I?ve wondered if any side effects of my __gc metamethod could be the
> problem. The cleanup code in the __gc metamethod might possibly re-enter Lua
> somewhere, but I haven?t found evidence of this, yet.
> [...]
> Any suggestions on what might be happening?

You may try to modify your finalizers (__gc metamethods) and check
whether any modifications affect this behaviour. (E.g., remove some
calls to Lua, push or pop some other values in the stack, etc.)  This
may shed more light into the problem.

-- Roberto