lua-users home
lua-l archive

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



You can, but even if they run on different threads (L), they share the
same C stack. So, if you keep nesting the calls, you risk overflowing
the C stack, so Lua throws that error.


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.

-Will