Description
When a Lua runtime error happens in a script, OvEditor crashes instead of safely reporting the script error.
In this case, Lua raises:
.../Assets/Scripts/Utils/Class.lua:13: bad argument #1 to 'rawget' (table expected, got nil)
Then OvEditor throws an unhandled C++ sol::error exception and exits.
To Reproduce
Steps to reproduce the behavior:
- Add/use the provided Lua script in
Assets/Scripts/Utils/Class.lua (with return rawget(Class, sKey) in __index).
- Open the project in OvEditor.
- Trigger the script path that accesses
__index on a missing key.
- See the Lua error, then an unhandled
sol::error exception crash in OvEditor.exe.
Expected behavior
A Lua runtime error should not crash the editor.
OvEditor should catch sol::error, log a clear Lua error (file, line, message, stack), stop/ignore only the faulty script execution, and keep the editor running.
Screenshots
N/A
Description
When a Lua runtime error happens in a script, OvEditor crashes instead of safely reporting the script error.
In this case, Lua raises:
.../Assets/Scripts/Utils/Class.lua:13: bad argument #1 to 'rawget' (table expected, got nil)Then OvEditor throws an unhandled C++
sol::errorexception and exits.To Reproduce
Steps to reproduce the behavior:
Assets/Scripts/Utils/Class.lua(withreturn rawget(Class, sKey)in__index).__indexon a missing key.sol::errorexception crash inOvEditor.exe.Expected behavior
A Lua runtime error should not crash the editor.
OvEditor should catch
sol::error, log a clear Lua error (file, line, message, stack), stop/ignore only the faulty script execution, and keep the editor running.Screenshots
N/A