UEnhancedInputComponent::BindActionValue returns a reference to the action's value binding, and callers keep it to read the action's value later. The component stores its value bindings by value in a TArray:
Gameplay Cameras keeps these references:
Any later BindActionValue for another action on the same input component (Blueprint action value nodes, another camera node or rig, game code) can leave them dangling. The camera then reads garbage or another action's value. The nodes also keep using the old input component after the pawn gets a new one on possession.
How long it has existed: the TArray storage is from the first Enhanced Input release (CL 14009502, August 2020, UE 4.26), so a kept reference has been unsafe in every release. The camera code that keeps the references was added in July and August 2024 (CLs 34953109, 35646316, 43697178, 43700442) and ships in UE 5.5, 5.6, 5.7 and 5.8. Not a regression.
// Paste into any .cpp file of a game module that depends on "EnhancedInput" (for example the Third Person C++ template), // build, then run "Repro.EnhancedInput.ValueBindingReference" in the console. No content or input is needed. #include "EnhancedInputComponent.h" #include "HAL/IConsoleManager.h" #include "InputAction.h" #include "UObject/Package.h" static FAutoConsoleCommand GReproValueBindingReferenceCommand( TEXT("Repro.EnhancedInput.ValueBindingReference"), TEXT("Checks that the reference BindActionValue returns stays valid after more actions are bound."), FConsoleCommandDelegate::CreateLambda([]() { UEnhancedInputComponent* InputComponent = NewObject<UEnhancedInputComponent>(GetTransientPackage()); UInputAction* KeptAction = NewObject<UInputAction>(GetTransientPackage()); // Keep the binding, the same way the Gameplay Cameras input axis nodes do. const FEnhancedInputActionValueBinding* KeptBinding = &InputComponent->BindActionValue(KeptAction); // Bind more actions, as Blueprint action value nodes, other camera nodes and game code do at runtime. for (int32 Index = 0; Index < 64; ++Index) { InputComponent->BindActionValue(NewObject<UInputAction>(GetTransientPackage())); } // BindActionValue returns the existing binding for an action that is already bound. const bool bKeptBindingIsValid = (&InputComponent->BindActionValue(KeptAction) == KeptBinding); UE_LOGF(LogTemp, Display, "Repro.EnhancedInput.ValueBindingReference: %s", bKeptBindingIsValid ? "PASS, the kept binding is still valid" : "BUG, the kept binding points to freed memory"); }));
Expected result: the log shows Repro.EnhancedInput.ValueBindingReference: PASS, the kept binding is still valid.
Actual result: the log shows Repro.EnhancedInput.ValueBindingReference: BUG, the kept binding points to freed memory. Binding 64 more actions reallocated the value binding storage, so the reference that BindActionValue returned for the first action no longer points to its binding.
Notes:
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-413909 in the post.
| 0 |
| Component | UE - Gameplay - Gameplay Cameras |
|---|---|
| Target Fix | 6.0 early access |
| Fix Commit | 61166807 |
|---|
| Created | Nov 12, 2026 |
|---|---|
| Resolved | Nov 30, 2026 |
| Updated | Dec 4, 2026 |