Description

Crash when ApplyPhysicalAnimationProfileBelow node and UPhysicalAnimationComponent :: UpdateTargetActors by UPhysicalAnimationComponent :: OnTeleport run in the same frame. Because RuntimeInstanceData is 0 even though DriveData is 1 or more. Therefore, user can avoid the problem by including the check process of RuntimeInstanceData in this code.

void UPhysicalAnimationComponent::UpdateTargetActors(ETeleportType TeleportType)
{
...

#if WITH_PHYSX
FPhysicsCommand::ExecuteWrite(SkeletalMeshComponent, [&]()
{
   TArray<FTransform> LocalTransforms = SkeletalMeshComponent->GetBoneSpaceTransforms();
   for (int32 DataIdx = 0; DataIdx < DriveData.Num(); ++DataIdx)
   {
      const FPhysicalAnimationData& PhysAnimData = DriveData[DataIdx];
      FPhysicalAnimationInstanceData& InstanceData = RuntimeInstanceData[DataIdx];

As far as I know, this only happens in multiplayer.
 

Steps to Reproduce
  1. Open attached repro proj
  2. PIE with dedicated server enabled
  3. Crash after a few seconds

 

Callstack
  1. [2020.04.08-10.36.06:673][470]LogWindows: Error: === Critical error: ===
  2. [2020.04.08-10.36.06:673][470]LogWindows: Error:
  3. [2020.04.08-10.36.06:673][470]LogWindows: Error: Fatal error!
  4. [2020.04.08-10.36.06:673][470]LogWindows: Error:
  5. [2020.04.08-10.36.06:673][470]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000008
  6. [2020.04.08-10.36.06:673][470]LogWindows: Error:
  7. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff6079445b7 Opal-Win64-Test.exe!operator<<() []
  8. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff6079575bf Opal-Win64-Test.exe!FPhysicsCommand_PhysX::ExecuteWrite() []
  9. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff60797062b Opal-Win64-Test.exe!UPhysicalAnimationComponent::UpdateTargetActors() []
  10. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff6079564d2 Opal-Win64-Test.exe!?ExecuteIfSafe@?$TBaseUObjectMethodDelegateInstance@$0A@VUPhysicalAnimationComponent@@$$A6AXXZ$$V@@UEBA_NXZ() []
  11. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff6074d304d Opal-Win64-Test.exe!USkeletalMeshComponent::MoveComponentImpl() []
  12. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff6074de2b0 Opal-Win64-Test.exe!USceneComponent::SetRelativeLocationAndRotation() []
  13. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff607468192 Opal-Win64-Test.exe!UCharacterMovementComponent::SmoothClientPosition_UpdateVisuals() []
  14. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff6074663c0 Opal-Win64-Test.exe!UCharacterMovementComponent::SmoothClientPosition() []
  15. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff607465eae Opal-Win64-Test.exe!UCharacterMovementComponent::SimulatedTick() []
  16. [2020.04.08-10.36.06:673][470]LogWindows: Error: [Callstack] 0x00007ff60746cfb8 Opal-Win64-Test.exe!UCharacterMovementComponent::TickComponent() []

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-92443 in the post.

4
Login to Vote

Fixed
ComponentUE - Simulation - Physics
Affects Versions4.244.25
Target Fix4.27
CreatedApr 24, 2020
ResolvedNov 19, 2020
UpdatedNov 23, 2020
View Jira Issue