# \[Bug\] Crash bug in EQS

**URL:** <https://forums.unrealengine.com/t/bug-crash-bug-in-eqs/339966>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, bug-report, UE4, question\
**Created:** [November 28, 2015, 7:20pm UTC](https://forums.unrealengine.com/t/bug-crash-bug-in-eqs/339966 "2015-11-28T19:20:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoombapup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zoombapup](https://forums.unrealengine.com/u/zoombapup)\
**Post date:** [November 28, 2015, 7:20pm UTC](https://forums.unrealengine.com/t/bug-crash-bug-in-eqs/339966/1 "2015-11-28T19:20:36Z")

</div>

Got a crash bug in EQS system for the AI. Sent a repro case to Mieszko, but I figured it’d be useful to get you guys to log a bug here too. I assume they will get put into bugtracker to assign someone to it.

Bug is basically that if you have two copies of an EQS in a BT that run, one of them with different return types (i.e. single, best of top 5% etc) then eventually you get a crash because one of them becomes invalid (to be specific, the template that is used in PrepareQueryInstance is invalid. I am assuming one of them gets GC’d for some reason.

As I say, a repro case has been sent to Mieszko to have a look at. You can find it here:

> **[Dropbox - Error](https://www.dropbox.com/s/4r5olkfdgtbj7pf/EQSBugSample.zip?dl=0)**
>
> Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!

Ta!

Phil.

---

<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:** [November 28, 2015, 10:17pm UTC](https://forums.unrealengine.com/t/bug-crash-bug-in-eqs/339966/2 "2015-11-28T22:17:21Z")

</div>

Found and fixed the bug. It boils down to a wrong way EQS queries were duplicated by EQS manager. The fix should make it to the main branch (and therefore to the github repo) within a week.

Thanks for the solid repro @zoombapup!

Cheers,

–mieszko
