# Bug Report-Array

**URL:** <https://forums.unrealengine.com/t/bug-report-array/416521>\
**Category:** C++\
**Tags:** bugreport, unreal-engine, question, CPP\
**Created:** [February 6, 2018, 1:56am UTC](https://forums.unrealengine.com/t/bug-report-array/416521 "2018-02-06T01:56:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f77a82de](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f77a82de](https://forums.unrealengine.com/u/anonymous_user_f77a82de)\
**Post date:** [February 6, 2018, 1:56am UTC](https://forums.unrealengine.com/t/bug-report-array/416521/1 "2018-02-06T01:56:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Aericks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aericks](https://forums.unrealengine.com/u/Aericks)\
**Post date:** [February 6, 2018, 2:18am UTC](https://forums.unrealengine.com/t/bug-report-array/416521/2 "2018-02-06T02:18:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f77a82de](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f77a82de](https://forums.unrealengine.com/u/anonymous_user_f77a82de)\
**Post date:** [February 6, 2018, 8:12am UTC](https://forums.unrealengine.com/t/bug-report-array/416521/3 "2018-02-06T08:12:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [February 6, 2018, 11:24am UTC](https://forums.unrealengine.com/t/bug-report-array/416521/4 "2018-02-06T11:24:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dune](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dune](https://forums.unrealengine.com/u/Dune)\
**Post date:** [February 6, 2018, 12:28pm UTC](https://forums.unrealengine.com/t/bug-report-array/416521/5 "2018-02-06T12:28:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f77a82de](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f77a82de](https://forums.unrealengine.com/u/anonymous_user_f77a82de)\
**Post date:** [February 6, 2018, 1:10pm UTC](https://forums.unrealengine.com/t/bug-report-array/416521/6 "2018-02-06T13:10:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f77a82de](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f77a82de](https://forums.unrealengine.com/u/anonymous_user_f77a82de)\
**Post date:** [February 6, 2018, 2:15pm UTC](https://forums.unrealengine.com/t/bug-report-array/416521/7 "2018-02-06T14:15:37Z")

</div>

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…
