If I call RunBehaviorTree in code that is called from UBehaviorTreeComponent::ProcessExecutionRequest, it causes a crash in the editor in UBehaviorTreeComponent::UpdateDebuggerAfterExecution. The DebuggerSteps have been cleared because StopTree has been called to run the new Behavior Tree.
Hi GJHolmes,
I have been assigned to look into your crash, however we need just a bit more information to be able to attempt to reproduce this. Can you please attach your logs, callstack, and dxdiag to this page as well as provide your reproduction steps so we can attempt to recreate your crash? Have you been able to reproduce this in a blank project with no additional content or is it limited to one project? Thank you!
Thanks for reporting crash, I missed that case. Following piece of code should solve the problem [UBehaviorTreeComponent::ExecuteTask]
uint8* NodeMemory = (uint8*)(TaskNode->GetNodeMemory<uint8>(ActiveInstance));
EBTNodeResult::Type TaskResult = TaskNode->WrappedExecuteTask(this, NodeMemory);
const UBTNode* ActiveNodeAfterExecution = GetActiveNode();
if (ActiveNodeAfterExecution == TaskNode)
{
// update task's runtime values after it had a chance to initialize memory
UpdateDebuggerAfterExecution(TaskNode, InstanceIdx);
OnTaskFinished(TaskNode, TaskResult);
}