lua-users home
lua-l archive

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


Em qui., 3 de dez. de 2020 às 11:44, Vadim Peretokin <vperetokin@gmail.com> escreveu:
Hi all,

I have Lua 5.1.5 successfully embedded in 32bit Windows and 64bit macOS and Linux in Mudlet, and am attempting to make a 64bit build. Lua builds and runs fine, but has a chance to occasionally crash on lua_pcall.

I'm building with Mingw-w64 8.1.0 (MSVC is not an option), and the applications runs just fine in other environments. The arguments to pcall as pretty simple as well and not complicated: `lua_pcall(L, 2, LUA_MULTRET, 0);` 

Attached is a stacktrace I see, and code is here if it helps.

What could be the reason for this?
I am facing a similar situation with Lua 5.4.2.
The problem in my case, are locals with C callbacks.
The callback is alive, while the local is gone.
Then the crash occurs.

I'm trying to solve it with lua_ref, to try to keep the local alive.

regards,
Ranier Vilela