Description

Attempting to play an anim montage for a character without having the Anim Blueprint Generated Class set will cause the editor to crash.

Crash Reporter Link:
[Link Removed]

Steps to Reproduce
  1. Open UE4 Editor (Third Person Template)
  2. Add code to project based on Character (MyCharacter)
  3. Add the following to MyCharacter.h
    UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "AI|Dying")
    		UAnimMontage* TestMontage;
    
  4. Add the following to MyCharacter.cpp in the BeginPlay() function
    	if (TestMontage) 
    	{
    			GetMesh()->GetAnimInstance()->Montage_Play(TestMontage); 
    	}
    
  5. Compile changes
  6. In the editor, create a new AnimMontage (NewAnimMont - UE4_Mannequin_Skeleton), new AnimBlueprint (NewAnimBP - UE4_Mannequin_Skeleton), and new character blueprint based on MyCharacter (MyCharBP)
  7. Open NewAnimMont and drag ThirdPersonJump from the asset browser to the NewAnim montage field
  8. Open MyCharBP and set Test Montage field to NewAnimMont
  9. Drag instance of MyCharBP into scene
    #PIE

Result:
Editor crashes on play when Montage_Play is called from code

Expected:
Editor throws an error since Anim Blueprint is not yet set

Repro Rate:
3/3

Callstack
MachineId:9FA88CA44B7C623122B0039D6C8BA1B0
EpicAccountId:67b2dfbf573f4ca89257ae6f4e56a46c

Access violation - code c0000005 (first/second chance not available)

""

UE4Editor_Engine!UAnimInstance::Montage_Play() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\animation\animinstance.cpp:1979]
UE4Editor_MyProject7!AMyCharacter::BeginPlay() [f:\unreal projects\myproject7\source\myproject7\mycharacter.cpp:24]
UE4Editor_Engine!AWorldSettings::NotifyBeginPlay() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\worldsettings.cpp:137]
UE4Editor_Engine!AGameMode::HandleMatchHasStarted() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\gamemode.cpp:614]
UE4Editor_Engine!AGameMode::SetMatchState() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\gamemode.cpp:730]
UE4Editor_Engine!AGameMode::StartMatch() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\gamemode.cpp:591]
UE4Editor_Engine!UWorld::BeginPlay() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\world.cpp:3082]
UE4Editor_Engine!UGameInstance::StartPIEGameInstance() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\gameinstance.cpp:274]
UE4Editor_UnrealEd!UEditorEngine::CreatePIEGameInstance() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\playlevel.cpp:3012]
UE4Editor_UnrealEd!UEditorEngine::PlayInEditor() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\playlevel.cpp:2259]
UE4Editor_UnrealEd!UEditorEngine::StartQueuedPlayMapRequest() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\playlevel.cpp:1048]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\editorengine.cpp:1244]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\unrealedengine.cpp:361]
UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launchengineloop.cpp:2427]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

By Design
ComponentOLD - Anim
Affects Versions4.10.4
Target Fix4.12
CreatedFeb 29, 2016
ResolvedApr 5, 2016
UpdatedMay 18, 2020
View Jira Issue