Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 771] Array index out of bounds: 0 from an array of size 0

Ok! So I’ve been trying to pin down the problem exactly and I finally found it but it’s so weird!
so basically the crash is caused by these casts from ABP_AnimLayersBase (which I got but duplicating the ABP_ItemAnimLayersBase of Lyra and changed the skeleton and name):


what is weird about it is if I change the casts to the new ABPs that I made and delete these old nodes if I close the project and try to reopen it I get the Assertion failed error!
But if I change the casts but keep the old cast nodes unlinked in the graph just hanging there doing absolutely nothing everything works fine and I don’t understand why!!!

This is actually driving me insane ngl xD

Edit: So this is what I mean:


this works fine but as soon as I delete the unlinked casts the problem reoccurs!

Edit 2: Deleting the ABP_Mannequin_Base is fine but Deleting ABP_ItemAnimLayersBase causes the issue!