[Crash] Assertion Failed: PNewPose.IsValid() ___Never Happened in Beta

Dear Friends at Epic,

My game is periodically crashing due to an animation-related error.

This crash never used to happen in the Beta!

I only started noticing it post the first public UE4 release

#Context

I was just doing what I normally do in-game, jumping around, nothing special

#Why Beta is Relevant

My Animation Code and Montage playing has not changed at all since the Beta.

Therefore I am inclined to assume something changed on the Engine side of things that is causing this crash.

Additionally the crash is fairly random and inconsistent, and does not relate to anything I am doing in the C++

I’m just having the characters jumping around, and playing anim montages here and there, no fancy code involved :slight_smile:

Again this portion of my code has not changed at all since the Beta, when I never ever saw this crash

#Log

[2014.05.21-08.03.37:320][737]LogWindows:Error: appError called: Assertion failed: PNewPose.isValid() [File:E:\VictoryUE4\UnrealEngine-4.1\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodyInstance.cpp] [Line: 1503]

Stack:
FWindowsPlatformStackWalk::StackWalkAndDump() 0xe2a74356 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:177] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FDebug::AssertFailed() 0xe2912785 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\misc\outputdevice.cpp:176] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FBodyInstance::SetBodyTransform() 0xe10ef0ce + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\physicsengine\bodyinstance.cpp:1505] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkeletalMeshComponent::UpdateKinematicBonesToPhysics() 0xe11494bf + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\physicsengine\physanim.cpp:338] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkeletalMeshComponent::RefreshBoneTransforms() 0xe0a6e3ae + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\skeletalmeshcomponent.cpp:913] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkinnedMeshComponent::TickComponent() 0xe0ae0f9b + 6 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\skinnedmeshcomponent.cpp:320] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkeletalMeshComponent::TickComponent() 0xe0a77a0e + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\skeletalmeshcomponent.cpp:490] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
UActorComponent::ConditionalTickComponent() 0xdff4ee07 + 22 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\actorcomponent.cpp:830] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
FActorComponentTickFunction::ExecuteTick() 0xdff57774 + 18 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\actorcomponent.cpp:428] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
FTickTaskSequencer::FTickFunctionTask::DoTask() 0xe0b43366 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\ticktaskmanager.cpp:325] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
TGraphTask<FTickTaskSequencer::FTickFunctionTask>::ExecuteTask() 0xe0b48e4b + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\public\async\taskgraphinterfaces.h:661] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
FTaskThread::ProcessTasks() 0xe2805592 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\async\taskgraph.cpp:324] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FTaskThread::ProcessTasksUntilQuit() 0xe280574d + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\async\taskgraph.cpp:176] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FTaskGraphImplementation::WaitUntilTasksComplete() 0xe28165a7 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\async\taskgraph.cpp:856] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FTaskGraphInterface::WaitUntilTaskCompletes() 0xe0b681c9 + 17 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\public\async\taskgraphinterfaces.h:185] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
FTickTaskSequencer::ReleaseTickGroup() 0xe0b5b8c0 + 83 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\ticktaskmanager.cpp:185] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dl
[2014.05.21-08.03.37:321][737]LogWindows:Error: Windows GetLastError: The operation completed successfully. (0)
[2014.05.21-08.03.37:551][737]LogWindows: === Critical error: ===


[2014.05.21-08.03.37:551][737]LogWindows: Assertion failed: PNewPose.isValid() [File:E:\VictoryUE4\UnrealEngine-4.1\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodyInstance.cpp] [Line: 1503]

Stack:
FWindowsPlatformStackWalk::StackWalkAndDump() 0xe2a74356 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:177] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FDebug::AssertFailed() 0xe2912785 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\misc\outputdevice.cpp:176] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FBodyInstance::SetBodyTransform() 0xe10ef0ce + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\physicsengine\bodyinstance.cpp:1505] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkeletalMeshComponent::UpdateKinematicBonesToPhysics() 0xe11494bf + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\physicsengine\physanim.cpp:338] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkeletalMeshComponent::RefreshBoneTransforms() 0xe0a6e3ae + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\skeletalmeshcomponent.cpp:913] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkinnedMeshComponent::TickComponent() 0xe0ae0f9b + 6 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\skinnedmeshcomponent.cpp:320] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkeletalMeshComponent::TickComponent() 0xe0a77a0e + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\skeletalmeshcomponent.cpp:490] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
UActorComponent::ConditionalTickComponent() 0xdff4ee07 + 22 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\actorcomponent.cpp:830] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
FActorComponentTickFunction::ExecuteTick() 0xdff57774 + 18 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\actorcomponent.cpp:428] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
FTickTaskSequencer::FTickFunctionTask::DoTask() 0xe0b43366 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\ticktaskmanager.cpp:325] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
TGraphTask<FTickTaskSequencer::FTickFunctionTask>::ExecuteTask() 0xe0b48e4b + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\public\async\taskgraphinterfaces.h:661] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
FTaskThread::ProcessTasks() 0xe2805592 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\async\taskgraph.cpp:324] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FTaskThread::ProcessTasksUntilQuit() 0xe280574d + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\async\taskgraph.cpp:176] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FTaskGraphImplementation::WaitUntilTasksComplete() 0xe28165a7 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\async\taskgraph.cpp:856] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FTaskGraphInterface::WaitUntilTaskCompletes() 0xe0b681c9 + 17 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\public\async\taskgraphinterfaces.h:185] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
FTickTaskSequencer::ReleaseTickGroup() 0xe0b5b8c0 + 83 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\ticktaskmanager.cpp:185] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dl

Hi ,

The assert that you’re hitting is caused by the animation system trying to update the position of one of the bodies in the skeletal mesh. The assert is complaining that the transform coming in is invalid.

Unfortunately, there’s a number of reasons why this could happen and at this point it’s hard to determine who the culprit is. One way to help track this down would be to try and determine more info from your end. Is there any content that has changed since the beta that might be triggering this?

Are you able to isolate which skeletal mesh this is happening for? Is it always the same asset / animation?
If you manage to get a somewhat reproducible case you could upload your setup and we could have a look.

Sorry for the inconvenience, I realize this is annoying

#More Information!

I have more information!

In my In-Game Editor I can position characters anywhere I want, prior to game time.

#Most Recent Crash

In the most recent crash, one of my characters was stuck inside of a static mesh actor, because I placed that character there by accident.

After game time started, the character was stuck, trying to move, for a few seconds, unable to move, but trying and animating,

and then this crash

#Again This Never Happened in Beta

This never used to happen just cause a character could not move!

I’ve noticed how the animation / movement code has changed since public release, I**"ve had to redesign my nav-mesh free pathing system** to adjust for the way characters react to not being able to move.

#The Crash Below

#Crash Log

Posted separately cause comments are forced to be short

[2014.05.22-22.11.34:947][568]LogWindows:Error: 

appError called: Assertion failed: PNewPose.isValid() [File:E:\VictoryUE4\UnrealEngine-4.1\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodyInstance.cpp] [Line: 1503]


[2014.05.22-22.11.35:249][568]LogWindows: === Critical error: ===


[2014.05.22-22.11.35:249][568]LogWindows: Assertion failed: PNewPose.isValid() [File:E:\VictoryUE4\UnrealEngine-4.1\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodyInstance.cpp] [Line: 1503]

Stack:
FWindowsPlatformStackWalk::StackWalkAndDump() 0xe1904356 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:177] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FDebug::AssertFailed() 0xe17a2785 + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\core\private\misc\outputdevice.cpp:176] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Core.dll]
FBodyInstance::SetBodyTransform() 0xe00ef0ce + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\physicsengine\bodyinstance.cpp:1505] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkeletalMeshComponent::UpdateKinematicBonesToPhysics() 0xe01494bf + 0 bytes [File=e:\victoryue4\unrealengine-4.1\engine\source\runtime\engine\private\physicsengine\physanim.cpp:338] [in E:\VictoryUE4\UnrealEngine-4.1\Engine\Binaries\Win64\UE4Editor-Engine.dll]
USkeletalMeshComponent::RefreshBoneTransforms() 0xdfa6e3ae + 0 bytes 

see original post

abbreviated due to character limit on comments

#Your Questions

“Is there any content that has changed since the beta that might be triggering this?”

Nope. Same Assets!

“Are you able to isolate which skeletal mesh this is happening for? Is it always the same asset / animation?”

Maybe, not sure. Will have to test more thoroughly. Supposing it always was the same asset, would I have to redo the entire Character? And remake the animation blueprint from scratch?

" If you manage to get a somewhat reproducible case you could upload your setup and we could have a look."

If the character being stuck in something is all it takes I should be able to reproduce it yes.

#Character Stuck

but again, this is not originally the fault of my asset, and this never used to happen

#I know it is Character-Stuck related

I’ve seen changes in the way characters react to being stuck

Changes big enough I had to redo my C++ nav-mesh free AI pathing system!

#can you check there for possible errors?

#Thanks!

#I can Reliably Reproduce Crash

I can reliably reproduce the crash

It’s as simple as spawning ~30 of the creatures of same skeletal mesh, a Skeleton Creature

My AI will take over and they will jump all around the player and then the crash happens in less than 1 minute.

The question is

Where should I upload my ~3GB project to so you can see what I am experiencing?

This is an unpackaged build.

#I Solved This Crash

I simply return out before the SCENE_LOCK_WRITE

#BodyInstance.cpp ~1503

//Working around this -
	//check(PNewPose.isValid());
	if( ! PNewPose.isValid())
	{
		UE_LOG(LogPhysics, Warning, TEXT("PNewPose is invalid! Actor: %s Component: %s)"), *GetPathNameSafe(OwnerComponent.Get()), *GetPathNameSafe(OwnerComponent.Get()->GetOuter()));
		return;
	}
SCENE_LOCK_WRITE(RigidActor->getScene());

Now, instead of crashing, I am realizing what is going on here!

The message is

Creature is stuck and failed to move!

For my main character I get this message all the time (landscape Physx 3.3 bugs) without the crash,

but for my other character it causes a crash

I can actually recommend this source modification to improve stability of the engine

I’ve experienced no adverse sideeffects after rigorous testing my solution.

The benefit is huge: no more crash to desktop!

#Amazing Breakthrough Due To My Fix

Because I made the engine modification I can now see what the problem is!

Check out this picture!

The PNewPose crashes are always PAIRED with the character being stuck and failing to move

This is something I feel needs to be fix on your side, because this never happened in the beta, and as I mentioned in my original post, I already knew it was related to the code that is being used for when characters gets stuck, which had forced me to change my Navmesh-free AI system.

#Much More Useful Log Info

Thanks to my crash fix I can now present to you much better log info to adequately address this issue on your side

[2014.05.24-08.16.45:266][616]LogPhysics:Warning: PNewPose is invalid!  /Game/Maps/Victory.Victory:PersistentLevel.VictorySkelBP_C_5.CharacterMesh0  /Game/Maps/Victory.Victory:PersistentLevel.VictorySkelBP_C_5)
[2014.05.24-08.16.45:266][616]LogPhysics:Warning: PNewPose is invalid!  /Game/Maps/Victory.Victory:PersistentLevel.VictorySkelBP_C_5.CharacterMesh0  /Game/Maps/Victory.Victory:PersistentLevel.VictorySkelBP_C_5)
[2014.05.24-08.16.45:267][616]LogPhysics:Warning: PNewPose is invalid!  /Game/Maps/Victory.Victory:PersistentLevel.VictorySkelBP_C_5.CharacterMesh0  /Game/Maps/Victory.Victory:PersistentLevel.VictorySkelBP_C_5)
[2014.05.24-08.16.47:637][758]LogCharacterMovement: VictorySkelBP_C_39 is stuck and failed to move!
[2014.05.24-08.16.47:654][759]LogCharacterMovement: VictorySkelBP_C_39 is stuck and failed to move!
[2014.05.24-08.16.47:686][761]LogCharacterMovement: VictorySkelBP_C_39 is stuck and failed to move!
[2014.05.24-08.16.47:703][762]LogCharacterMovement: VictorySkelBP_C_39 is stuck and failed to move!
[2014.05.24-08.16.47:719][763]LogCharacterMovement: VictorySkelBP_C_39 is stuck and failed to move!
[2014.05.24-08.16.47:737][764]LogCharacterMovement: VictorySkelBP_C_39 is stuck and failed to move!

see my answer to my question below, which is still for you to address

#More Info

The crash was occurring any time my character got stuck, and due to the new code involved that handles when characters get stuck, this was causing the PNewPose invalid crash.

It was because I turned PNewPose from a crash into a warning that I was able to gather this intel.

#Solution

The code for handling the event of Characters getting stuck needs to properly addressed so it does not result in PNewPose being invalid in the first place.

Thanks ,
I’ll be looking into this soon. Keep any information coming it’s helpful

Is this bug fixed in official builds? Have started to get PNewPose.isValid() crashes much recently and quite lost how to prevent those. Using 4.10.4. Send dumps with MachineId:F87B756443F95CE9986941A672FE5264. Also attached the log, dmp and runtime-xml.

[link text][1]
[1]: 84045-crashdumps_pnewpose_isvalid.zip (99.4 KB)

Hi ,

You seem to be hitting the same assert that was running into, but we suspect that this may actually be a different issue. Could you please create a new post about the crash you are experiencing and include as much information as possible regarding how you have been able to reproduce it?

I have ticked made here:

Havent got the crash yet in 4.11, but got freezing instead that could be related. I managed to get rid of it after returning character mesh and capsule collisions back to default. Posted pics of the crash causing settings.