Page MenuHomeFeedback Tracker

Access violation. Illegal read by 0x140bba89d at 0x0 when calling SCR_GetInUserAction::PerformAction on script-spawned vehicle
New, NormalPublic

Description

I have a simple setup using the CentralEconomy mod for spawners. I've set up some custom vehicle spawners for CE that were working perfectly fine prior to the most recent update, this video shows one of these spawned vehicles working fine the day prior to the update:
https://youtu.be/YjSoOBsXzsk?t=281

I don't think I made any changes to my mod in between it working and breaking. I recorded that video before going to bed, when I woke up I saw update was released, booted up WB and went to test things and ran into this getting into a vehicle:

Reason: Access violation. Illegal read by 0x140bba89d at 0x0


Class:      'SCR_GetInUserAction'
Function: 'PerformAction'
Stack trace:
Scripts/Game/UserActions/SCR_GetInUserAction.c:44 Function PerformAction
Scripts/Game/Interactions/SCR_InteractionHandlerComponent.c:232 Function DoProcessInteraction
Scripts/Game/Interactions/SCR_InteractionHandlerComponent.c:721 Function OnPostFrame

The line in question SCR_GetInUserAction.c:44 has a few calls to internal script/game/engine methods that can't be modded (GetInVehicle, GetRevelvantDoor) so I think this is a bug introduced in the latest update:

if (!compartmentAccess.GetInVehicle(pOwnerEntity, targetCompartment, false, GetRelevantDoorIndex(pUserEntity), ECloseDoorAfterActions.RETURN_TO_PREVIOUS_STATE, false))

If I change the teleport flag (3rd arg) to true it seems to fix the crash but then breaks other stuff like the enter animation and interior action contexts:

if (!compartmentAccess.GetInVehicle(pOwnerEntity, targetCompartment, true, GetRelevantDoorIndex(pUserEntity), ECloseDoorAfterActions.RETURN_TO_PREVIOUS_STATE, false))

If I spawn the same vehicle in through GM mode my character can enter and exit fine. It's just vehicles created via script seem to be breaking on GetInUserAction.

Happy to provide mdmp and a minimal repro case enfusion project via Discord

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Category
General
Steps To Reproduce
  1. Spawn a vehicle in via script (e.g. add a "VEHICLES" category and UAZ to loot table config of CentralEconomy mod, add a lootspawner prefab set to only spawn VEHICLES category)
  2. Try to get into the vehicle
Additional Information

Same setup working fine before latest update (WB publish fix) as per video

Event Timeline

wyqydsyq created this task.Fri, Feb 28, 7:15 PM