Modifying line trace params causes P.I.E. crash

I’m trying to implement a line trace (-Z) from the player pawn, all is going well bar the line trace hitting the pawn itself. After doing a bit of searching I came across jayice’s answer on this question, a solution which to me made sense. However, trying to run the compiled code in New Editor Window (P.I.E) resulted in this crash, with the resulting log.

This caused some confusion as I wasn’t expecting such a negative result. Unable to quickly find an answer on the web I turned to coming up with an alternate solution. This was to offset the line trace’s origin, this too resulted in an error(). I’d assume a different one as I disabled the FCollisionQueryParams::AddIgnoredActor() modification I’d made. Log.

I’m at a loss as to why this is happening and would appreciate some in figuring this out. The code in question is below, with the commented parts being the two different methods I used to modify the starting location.

void ACube_Base::Tick(float DeltaTime) {

// ...

FVector StartLoc = Mesh->GetComponentLocation();
	//StartLoc.Z += -10.f;
	//StartLoc += FVector(0.f, 0.f, -10.f);
	FVector UpVector = Mesh->GetUpVector();
	FVector EndLoc = ((UpVector * -1000.f) + StartLoc);
	DrawDebugLine(GetWorld(), StartLoc, EndLoc, FColor::Red, false, 1, 0, 1);
	FHitResult Hit;
	FCollisionQueryParams CollisionParams;
	CollisionParams.AddIgnoredActor(this);

	if (GetWorld()->LineTraceSingleByChannel(Hit, StartLoc, EndLoc, ECC_Visibility, CollisionParams)) {
		if (Hit.bBlockingHit) {
			GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Yellow, CollisionParams.ToString());
			GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Yellow, StartLoc.ToString());
			GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Red, FString::Printf(TEXT("You are hitting: %s"), *Hit.GetActor()->GetName()));
			GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Red, FString::Printf(TEXT("Impact point: %s"), *Hit.ImpactPoint.ToString()));
			GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Red, FString::Printf(TEXT("Normal point: %s"), *Hit.ImpactNormal.ToString()));
		}
	}
}

If you want the full source for the class, just ask and I’ll chuck it up on Google Drive.