# Error in the code of A\* search

**URL:** <https://forums.unrealengine.com/t/error-in-the-code-of-a-search/394143>\
**Category:** C++\
**Tags:** pathfinding, unreal-engine, crash, bug-report, CPP, question\
**Created:** [May 21, 2017, 2:04am UTC](https://forums.unrealengine.com/t/error-in-the-code-of-a-search/394143 "2017-05-21T02:04:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![koloden](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@koloden](https://forums.unrealengine.com/u/koloden)\
**Post date:** [May 21, 2017, 2:04am UTC](https://forums.unrealengine.com/t/error-in-the-code-of-a-search/394143/1 "2017-05-21T02:04:41Z")

</div>

File GraphAstar.h

We take a reference to FSearchNode at line 184, but it can get invalidated due to the possible node pool resizing at line 212, and cause crashes or incorrect behaviour when used later on.

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [May 21, 2017, 8:29pm UTC](https://forums.unrealengine.com/t/error-in-the-code-of-a-search/394143/2 "2017-05-21T20:29:51Z")

</div>

Hey koloden,

Thanks for reporting it. We’ve noticed that as well and it’s already been fixed for 4.16. Please share anything else you find wrong with our code!

Cheers,

–mieszko
