When I pick up a an item within the game, the error is triggered at this function within another function.
(WorldInteractionComponent) this is use by the player character.
Code snippet: AActor* OwnerActor = GetOwner();
if(OwnerActor)
{
if(APawn* OwnerPawn = Cast<APawn>(OwnerActor))
{
// Debugging Information
UE_LOG(LogTemp, Warning, TEXT("OwnerActor: %s, OwnerPawn: %s"), *OwnerActor->GetName(), *OwnerPawn->GetName());
// Proceed with interaction check
CheckInteractionIsCharacterOrPawnValid(OwnerActor, OwnerPawn);
}
else
{
// Log a warning if the owner is not a pawn (optional)
UE_LOG(LogTemp, Warning, TEXT("OwnerActor is not a pawn in UWorldInteractionComponent::BeginInteract()"));
}
}
Access violation Error:
LoginId:6c7c80be42d2a4d7f7f8e98eea8354a2
EpicAccountId:0621a49edf2846c3afaf7f10975d70d6
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000000000000009c
UnrealEditor_DDS_Game!UWorldInteractionComponent::BeginInteract() [C:\Unreal Projects\DDS_Game\Source\DDS_Game\Private\Core\Character\Components\WorldInteractionComponent.cpp:141]
UnrealEditor_DDS_Game!TBaseUObjectMethodDelegateInstance<0,ADDS_PlayerCharacter,void __cdecl(void),FDefaultDelegateUserPolicy>::Execute() [C:\UE_5.3\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:650]
UnrealEditor_Engine!FInputActionUnifiedDelegate::Execute() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Classes\Components\InputComponent.h:288]
UnrealEditor_Engine!UPlayerInput::EvaluateInputDelegates() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\UserInterface\PlayerInput.cpp:1492]
UnrealEditor_EnhancedInput!UEnhancedPlayerInput::EvaluateInputDelegates() [D:\build++UE5\Sync\Engine\Plugins\EnhancedInput\Source\EnhancedInput\Private\EnhancedPlayerInput.cpp:735]
UnrealEditor_Engine!UPlayerInput::ProcessInputStack() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\UserInterface\PlayerInput.cpp:1125]
UnrealEditor_Engine!APlayerController::ProcessPlayerInput() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:2687]
UnrealEditor_Engine!APlayerController::TickPlayerInput() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:4966]
UnrealEditor_Engine!APlayerController::PlayerTick() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:2291]
UnrealEditor_Engine!APlayerController::TickActor() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:5123]
UnrealEditor_Engine!FActorTickFunction::ExecuteTick() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:251]
UnrealEditor_Engine!FTickFunctionTask::DoTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:278]
UnrealEditor_Engine!TGraphTask::ExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:1265]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:758]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:649]
UnrealEditor_Core!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:2125]
UnrealEditor_Engine!FTickTaskSequencer::ReleaseTickGroup() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:556]
UnrealEditor_Engine!FTickTaskManager::RunTickGroup() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:1583]
UnrealEditor_Engine!UWorld::RunTickGroup() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:771]
UnrealEditor_Engine!UWorld::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1515]
UnrealEditor_UnrealEd!UEditorEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1924]
UnrealEditor_UnrealEd!UUnrealEdEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:531]
UnrealEditor!FEngineLoop::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5825]
UnrealEditor!GuardedMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:188]
UnrealEditor!GuardedMainWrapper() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:118]
UnrealEditor!LaunchWindowsStartup() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:258]
UnrealEditor!WinMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:298]
UnrealEditor!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll