EXCEPTION_ACCESS_VIOLATION

Game Crashes

I have a really hard time trying to understand the Crash Reporter but I do understand which line it doesn’t like. Here is the report:

Blaster.log (94.0 KB)
& this:

Error        LogWindows                === Critical error: ===
Error        LogWindows                Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000000003f0
Error        LogWindows                [Callstack] 0x00007ffbd970ced9 UnrealEditor-Blaster.dll!UCombatComponent::StartFireTimer() [C:\Users\rlifs\Desktop\Home\Unreal\Blaster\Source\Blaster\BlasterComponents\CombatComponent.cpp:226]
Error        LogWindows                [Callstack] 0x00007ffbd9706865 UnrealEditor-Blaster.dll!TBaseUObjectMethodDelegateInstance<0,ABlasterCharacter,void __cdecl(void),FDefaultDelegateUserPolicy>::Execute() [C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:594]
Error        LogWindows                [Callstack] 0x00007ffc4296be2f UnrealEditor-Engine.dll!FInputActionUnifiedDelegate::Execute() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Classes\Components\InputComponent.h:288]
Error        LogWindows                [Callstack] 0x00007ffc4299b743 UnrealEditor-Engine.dll!UPlayerInput::ProcessInputStack() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\UserInterface\PlayerInput.cpp:1419]
Error        LogWindows                [Callstack] 0x00007ffc42348268 UnrealEditor-Engine.dll!APlayerController::ProcessPlayerInput() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:2609]
Error        LogWindows                [Callstack] 0x00007ffc4235d4e5 UnrealEditor-Engine.dll!APlayerController::TickPlayerInput() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:4762]
Error        LogWindows                [Callstack] 0x00007ffc4234624d UnrealEditor-Engine.dll!APlayerController::PlayerTick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:2234]
Error        LogWindows                [Callstack] 0x00007ffc4235c680 UnrealEditor-Engine.dll!APlayerController::TickActor() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:4914]
Error        LogWindows                [Callstack] 0x00007ffc40d1ea96 UnrealEditor-Engine.dll!FActorTickFunction::ExecuteTick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:197]
Error        LogWindows                [Callstack] 0x00007ffc42835a0f UnrealEditor-Engine.dll!FTickFunctionTask::DoTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:284]
Error        LogWindows                [Callstack] 0x00007ffc4283ccf8 UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:975]
Error        LogWindows                [Callstack] 0x00007ffc44cd3a9d UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:753]
Error        LogWindows                [Callstack] 0x00007ffc44cd3f3e UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:642]
Error        LogWindows                [Callstack] 0x00007ffc44cdd6af UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:2169]
Error        LogWindows                [Callstack] 0x00007ffc42852f0a UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:565]
Error        LogWindows                [Callstack] 0x00007ffc428598b0 UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:1592]
Error        LogWindows                [Callstack] 0x00007ffc4189f08f UnrealEditor-Engine.dll!UWorld::RunTickGroup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:790]
Error        LogWindows                [Callstack] 0x00007ffc418a79c0 UnrealEditor-Engine.dll!UWorld::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1531]
Error        LogWindows                [Callstack] 0x00007ffbfd7fe5f5 UnrealEditor-UnrealEd.dll!UEditorEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1777]
Error        LogWindows                [Callstack] 0x00007ffbfe18aac6 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:474]
Error        LogWindows                [Callstack] 0x00007ff6ca6d82f6 UnrealEditor.exe!FEngineLoop::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5215]
Error        LogWindows                [Callstack] 0x00007ff6ca6f0d9c UnrealEditor.exe!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:183]
Error        LogWindows                [Callstack] 0x00007ff6ca6f0e8a UnrealEditor.exe!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:147]
Error        LogWindows                [Callstack] 0x00007ff6ca6f3c4d UnrealEditor.exe!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283]
Error        LogWindows                [Callstack] 0x00007ff6ca705564 UnrealEditor.exe!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:330]
Error        LogWindows                [Callstack] 0x00007ff6ca708736 UnrealEditor.exe!__scrt_common_main_seh() [d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
Error        LogWindows                [Callstack] 0x00007ffca225247d KERNEL32.DLL!UnknownFunction []
Error        LogWindows                [Callstack] 0x00007ffca36adfb8 ntdll.dll!UnknownFunction []

Here is the Function:

void UCombatComponent::StartFireTimer()
{
	if(EquippedWeapon == nullptr && Character == nullptr) return;
	Character->GetWorldTimerManager().SetTimer(FireTimer, this, &UCombatComponent::FireTimerFinished,  EquippedWeapon->FireDelay);
}

Whenever I try to reference my EquippedWeapon->FireDelay, I get this Access Violation error. I’m pretty sure that is the problem because when I just give the InRate as a Fixed number it runs fine. Like this:

void UCombatComponent::StartFireTimer()
{
	if(EquippedWeapon == nullptr && Character == nullptr) return;
	Character->GetWorldTimerManager().SetTimer(FireTimer, this, &UCombatComponent::FireTimerFinished, 0.15f);
}

Any ideas on what the issue could be?

Or even better, how I can figure out how to solve the crash report?

I am using Rider and UE5

Thank you in advance! :slight_smile:

Hey @lordrobin!

Even though I am a Mod I’ve never learned C++ - I’m a blueprints fan - but I know several other languages so I’m going to give this a shot.

What if you set the timer float variable onto your UCombatComponent (say, just FireTimer) through another function on weapon equip, then call the component’s FireTimer Float instead of trying to reference the equipped weapon? I daresay that might be better on performance as well, since it’s only referenced on weapon equip vs every fire.