Bug Report-Array

ssertion failed: (Index >= 0) & (Index < ArrayNum) [File:C:\Program Files\Epic Games\UE_4.17\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 596] Array index out of bounds: 9 from an array of size 9
how is array number 9 out of bounds?.. I found a wild little glitch right here… work around is easy but it’s so weird

also I have the same loop in another section nothing different from the first if … still crashes that’s very bad ue4 cant handle loops well?

Are you attempting to access Array[9] with 9 slots? Because there’s a simple solution for that; Arrays begin at 0.

I had to think for a second no nooo that’s not it because I had the same loop in another spot doing the same thing… so it’s the engine.

Check the callstack to find which code is referencing the array with the incorrect index

Can you show us the code that it is crashing on. As people have mentioned, arrays run from 0…X, so getting index 9 out of array of size 9 (0,1,2,3,4,5,6,7,8), will crash.

I highly doubt this is an Engine issue, but without showing us any of your code or loops, we cannot help much further.

My guess is using remove on a array actually removes the entire element then? regardless, I check against that also and it still didn’t work.

I Casted to a incorrect node in BP, nothing to do with code or the array in general

And the array come with lack of documentation or part of the array I cam across this problem previously but it was a few months ago,you cant define in constructor something here something there etc… etc…