Skip to content

Crash in OvEditor calling Scene:FindActorByName from Lua : access violation in sol (null userdata) #828

Description

@Gopmyc

Description

Calling Scene::FindActorByName from Lua causes OvEditor.exe to crash with an access violation in sol (stack_get_unqualified.hpp). Crash occurs when sol dereferences the internal userdata pointer (void* udata = *pudata), reading 0x00000000. The failure happens while resolving the bound Scene usertype when the Lua call is dispatched.

To Reproduce

Steps to reproduce the behavior:

  1. Launch OvEditor
  2. In Lua, execute: Debug.Log(tostring(Scene:FindActorByName("...")))
  3. The engine attempts to call the bound Scene member function.
  4. OvEditor.exe crashes with an access violation inside sol at Dependencies/sol/include/sol/stack_get_unqualified.hpp (dereference of userdata pointer).

Expected behavior

A stable call that returns either a valid Actor userdata or nil/string result; no native crash. If the Lua call is invalid (nil self or wrong call syntax), sol should return a clear error rather than dereferencing a null pointer.

Screenshots

N/A

Additional useful details (to include in the GitHub issue):

• Exception: 0xC0000005 (Access violation reading location 0x00000000)
• Fault site: solstackunqualified_getter<...>::get_no_lua_nil — line where void* udata = *pudata; is executed.
• Likely triggers: lua_touserdata(L, index) returned null (light userdata, nil, or wrong stack index); member call invoked without a valid 'self' userdata; mismatch between new_usertype registration and bound member functions; or userdata lifetime corruption.
• Immediate diagnostic steps: inspect Lua stack at the call (type_of(L,1), lua_touserdata(L,1)); confirm Lua callsite uses ':'; enable SOL_SAFE_USERTYPE to get safer error messages.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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