Hi All
I’m using standard unpossess and destroy actor nodes in blueprints to remove ai control from a character that I’m about to possess with the player controller. The editor crashes very soon after those nodes have successfully completed (when I say that, I don’t know if they worked, but they ran, with breakpoints, and no error messages). The stack and break messages show that the crash is due to a C++ AI function being called by the blackboard/behavior tree blueprint.
I have initialized the blackboard and behavior tree in the possess function of the AI class, in C++. Should I have a custom unpossess function that deactivates these things? Any ideas about what I’ve done wrong here would be massively appreciated!
Thanks!
UE4Editor-RRDevelop-Win64-DebugGame.dll!TArray<FQueryKVPair * ptr64,FDefaultAllocator>::FindByPredicate<bool (FQueryKVPair *) >(ARRAIController::IsPlayerInRange::l7::bool (FQueryKVPair *) Pred) Line 1047 C++
UE4Editor-RRDevelop-Win64-DebugGame.dll!ARRAIController::IsPlayerInRange() Line 171 C++
UE4Editor-RRDevelop-Win64-DebugGame.dll!ARRAIController::execIsPlayerInRange(FFrame & Stack, void * const Result) Line 18 C++
UE4Editor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Result) Line 3699 C++
UE4Editor-CoreUObject.dll!UObject::CallFunction(FFrame & Stack, void * const Result, UFunction * Function) Line 395 C++
UE4Editor-CoreUObject.dll!UObject::ProcessContextOpcode(FFrame & Stack, void * const Result, bool bCanFailSilently) Line 1451 C++
UE4Editor-CoreUObject.dll!UObject::execLetBool(FFrame & Stack, void * const Result) Line 1370 C++
UE4Editor-CoreUObject.dll!UObject::ProcessInternal(FFrame & Stack, void * const Result) Line 602 C++
UE4Editor-CoreUObject.dll!UObject::CallFunction(FFrame & Stack, void * const Result, UFunction * Function) Line 516 C++
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction(FFrame & Stack, void * const Result) Line 1530 C++
UE4Editor-CoreUObject.dll!UObject::ProcessInternal(FFrame & Stack, void * const Result) Line 602 C++
UE4Editor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Result) Line 3699 C++
UE4Editor-CoreUObject.dll!UObject::ProcessEvent(UFunction * Function, void * Parms) Line 924 C++
UE4Editor-AIModule.dll!UBTService_BlueprintBase::ReceiveTick(AActor * OwnerActor, float DeltaSeconds) Line 703 C++
UE4Editor-AIModule.dll!UBTCompositeNode::OnNodeActivation(FBehaviorTreeSearchData & SearchData) Line 129 C++
UE4Editor-AIModule.dll!UBehaviorTreeComponent::ProcessExecutionRequest() Line 879 C++
UE4Editor-AIModule.dll!UBehaviorTreeComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) Line 792 C++
UE4Editor-Engine.dll!UActorComponent::ConditionalTickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction & ThisTickFunction) Line 906 C++
UE4Editor-Engine.dll!FActorComponentTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr & MyCompletionGraphEvent) Line 470 C++
UE4Editor-Engine.dll!FTickTaskSequencer::FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr & MyCompletionGraphEvent) Line 322 C++
UE4Editor-Engine.dll!TGraphTaskFTickTaskSequencer::FTickFunctionTask::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 671 C++
UE4Editor-Core.dll!FTaskThread::ProcessTasks(int QueueIndex, bool bAllowStall) Line 428 C++
UE4Editor-Core.dll!FTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 271 C++
UE4Editor-Core.dll!FTaskGraphImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr,TInlineAllocator<4,FDefaultAllocator> > & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 984 C++
UE4Editor-Engine.dll!FTaskGraphInterface::WaitUntilTaskCompletes(const TRefCountPtr & Task, ENamedThreads::Type CurrentThreadIfKnown) Line 188 C++
UE4Editor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 187 C++
UE4Editor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 722 C++
UE4Editor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 693 C++
UE4Editor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1116 C++
UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1227 C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 307 C++
UE4Editor.exe!FEngineLoop::Tick() Line 2214 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE * hInInstance, HINSTANCE * hPrevInstance, int nCmdShow) Line 131 C++
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 191 C++
[External Code]