Why can't i run this project in standalone game

Hey so i can not seem to run this project in standalone game or run it when it has been packaged, i can not seem to pin point on the logs where it is crashing, maybe someone can :slight_smile: here is the crash report

MachineId:34B1A85843D0FF3D1137C4A76338788A
EpicAccountId:06695cb065b64ad6a00a92103f3738b3

Access violation - code c0000005 (first/second chance not available)

“”

UE4Editor_MyProject!ABaseWeapon::getTarget() [c:\users\steven\documents\unreal projects\fightkillwin\source\myproject\baseweapon.cpp:394]
UE4Editor_MyProject!AMainHUD::DrawHUD() [c:\users\steven\documents\unreal projects\fightkillwin\source\myproject\mainhud.cpp:93]
UE4Editor_Engine!AHUD::PostRender() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\hud.cpp:141]
UE4Editor_Engine!UGameViewportClient::Draw() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\gameviewportclient.cpp:1135]
UE4Editor_Engine!FViewport::Draw() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\unrealclient.cpp:1001]
UE4Editor_Engine!FSceneViewport::ResizeViewport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\slate\sceneviewport.cpp:1058]
UE4Editor_Engine!FSceneViewport::ResizeFrame() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\slate\sceneviewport.cpp:999]
UE4Editor_Engine!UGameEngine::SwitchGameWindowToUseGameViewport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\gameengine.cpp:333]
UE4Editor_MoviePlayer!FDefaultGameMoviePlayer::WaitForMovieToFinish() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\movieplayer\private\defaultgamemovieplayer.cpp:292]
UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:2361]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

Can provide logs if needed

Hello zeronutty,

It seems like your “ABaseWeapon::getTarget()” function could be referring to a null value or something similar. You may want to try using an if check inside of the function before returning what it returns to make sure it is valid. Does this happen as soon as you launch the game or at a certain point? The logs would helpful as well if you could provide those please.

We haven’t heard from you in a while, zeronutty. Are you still experiencing this issue? I’d be interested to know if my last comment helped you. I’ll be marking this as resolved in the meantime for tracking purposes.

Hi
Yea sorry that was the error I was trying to access the weapon class before its was created, thanks for the help

Steven.