Description

Spawning a character using an existing character as a template causes the spawned character to inherit the animation of the original and may lead to a crash.

This appears to be unique to character classes, and may be linked to CharacterMovementComponent, as spawning other AActor types does not cause this crash.

Notes:

  • Creating a character blueprint with skeletal mesh set but no animation does not crash
  • Creating an actor blueprint with a skeletal mesh set & third person character animation does not crash.
  • Attached project contains Steps 1-10 (Keyboard event is space bar)
Steps to Reproduce
  1. Open UE4 Editor (Third Person Template project)
  2. Add class based on BlueprintFunctionLibrary (MyFunctionLib)
  3. Add the following to MyFunctionLib.h
    UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = Default)
         static void MyTestFunc(UObject* WorldContextObject, TSubclassOf<AActor> 
    actorClass, AActor* actorTemplate, FTransform position);
    
  4. Add the following to MyFunctionLib.cpp
    void MyFunctionLib::MyTestFunc(UObject* WorldContextObject, TSubclassOf<AActor> actorClass, AActor* actorTemplate, FTransform position)
    {
         FActorSpawnParameters SpawnInfo;
         SpawnInfo.Template = actorTemplate;
         auto actor = WorldContextObject->GetWorld()->SpawnActor<AActor>(actorClass, position, SpawnInfo);
    }
    
  5. Compile
  6. In the level blueprint, add MyTestFunc node
  7. Add a reference to the ThirdPersonCharacter (TPC) from the level
  8. From the TPC reference, create GetClass node
  9. Wire TPC ref Actor Template and GetClass node into Actor Class of MyTestFunc
  10. Create keyboard event node and wire into MyTestFunc execution input
  11. PIE
  12. Move Character and press keyboard event key while moving

Result:
Newly spawned actor has the exact animation as the TPC and no new input can be read. Triggering Keyboard event a second time causes the editor to crash

Callstack
LoginId:7156c35640f86204e61b8383f45dee17
EpicAccountId:e8c7fa630b6440f69a25a2c64d6c482c

Assertion failed: !IsRunningParallelEvaluation() [File:D:\Build\++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\Engine\Private\Animation\AnimInstance.cpp] [Line: 416] 



UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_Engine!UAnimInstance::PostUpdateAnimation() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\animation\animinstance.cpp:418]
UE4Editor_Engine!USkeletalMeshComponent::PostAnimEvaluation() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:1747]
UE4Editor_Engine!USkeletalMeshComponent::CompleteParallelAnimationEvaluation() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:2785]
UE4Editor_Engine!FParallelAnimationCompletionTask::DoTask() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:134]
UE4Editor_Engine!TGraphTask<FParallelAnimationCompletionTask>::ExecuteTask() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:883]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:954]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:701]
UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:1798]
UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:538]
UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:1450]
UE4Editor_Engine!UWorld::RunTickGroup() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:758]
UE4Editor_Engine!UWorld::Tick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:1373]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1630]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:391]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3025]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-45206 in the post.

2
Login to Vote

Fixed
ComponentGameplay - Components
Affects Versions4.16
Target Fix4.17
Fix Commit3488949
Main Commit3502661
CreatedMay 18, 2017
ResolvedJun 14, 2017
UpdatedApr 27, 2018