# Is this a UE Behavior Tree Bug or Am I Using a Weird Method?

**URL:** <https://forums.unrealengine.com/t/is-this-a-ue-behavior-tree-bug-or-am-i-using-a-weird-method/2552322>\
**Category:** Feedback & Requests\
**Tags:** Behavior-Tree, unreal-engine, bug-report, question, CPP\
**Created:** [June 12, 2025, 3:13am UTC](https://forums.unrealengine.com/t/is-this-a-ue-behavior-tree-bug-or-am-i-using-a-weird-method/2552322 "2025-06-12T03:13:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Black\_Dog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Black\_Dog](https://forums.unrealengine.com/u/Black_Dog)\
**Post date:** [June 12, 2025, 3:13am UTC](https://forums.unrealengine.com/t/is-this-a-ue-behavior-tree-bug-or-am-i-using-a-weird-method/2552322/1 "2025-06-12T03:13:36Z")

</div>

​​Is this a UE Bug or Am I Using a Weird Method?​​

I have a ​​Behavior Tree A used for combat logic and ​​Behavior Tree B for idle logic.

My goal is to ​​prevent interrupting an attack montage​​ when a BTTask is aborted. I call FinishAbort in the task ​​only after the attack montage completed​​.

This approach works correctly when ​​only BT\_A is running​​ – the montage plays to the end before the task finishes aborting.

However, when I try to ​​start a different Behavior Tree (BT\_B)​​ while BT\_A is running, ​​BT\_B fails to start.​​

I found that when run BT\_B, UE ​​abort BT\_A​​.But BT\_A is wait montage completed, so BT\_B is not running immediately.

I dug into the UBehaviorTreeComponent:

The UBehaviorTreeComponent::OnTaskFinished() func is called ​​when a task completes execution, including when it finishes an abort via FinishAbort()​​.

Within the end of OnTaskFinished(), I noticed it calls TrackNewLatentAborts(). This func updates bWaitingForLatentAborts.

After TrackNewLatentAborts(), ProcessPendingInitialize() is called to run new tree.

I observed: Inside TrackNewLatentAborts(), if bWaitingForLatentAborts is true, it immediately returns.And ProcessPendingInitialize() also return;

Is this behavior correct and intended?​​ Or does this indicate that my approach is weird ?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/9/a19ecd8171a6fd2ecfaa50ac877903d5e42c28d0.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/6/4a693a87a72aa5d78d4dd0931620793a578fb91b.png)
