Description

If the Wait Task is completed for the first frame, it may not return to the root node even after Finish. This can be avoided by increasing the wait time of the Wait Task (see CaseOK.mp4).

When this issue appears, UBehaviorTreeComponent::RequestExecution() is called before PendingUnregisterAuxNodesRequests.Ranges is reset.

LogBehaviorTree (Log) > skip: request by [0:10] that is in pending unregister aux nodes range [[0:9]...[0:11]]

 

Visual Debugger Log:

 

LogBehaviorTree (Verbose) Deactivate node: NewBehaviorTree::MyTask[4]
LogBehaviorTree (Verbose) Search node update[Remove]: NewBehaviorTree::Blackboard Based Condition[2]
LogBehaviorTree (Verbose) Deactivate node: NewBehaviorTree::Sequence[3]
LogBehaviorTree (Verbose) Unregistering aux nodes up to [0:2]
LogBehaviorTree (Verbose) Testing node: NewBehaviorTree::Selector[0]
LogBehaviorTree (Verbose) Child[1] "NewBehaviorTree::Selector[6]" execution allowed by NewBehaviorTree::Blackboard Based Condition[5]
LogBehaviorTree (Verbose) Search node update[Add]: NewBehaviorTree::Blackboard Based Condition[5]
LogBehaviorTree (Verbose) Search node update[Add]: NewBehaviorTree::MyServise_2[7]
LogBehaviorTree (Verbose) Testing node: NewBehaviorTree::Selector[6]
LogBehaviorTree (Verbose) Child[0] "NewBehaviorTree::Sequence[9]" execution allowed by NewBehaviorTree::Blackboard Based Condition[8]
LogBehaviorTree (Verbose) Search node update[Add]: NewBehaviorTree::Blackboard Based Condition[8]
LogBehaviorTree (Verbose) Testing node: NewBehaviorTree::Sequence[9]
LogBehaviorTree (Log) Update: Remove for auxiliary node: NewBehaviorTree::Blackboard Based Condition[2]
LogBehaviorTree (Log) Update: Add for auxiliary node: NewBehaviorTree::Blackboard Based Condition[5]
LogBehaviorTree (Log) Update: Add for auxiliary node: NewBehaviorTree::Blackboard Based Condition[8]
LogBehaviorTree (Log) Update: Add for auxiliary node: NewBehaviorTree::MyServise_2[7]
LogBehaviorTree (Verbose) NewBehaviorTree::Blackboard Based Condition[8], ConditionalFlowAbort(always when passing) pass:0 executingBranch:0 abortPending:0 => skip
LogBehaviorTree (VeryVerbose) BT(61830) schedule next tick 0.000000, asked 0.000000.
LogBehaviorTree (Verbose) NewBehaviorTree::Blackboard Based Condition[5], ConditionalFlowAbort(always when passing) pass:0 executingBranch:0 abortPending:0 => skip
LogBehaviorTree (VeryVerbose) BT(61830) schedule next tick 0.000000, asked 0.000000.
LogBehaviorTree (Log) Execute task: NewBehaviorTree::Wait[10]
LogBehaviorTree (Log) Task NewBehaviorTree::Wait[10] finished: InProgress
LogBehaviorTree (Log) Task NewBehaviorTree::Wait[10] finished: Succeeded
LogBehaviorTree (Log) Execution request by NewBehaviorTree::Wait[10] (result: Succeeded)
LogBehaviorTree (Log) > skip: request by [0:10] that is in pending unregister aux nodes range [[0:9]...[0:11]]
LogBehaviorTree (VeryVerbose) BT(61830) schedule next tick 0.000000, asked 0.000000.

 

Steps to Reproduce
  1. Open the attached project in editor.
  2. Double click and open "NewBehaviorTree.uasset".
  3. Start PIE.

When looking at the behavior tree, unable to leave the Wait node.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-126602 in the post.

2
Login to Vote

Fixed
ComponentUE - AI - BehaviorTree
Affects Versions4.264.27
Target Fix5.0
Fix Commit14384911
Main Commit14384911
CreatedSep 14, 2021
ResolvedNov 29, 2021
UpdatedApr 22, 2022
View Jira Issue