lua-users home
lua-l archive

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

> Yes, I understand, but we are not nesting that deep. I made a release that
> logs the nCcalls variable and it slowly increases from a max of 10 to a max
> of 200 during one week. The error typically occurs when running the parser,
> thus the error I get is: the-script-name:1: too many syntax levels (limit is
> 200) in main function near 'k'
> Though I have also had the "C stack overflow" error message. I think it is
> just related to that the nCcalls increment/decrement is for some reason not
> balanced in our system and the error triggers at various check positions in
> Lua. In other words, when the event triggers, a coroutine is created, and
> the script is run, the nCcalls variable is already at its maximum.

Of course it may be a bug in Lua, but the code around 'nCcalls' is not
too complex. Can you try to log the C stack together with the nCcalls
variable (e.g., by capturing the address of a local variable) to check
whether the C stack is also slowly increasing?

(BTW, are you using the new lua_callk or similar functions?)

-- Roberto