You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon trying to call Lua.NewLib this exception happen: Note: It rarely works
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at KeraLua.NativeMethods.luaL_setfuncs(IntPtr, KeraLua.LuaRegister[], Int32)
at KeraLua.NativeMethods.luaL_setfuncs(IntPtr, KeraLua.LuaRegister[], Int32)
at KeraLua.Lua.SetFuncs(KeraLua.LuaRegister[], Int32)
at KeraLua.Lua.NewLib(KeraLua.LuaRegister[])
at TestLua.Program.OpenFoo(IntPtr)
at KeraLua.NativeMethods.luaL_requiref(IntPtr, System.String, IntPtr, Int32)
at KeraLua.NativeMethods.luaL_requiref(IntPtr, System.String, IntPtr, Int32)
at KeraLua.Lua.RequireF(System.String, KeraLua.LuaFunction, Boolean)
at TestLua.Program.Main()
Process finished with exit code -1,073,741,819.
KeraLua is quite low-level and doesn't add (or try not to) any intelligence, is just a 1:1 map of the original Lua API, so you would have to do exactly as you would do using the C API.
In any case I've added a unit test testing the newlib to avoid any regressions.
KeraLua Version: 1.2.9
.NET Core Version: netcoreapp3.1
Upon trying to call Lua.NewLib this exception happen:
Note: It rarely works
This is the code I used to reproduce the bug:
Tested with this Lua script:
The text was updated successfully, but these errors were encountered: