Description

MDW: In progress (Dev-AnimPhys CL 3392820)

When calling GetSkinnedVertexPosition on a skeletal mesh that uses the same skeleton as a different skeletal mesh with a slightly different bone hierarchy, the Editor may crash.

To get this to occur, one skeletal mesh that has some extra bones is imported into the Editor, and a skeleton created for it. The extra bones do not affect the transforms of the main bones. A second skeletal mesh without the extra bones is imported using the same skeleton created for the previous mesh. Both skeletal meshes are then set as the mesh for two different skeletal mesh components in an Actor class. The second skeletal mesh is then set to use the first as the Master Pose.

When the resulting Actor is placed in a level and GetSkinnedVertexPosition is called on the second mesh, the array index out of bounds error can occur, resulting in a crash.

The user who reported the crash has suggested a couple possible solutions on their AnswerHub post.

Steps to Reproduce
  1. Download the attached .zip file.
  2. Unzip the project and associate it with your version of Main (project was created using CL 3389599).
  3. Generate project files and build the project in Visual Studio.
  4. Open the project in the Editor.
  5. Start PIE.

RESULT:
The Editor crashes due to an index out of bounds error.

EXPECTED:
The Editor continues running.

Callstack
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Main-Builds\Stream\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 633] 
Array index out of bounds: 148 from an array of size 148


UE4Editor_Core!FDebug::AssertFailed() [d:\main-builds\stream\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_Engine!USkinnedMeshComponent::GetSkinnedVertexPosition() [d:\main-builds\stream\engine\source\runtime\engine\private\components\skinnedmeshcomponent.cpp:1947]
UE4Editor_Engine!USkeletalMeshComponent::GetSkinnedVertexPosition() [d:\main-builds\stream\engine\source\runtime\engine\private\skeletalmeshcomponentphysics.cpp:1863]
UE4Editor_TestBoneIndex!AMyCharacter::BeginPlay() [d:\unreal projects\current issues\testboneindex 4.16\source\testboneindex\mycharacter.cpp:37]
UE4Editor_Engine!AActor::DispatchBeginPlay() [d:\main-builds\stream\engine\source\runtime\engine\private\actor.cpp:3104]
UE4Editor_Engine!AWorldSettings::NotifyBeginPlay() [d:\main-builds\stream\engine\source\runtime\engine\private\worldsettings.cpp:183]
UE4Editor_Engine!AGameStateBase::HandleBeginPlay() [d:\main-builds\stream\engine\source\runtime\engine\private\gamestatebase.cpp:177]
UE4Editor_Engine!UWorld::BeginPlay() [d:\main-builds\stream\engine\source\runtime\engine\private\world.cpp:3438]
UE4Editor_Engine!UGameInstance::StartPlayInEditorGameInstance() [d:\main-builds\stream\engine\source\runtime\engine\private\gameinstance.cpp:338]
UE4Editor_UnrealEd!UEditorEngine::CreatePIEGameInstance() [d:\main-builds\stream\engine\source\editor\unrealed\private\playlevel.cpp:3427]
UE4Editor_UnrealEd!UEditorEngine::PlayInEditor() [d:\main-builds\stream\engine\source\editor\unrealed\private\playlevel.cpp:2515]
UE4Editor_UnrealEd!UEditorEngine::StartQueuedPlayMapRequest() [d:\main-builds\stream\engine\source\editor\unrealed\private\playlevel.cpp:1217]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\main-builds\stream\engine\source\editor\unrealed\private\editorengine.cpp:1525]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\main-builds\stream\engine\source\editor\unrealed\private\unrealedengine.cpp:386]
UE4Editor!FEngineLoop::Tick() [d:\main-builds\stream\engine\source\runtime\launch\private\launchengineloop.cpp:3117]
UE4Editor!GuardedMain() [d:\main-builds\stream\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\main-builds\stream\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\main-builds\stream\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?

Head over to the existing AnswerHub thread and let us know what's up.

1
Login to Vote

Fixed
ComponentAnim
Affects Versions4.13.24.14.34.15.14.16
Target Fix4.16
Fix Commit3397525
Main Commit3427032
Release Commit3397525
CreatedApr 12, 2017
ResolvedApr 18, 2017
UpdatedMay 10, 2017