Array index out of bounds: 1 from an array of size 0 After updating engine

I was working on a project in 4.20, I abandoned it and returned to it with 4.23, everything was working fine but now I’m getting a fatal crash every time I try to run it (engine opens the project and viewport without problem)

This is all I got from crash report so I don’t even know where to look if its a blueprint error:

ssertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 611] Array index out of bounds: 1 from an array of size 0

UE4Editor_Core!FWindowsErrorOutputDevice::Serialize() [d:\build++ue4\sync\engine\source\runtime\core\private\windows\windowserroroutputdevice.cpp:79]
UE4Editor_Core!FOutputDevice::LogfImpl() [d:\build++ue4\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:71]
UE4Editor_Core!AssertFailedImplV() [d:\build++ue4\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:101]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [d:\build++ue4\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:439]
UE4Editor_Engine!DispatchCheckVerify >() [d:\build++ue4\sync\engine\source\runtime\core\public\misc\assertionmacros.h:162]
UE4Editor_Engine!ComputeLocalSpaceTargetTM() [d:\build++ue4\sync\engine\source\runtime\engine\private\physicsengine\physicalanimationcomponent.cpp:222]
UE4Editor_Engine!::operator()() [d:\build++ue4\sync\engine\source\runtime\engine\private\physicsengine\physicalanimationcomponent.cpp:371]
UE4Editor_Engine!FPhysicsCommand_PhysX::ExecuteWrite() [d:\build++ue4\sync\engine\source\runtime\engine\private\physicsengine\physicsinterfacephysx.cpp:635]
UE4Editor_Engine!UPhysicalAnimationComponent::UpdatePhysicsEngine() [d:\build++ue4\sync\engine\source\runtime\engine\private\physicsengine\physicalanimationcomponent.cpp:401]
UE4Editor_Engine!UPhysicalAnimationComponent::ApplyPhysicalAnimationSettings() [d:\build++ue4\sync\engine\source\runtime\engine\private\physicsengine\physicalanimationcomponent.cpp:119]
UE4Editor_Engine!UPhysicalAnimationComponent::execApplyPhysicalAnimationSettings() [d:\build++ue4\sync\engine\source\runtime\engine\classes\physicsengine\physicalanimationcomponent.h:74]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4643]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:904]
UE4Editor_CoreUObject!UObject::ProcessContextOpcode() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2314]
UE4Editor_CoreUObject!ProcessLocalScriptFunction() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:974]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1058]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4643]
UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1464]
UE4Editor_Engine!AActor::ProcessEvent() [d:\build++ue4\sync\engine\source\runtime\engine\private\actor.cpp:769]
UE4Editor_Engine!FLatentActionManager::TickLatentActionForObject() [d:\build++ue4\sync\engine\source\runtime\engine\private\latentactionmanager.cpp:206]
UE4Editor_Engine!FLatentActionManager::ProcessLatentActions() [d:\build++ue4\sync\engine\source\runtime\engine\private\latentactionmanager.cpp:124]
UE4Editor_Engine!AActor::Tick() [d:\build++ue4\sync\engine\source\runtime\engine\private\actor.cpp:994]
UE4Editor_Engine!AActor::TickActor() [d:\build++ue4\sync\engine\source\runtime\engine\private\actor.cpp:970]
UE4Editor_Engine!FActorTickFunction::ExecuteTick() [d:\build++ue4\sync\engine\source\runtime\engine\private\actor.cpp:164]
UE4Editor_Engine!TGraphTask::ExecuteTask() [d:\build++ue4\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:842]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:686]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:582]
UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [d:\build++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:1457]
UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\build++ue4\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:557]
UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\build++ue4\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:1505]
UE4Editor_Engine!UWorld::RunTickGroup() [d:\build++ue4\sync\engine\source\runtime\engine\private\leveltick.cpp:789]
UE4Editor_Engine!UWorld::Tick() [d:\build++ue4\sync\engine\source\runtime\engine\private\leveltick.cpp:1568]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build++ue4\sync\engine\source\editor\unrealed\private\editorengine.cpp:1618]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build++ue4\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:403]
UE4Editor!FEngineLoop::Tick() [d:\build++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3967]
UE4Editor!GuardedMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\launch.cpp:168]
UE4Editor!GuardedMainWrapper() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:145]
UE4Editor!WinMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:275]
UE4Editor!__scrt_common_main_seh() [d:\agent_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

We have the same issue after upgrading from 4.21.2 to 4.22.3. I’ve just opened a ticket.

Did you already found a work arround?

Still nothing, I don´t even have a clue of what could be causing this

Any response from your ticket?

Unreal support was very helpful, but they needed our full codebase to try reproducing the issue by themself. Luckily we found a workarround based on this: https://www.reddit.com/r/unrealengine/comments/b9ct2l/dont_switch_to_version_422/. We basically followed this advise from astutejoe:

“I was having the exact same problem within the same~ish circumstances. Before applying the ragdoll we were stopping all the anim montages and other actions, one of them was that we had the brilliant idea to set the mesh anim instance class to Null, that was the culprit of this the same exception.”

We also noticed just recently that we are using PhysicalAnimationComponent which is still experimental. The crash always happended when a character with this compenent was switching to ragdoll mode. Maybe this could also be a reason for the crash.

1 Like

What a life saver! This was indeed the problem and I could finally recover my project!, marking this as solution and I´m really impressed about this HUGE problem with something that its supposed to be a FEATURE can cause such a frustrating crash and no one else could provide the correct answer! Thanks a lot!

1 Like