This is the relevant part of my code:
FVector TempVector = (Start + FVector(Dir.Vector() * ( Range + Width) ));
FRotator TempRot = Dir;
TempRot.Pitch -= 90;
UWorld* const World = GetWorld();
TArray<struct FOverlapResult> TempOverlaps;
if (World)
{
static FName NAME_LineOfSight = FName(TEXT("LineOfSight"));
FCollisionQueryParams QueryParams(NAME_LineOfSight, true);
QueryParams.AddIgnoredActor(Caster);
--->World->OverlapMultiByChannel(TempOverlaps, Start, FQuat(TempRot), ECollisionChannel::ECC_WorldDynamic, FCollisionShape::MakeCapsule(Width, Range), QueryParams);
}
This is the Callstack after World->OverlapMultiByChannel() is called:
UE4Editor_Engine!FPxQueryFilterCallback::preFilter() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\collision\physxcollision.cpp:618]
PhysX3PROFILE_x64
PhysX3PROFILE_x64
PhysX3PROFILE_x64
PhysX3PROFILE_x64
PhysX3PROFILE_x64
UE4Editor_Engine!GeomOverlapMultiImp_PhysX<0>() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\collision\physxcollision.cpp:1610]
UE4Editor_Engine!GeomOverlapMultiImp<0>() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\collision\physxcollision.cpp:1717]
UE4Editor_Engine!UWorld::OverlapMultiByChannel() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\collision\worldcollision.cpp:199]
Error code:
Exception was "Access violation - code c0000005 (first/second chance not available)"
Source line in physxcollision.cpp the error is pointing to:
617 ***** PxFilterData ShapeFilter = shape->getQueryFilterData();
I do not recall ever getting this error until yesterday.
The only change I made to my relevant code doesn’t occur until after World->OverlapMultiByChannel() is called.
The crash does not occur often, but in all cases(so far) one AI was firing projectiles at another AI that was returning fire with a beam(the beam uses OverlapMultiByChannel() function to determine potentially struck actors).
Any information on this crash and how it is related to the “shape”, would be helpful and much appreciated.