lua-users home
lua-l archive

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


Hello,

I've been trying to add compatibility with Lua 5.4 to the open source game engine CorsixTH. My patch to date can be seen here:

https://github.com/TheCycoONE/CorsixTH/commit/e78df0eabb7253fa0b98e1dbbb49bf4a62329163

This version still works with 5.3 (and 5.2, 5.1, and LuaJIT 2) but with 5.4 I am getting:

C stack overflow
stack traceback:
        [C]: in function 'coroutine.yield'
        /home/stephen/corsixth/CorsixTH/Lua/app.lua:1011: in function </home/stephen/corsixth/CorsixTH/Lua/app.lua:1006>

Many other things don't seem to be functioning correctly either. It's admittedly a large code base, but I don't believe we are impacted by the other listed incompatibilities.

Debugging shows that the stack size is consistently the same size as the nres of lua_resume. The error always happens after 195 resume calls; regardless of whether those are events, frames, or timers.

I'm at a bit of a loss on how to debug the problem further, or where to look/why is the stack size growing in Lua 5.4 when it wasn't in earlier versions?