lua-users home
lua-l archive

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


> You may try to modify your finalizers (__gc metamethods) and check
> whether any modifications affect this behaviour. 

Yes, I changed the finalizers to no-opts.  Still I get the extra item on the
stack. 

-Erik



-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Roberto
Ierusalimschy
Sent: Tuesday, October 21, 2008 5:32 AM
To: Lua list
Subject: Re: lua_newthread returning 2 values

> 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