-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in luabridge::Stack<int>::get #289
Comments
This is not clearly stated in the documentation but Lua 5.3 and 5.4 are unsupported. |
I can reproduce the issue in my environment as well.
The return value of Unfortunately the issue can't be solved because the affected This issue applies to different Lua versions. I've explicitly checked Lua 5.2 and 5.4.
The issue can be solved with Lua 5.2+. There are the functions |
So I've checked the behavior. |
Please take a look at the #292. |
You can support integers across all lua versions, see https://github.com/kunitoki/LuaBridge3/blob/master/Source/LuaBridge/detail/LuaHelpers.h#L90 |
Stack::get cannot be safely called from C++ as it's raising lua_error (it calls the lua panic handler which will throw with exceptions on but will std::abort without exceptions, which is not acceptable). Because of that we would need to use a safe get method not calling lua_error but returning something like c++23 std::expected (which in turn can be handled to call lua_error only when invoked from lua). |
The type of the value at index -1 is double.
I'm using Lua v5.4.4 and LuaBridge v2.7.207 on Windows 10.
The text was updated successfully, but these errors were encountered: