Skip to content

Prevent OvEditor crash on unhandled sol::error after Lua runtime errors#801

Merged
adriengivry merged 1 commit into
Overload-Technologies:mainfrom
Gopmyc:797
May 11, 2026
Merged

Prevent OvEditor crash on unhandled sol::error after Lua runtime errors#801
adriengivry merged 1 commit into
Overload-Technologies:mainfrom
Gopmyc:797

Conversation

@Gopmyc
Copy link
Copy Markdown
Contributor

@Gopmyc Gopmyc commented May 11, 2026

Description

This PR fixes a crash in OvEditor when a Lua runtime error triggers an unhandled sol::error during behaviour callback execution.

The Lua callback lookup/call path is now guarded to catch sol::error and log it instead of letting the exception propagate and terminate the editor.

Scope is intentionally minimal:

  • Updated only LuaScriptEngine.cpp
  • No API change
  • No legacy fallback introduced

Related Issue(s)

Fixes #797

Review Guidance

Please focus on ExecuteLuaFunction(...) in:
Sources/OvCore/src/OvCore/Scripting/Lua/LuaScriptEngine.cpp

What changed:

  • Wrapped Lua callback resolution/execution with a try/catch (const sol::error&)
  • Preserved existing logging behavior for invalid protected call results

Expected behavior after this change:

  • Lua runtime errors are logged
  • Faulty script execution is interrupted
  • OvEditor keeps running

Screenshots/GIFs

N/A

AI Usage Disclosure

N/A

Checklist

  • My code follows the project's code style guidelines
  • When applicable, I have commented my code, particularly in hard-to-understand areas
  • When applicable, I have updated the documentation accordingly
  • My changes don't generate new warnings or errors
  • I have reviewed and take responsibility for all code in this PR (including any AI-assisted contributions)

@adriengivry adriengivry merged commit 0fd102a into Overload-Technologies:main May 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants