Description

Behavior Tree can be stuck in an infinite loop with a Conditional Loop that cannot run any child nodes.

 

Exception thrown at 0x00007FFC0E405F65 (UnrealEditor-AIModule.dll) in UnrealEditor.exe: 0xC0000005: Access violation writing location 0x000004EBD7810000.

Steps to Reproduce
  1. Create behavior tree below [Image Removed]
  2. Create AI controller and set it to run this Behavior Tree in Begin Play
  3. Assign AI Controller to a Pawn
  4. Simulate/PIE

Expected Result: Behavior Tree aborts and logs error.

Actual Result: Behavior Tree is stuck in an infinite loop until editor crashes.

Callstack

> [Inline Frame] UnrealEditor-AIModule.dll!TArray<FBehaviorTreeDebuggerInstance::FNodeFlowData,TSizedDefaultAllocator<32>>::Emplace(const FBehaviorTreeDebuggerInstance::FNodeFlowData &) Line 1970 C+> [Inline Frame] UnrealEditor-AIModule.dll!TArray<FBehaviorTreeDebuggerInstance::FNodeFlowData,TSizedDefaultAllocator<32>>::Emplace(const FBehaviorTreeDebuggerInstance::FNodeFlowData &) Line 1970 C  [Inline Frame] UnrealEditor-AIModule.dll!TArray<FBehaviorTreeDebuggerInstance::FNodeFlowData,TSizedDefaultAllocator<32>>::Add(const FBehaviorTreeDebuggerInstance::FNodeFlowData &) Line 2043 C  UnrealEditor-AIModule.dll!UBehaviorTreeComponent::StoreDebuggerSearchStep(const UBTNode * Node, unsigned short InstanceIdx, bool bPassed) Line 3019 C  UnrealEditor-AIModule.dll!UBTCompositeNode::DoDecoratorsAllowExecution(UBehaviorTreeComponent & OwnerComp, int InstanceIdx, int ChildIdx) Line 459 C  UnrealEditor-AIModule.dll!UBTCompositeNode::FindChildToExecute(FBehaviorTreeSearchData & SearchData, EBTNodeResult::Type & LastResult) Line 44 C  UnrealEditor-AIModule.dll!UBehaviorTreeComponent::ProcessExecutionRequest() Line 1765 C  UnrealEditor-AIModule.dll!UBehaviorTreeComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) Line 1477 C  [Inline Frame] UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTick::_l2::<lambda_8e93cba63652895611dfa1bc126611cb>::operator()(float) Line 1072 C  UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTickHelper<<lambda_8e93cba63652895611dfa1bc126611cb>>(UActorComponent * Target, bool bTickInEditor, float DeltaTime, ELevelTick TickType, const FActorComponentTickFunction::ExecuteTick::l2::<lambda_8e93cba63652895611dfa1bc126611cb> & ExecuteTickFunc) Line 3931 C  UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 1070 C  UnrealEditor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 284 C  UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 975 C  [Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 587 C  UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 753 C  UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilIdle(int QueueIndex) Line 653 C  UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilIdle(ENamedThreads::Type CurrentThread) Line 2105 C  UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 582 C  UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1592 C  UnrealEditor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 790 C  UnrealEditor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1546 C  UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1777 C  UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 474 C  UnrealEditor.exe!FEngineLoop::Tick() Line 5215 C  [Inline Frame] UnrealEditor.exe!EngineTick() Line 62 C  UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 183 C  UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE_ * hInInstance, HINSTANCE__ * hPrevInstance, char * _formal, int nCmdShow, const wchar_t * CmdLine) Line 272 C  UnrealEditor.exe!WinMain(HINSTANCE_ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 330 C[External Code]

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - AI - BehaviorTree
Affects Versions5.0-m2
Target Fix5.1
Fix Commit20668810
Main Commit20668810
CreatedMay 4, 2022
ResolvedJun 15, 2022
UpdatedOct 25, 2022