Skip to content

OvEditor crash on unhandled sol::error after Lua runtime error #797

@Gopmyc

Description

@Gopmyc

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:

  1. Add/use the provided Lua script in Assets/Scripts/Utils/Class.lua (with return rawget(Class, sKey) in __index).
  2. Open the project in OvEditor.
  3. Trigger the script path that accesses __index on a missing key.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions