Tracing bug/Error Bug?

Hi so in my code i have a verify function that recalls itself to fill a detection meter. Every-time the function recalls itself and successfully hits the player it adds another point and updates the HUD to display that for the pawn currently seeing you to build aggro. The problem being is i cannot figure out why sometimes it will justbe completely fine and other times break randomly. Heres all the code related i believe its a bug or engine fault since when logging the value Location inside FHitResult will return 0,0,0 when it breaks on the trace function. Yet all i did was send the Player Location as the end point and the player never moves ive tried it with and without a weapon theres no difference

Heres one Gyazo GIF where it works perfectly and another where it just randomly breaks. With the logs attached with them.

It Breaking - in the logs you’ll see that Orange Line is drawing to 0,0,0 ( I dont understand how the GetActorLocation of the player can be causing it to go to 0,0,0 randomly one second and the next fix. And if i place the same timer that loops the function when it fails to try again and again till it fills to 100 sometimes it will fail 2-5 times other-times it will fail for a few seconds which accounts for 20-40 checks sometimes its VERY confusing )

A random time it works

AIController_Base Class

Log excerpt of when it fails

LogTemp:Warning: HitActor == SeenPlayer 57
LogTemp:Warning: VerifingPlayer->GetActorLocation() Success X=-1080.631 Y=760.188 Z=102.150
LogTemp:Warning: VerifyLevel Check is equal to 57
LogTemp:Warning: HitActor == SeenPlayer 58
LogTemp:Warning: VerifingPlayer->GetActorLocation() Success X=-1080.631 Y=760.188 Z=102.150
LogTemp:Warning: VerifyLevel Check is equal to 58
LogTemp:Warning: HitActor == SeenPlayer 59
LogTemp:Warning: VerifingPlayer->GetActorLocation() Success X=-1080.631 Y=760.188 Z=102.150
LogTemp:Warning: VerifyLevel Check is equal to 59
LogTemp:Warning: VerifingPlayer->GetActorLocation() Failed X=-1080.631 Y=760.188 Z=102.150
LogClass:Warning: Hit Nothing

void AAIController_Base::VerifyEnemy()
{
	AGameState_SP* GameState = Cast<AGameState_SP>(UGameplayStatics::GetGameState(GetWorld()));
	if (SeenPlayer)
	{
		ANPC_Base* NPC = Instigator ? Cast<ANPC_Base>(Instigator) : NULL;
		UE_LOG(LogTemp, Warning, TEXT("VerifyLevel Check is equal to %d"), VerifyLevel);
		if (VerifyLevel == 0)
		{
			UE_LOG(LogTemp, Warning, TEXT("VerifyLevel"));
			const float VerifyDistance = (SeenPlayer->GetActorLocation() - NPC->GetActorLocation()).Size();
			if (VerifyDistance < 2000)
			{
				UE_LOG(LogTemp, Warning, TEXT("VerifyLevel1"));
				VerifyEnemyLoopVerifyTime = 0.02;
				UE_LOG(LogTemp, Warning, TEXT("VerifyTime Amount is equal to %f"), VerifyEnemyLoopVerifyTime);
			}
			else if (VerifyDistance < 2500)
			{
				UE_LOG(LogTemp, Warning, TEXT("VerifyLevel2"));
				VerifyEnemyLoopVerifyTime = 0.025;
				UE_LOG(LogTemp, Warning, TEXT("VerifyTime Amount is equal to %f"), VerifyEnemyLoopVerifyTime);
			}
			else if (VerifyDistance < 3000)
			{
				UE_LOG(LogTemp, Warning, TEXT("VerifyLevel3"));
				VerifyEnemyLoopVerifyTime = 0.03;
				UE_LOG(LogTemp, Warning, TEXT("VerifyTime Amount is equal to %f"), VerifyEnemyLoopVerifyTime);
			}
			else if (VerifyDistance < 3500)
			{
				UE_LOG(LogTemp, Warning, TEXT("VerifyLeve4"));
				VerifyEnemyLoopVerifyTime =0.035;
				UE_LOG(LogTemp, Warning, TEXT("VerifyTime Amount is equal to %f"), VerifyEnemyLoopVerifyTime);
			}
			UE_LOG(LogTemp, Warning, TEXT("VerifyTime Amount is equal to %f"), VerifyEnemyLoopVerifyTime);
		//	UE_LOG(LogTemp, Warning, TEXT("VerifyDistance is equal to %f"), VerifyDistance);
			//VerifyTime = 0.1;
			

			bIsSuspicious = true;
			bInvestigateWasSight = true;
			CurrentState = ControllerMode::InvestigateSight;
			BisVerfiyingPawn = true;
			ClearFocus(0);
			ClearFocus(1);
			ClearFocus(2);
			SetFocus(SeenPlayer, 2);
			VerifingPlayer = SeenPlayer;
			AI_DetermineStateSuspicious();
		}
		if (VerifyLevel < 100)
		{
			//DrawDebugLine(GetWorld(), NPC->GetTraceEyeLocation(), SeenPlayer->GetActorLocation(), FColor::Emerald, false, 20);
			RelaytoUpdateViewingDirection();
			UpdateFocus(VerifingPlayer->GetActorLocation(), 0, true);
			if (!bIsSuspicious)
			{
				bIsSuspicious = true;
				bInvestigateWasSight = true;
				CurrentState = ControllerMode::InvestigateSight;
				AI_DetermineStateSuspicious();
			}
			//The trace data is stored here
			FHitResult HitData(ForceInit);

			if (APublicAccess::TraceComponent(VerifingPlayer->GetMesh(), NPC->GetTraceEyeLocation(), VerifingPlayer->GetActorLocation(), HitData))
			{
				VerifyLevel++;
				//GameState->LastSeenPlayerLocation = SeenPlayer->GetActorLocation();
				UE_LOG(LogTemp, Warning, TEXT("HitActor == SeenPlayer %d"), VerifyLevel);
				UE_LOG(LogTemp, Warning, TEXT("VerifingPlayer->GetActorLocation() Success %s"), *VerifingPlayer->GetActorLocation().ToString());
				//UE_LOG(LogTemp, Warning, TEXT("VerifyTime Amount is equal to %f"), VerifyTime);
				DrawDebugLine(GetWorld(), NPC->GetTraceEyeLocation(), HitData.Location, FColor::Red, false, 20);
				GetWorldTimerManager().SetTimer(TimerHandle_VerifyEnemyLoop, this, &AAIController_Base::VerifyEnemy, VerifyEnemyLoopVerifyTime, false);
			}
			else
			{
				UE_LOG(LogTemp, Warning, TEXT("VerifingPlayer->GetActorLocation() Failed  %s"), *VerifingPlayer->GetActorLocation().ToString());
				DrawDebugLine(GetWorld(), NPC->GetTraceEyeLocation(), HitData.Location, FColor::Orange, false, 20);
				UE_LOG(LogClass, Warning, TEXT("Hit Nothing"));
			}
		}
		else if (VerifyLevel == 100)
		{
			UE_LOG(LogClass, Warning, TEXT("VerifyLevel == 100 Start"));
			if (GameState->ReturnTeamEnemyArray(NPC).Num() == 0)
			{
				FTeamVerifiedEnemies Plugin;
				Plugin.EnemyActor = SeenPlayer;
				Plugin.LastSeenLocationofActor = SeenPlayer->GetActorLocation();
				GameState->UpdateEnemies(NPC->TeamIndex,true, Plugin);
				//GameState->ReturnTeamEnemyArray(NPC).Add(Plugin);
				//GameState->Team1Enemies.Add(Plugin);
				//GameState->Team1Enemies.AddUnique(Plugin);
				UE_LOG(LogClass, Warning, TEXT("GameState->ReturnTeamEnemyArray(NPC).Num() == 0"));

			}
			else
			{
				// Verify im not in the array already! Add if needed
				int FoundIndex = false;
				bool BShouldAdd = true;
				for (int index = 0; index < GameState->ReturnTeamEnemyArray(NPC).Num(); index++)
				{
					AdarkstormCharacter* Enemytestq = Cast<AdarkstormCharacter>(GameState->ReturnTeamEnemyArray(NPC)[index].EnemyActor);
					if (Enemytestq)
					{
						if (Enemytestq == SeenPlayer)
						{
							BShouldAdd = false;
							FoundIndex = index;
							UE_LOG(LogClass, Warning, TEXT("is in array"));
							break;
						}
					}

				}

				if (BShouldAdd)
				{
					// Add the Actor to the array
					FTeamVerifiedEnemies Plugin;
					Plugin.EnemyActor = SeenPlayer;
					Plugin.LastSeenLocationofActor = SeenPlayer->GetActorLocation();
					GameState->UpdateEnemies(NPC->TeamIndex, true, Plugin);
					UE_LOG(LogClass, Warning, TEXT("adding"));

				}
				else
				{
					GameState->ReturnTeamEnemyArray(NPC)[FoundIndex].LastSeenLocationofActor = SeenPlayer->GetActorLocation();
					UE_LOG(LogClass, Warning, TEXT("update pos"));
				}

			}

			//UE_LOG(LogClass, Log, TEXT("Get Enemy  %s"), *GetEnemy()->GetName());
			GetWorldTimerManager().ClearTimer(ViewingDirectionTimerHandle);
			GetWorldTimerManager().ClearTimer(TimerHandle_VerifyEnemyLoop);

			ResetStateVars(13);
			BisVerfiyingPawn = false;

			AdarkstormCharacter_Player* Player = SeenPlayer ? Cast<AdarkstormCharacter_Player>(SeenPlayer) : NULL;
			if (Player)
			{
			//	GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Black, TEXT("BisVisibleDirectionEnemy 3"));
				for (int index = 0; index < Player->VerifyingPawnList.Num(); index++)
				{
					Player->VerifyingPawnList[index].VerifyTime = 100;
					//Player->VerifyingPawnList[index].
					//Player->VerifyingPawnList[index].VerifyTime = 100;
				}
				GetWorldTimerManager().SetTimer(ClearVerificationDelayTimerHandle, this, &AAIController_Base::ClearVerificationDelay, 0.5, false);

			/*	for (int index = 0; index < GameState->ReturnTeamEnemyArray(NPC).Num(); index++)
				{
					AdarkstormCharacter* Enemytestq = Cast<AdarkstormCharacter>(GameState->ReturnTeamEnemyArray(NPC)[index].EnemyActor);
					if (Enemytestq)
					{
						if (Enemytestq == SeenPlayer)
						{
							BShouldAdd = false;
							FoundIndex = index;
							UE_LOG(LogClass, Warning, TEXT("is in array"));
							break;
						}
					}

				}*/


			}

			NPC->ResetVision();

			GameState->VerifiedEnemy = true;
			bIsSuspicious = false;
			UE_LOG(LogClass, Warning, TEXT("Team1Enemies %d"), GameState->Team1Enemies.Num());
			UE_LOG(LogClass, Warning, TEXT("Team0Enemies %d"), GameState->Team0Enemies.Num());
			AI_DetermineStateTree();
		}
	}
	else
	{
		UE_LOG(LogClass, Warning, TEXT("Seen Player not valid my liege!"));
	}
}

Static Function in the Public Library i created

		static FORCEINLINE bool TraceComponent(
			UPrimitiveComponent* TheComp,
			const FVector& Start,
			const FVector& End,
			FHitResult& HitOut
		) {
			if (!TheComp) return false;
			if (!TheComp->IsValidLowLevel()) return false;
			//~~~~~~~~~~~~~~~~~~~~~

			FCollisionQueryParams TraceParams(FName(TEXT("Comp Trace")), true, NULL);
			TraceParams.bTraceComplex = true;
			//TraceParams.bTraceAsyncScene = true;
			TraceParams.bReturnPhysicalMaterial = false;

			//Ignore Actors
			//TraceParams.AddIgnoredActors(ActorsToIgnore);

			//Re-initialize hit info
			HitOut = FHitResult(ForceInit);

			return TheComp->LineTraceComponent(
				HitOut,
				Start,
				End,
				TraceParams
			);
		}