"MoveTo" AIModule.BTTask Blueprint floods LOG file

I’m trying to create a simple AI and whenever I use MoveTo function inside BTTask Blueprint or in the Behaviour Tree it behaves weird. For some time it works fine, pawn is moving to it’s location or following the player and then the editor freezes flooding the LOG file with:

[2014.09.16-18.26.17:730][935]LogOutputDevice: === Handled error: ===
Ensure condition failed: this->IsBound() [File:d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\core\public\delegates\DelegateSignatureImpl.inl] [Line: 2035]
Unable to bind delegate to '&UAIAsyncTaskBlueprintProxy::OnMoveCompleted' (function might not be marked as a UFUNCTION)
Stack: Address = 0xebfa5216 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-Core.dll]
Address = 0xebe319d1 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-Core.dll]
Address = 0xebe31c17 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-Core.dll]
Address = 0xe893d9d5 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-AIModule.dll]
Address = 0xe893db19 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-AIModule.dll]
Address = 0xe8975f98 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-AIModule.dll]
Address = 0xeba9b355 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-CoreUObject.dll]
Address = 0xeba18f8d (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-CoreUObject.dll]
Address = 0xe990f8c2 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-Engine.dll]
Address = 0xe9925a06 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-Engine.dll]
Address = 0xe78faf86 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
Address = 0xe7ce69a6 (filename not found) [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
FEngineLoop::Tick() 0x3f84722e + 0 bytes [File=d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\launchengineloop.cpp:2098] [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor.exe]
GuardedMain() 0x3f83ca3c + 0 bytes [File=d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\launch.cpp:133] [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor.exe]
GuardedMainWrapper() 0x3f83caaa + 5 bytes [File=d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\windows\launchwindows.cpp:125] [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor.exe]
WinMain() 0x3f8488c9 + 17 bytes [File=d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\windows\launchwindows.cpp:201] [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor.exe]
__tmainCRTStartup() 0x3f8496f9 + 21 bytes [File=f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618] [in E:\Gry\Unreal Engine 4\4.4\Engine\Binaries\Win64\UE4Editor.exe]
Address = 0x772c652d (filename not found) [in C:\Windows\system32\kernel32.dll]
Address = 0x773fc521 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]
Address = 0x773fc521 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]

Seems nothing is working to prevent that freez and I’m just hopeless - Unable to bind delegate to ‘&UAIAsyncTaskBlueprintProxy::OnMoveCompleted’ (function might not be marked as a UFUNCTION) - what does that mean?
After the freez it starts working fine.

It’s a bug and UE4 4.5 should contain fixes that will address this as well.

However, why do you use AI Move To inside a BT task? Why not use BTTask_MoveTo? I mean the above should work, but it’s not a good design nor practice.

Cheers,

–mieszko

Cause I have no idea how to dynamically change a state. When BTTask_MoveTo is on the run how to quickly change state? For example the destination changes.

I know, I’m still learning.

And thanks a lot.

Cheers,
-Jędrzej

I have the same issue for the same reason as Z-enzyme. I also tried to subclass BTTask_MoveTo in native code but get linker errors. How else could you make the AI constantly move towards a moving target?

Now I got it, you have to add a decorator over MoveTo and it can dynamically stop or update the pawn’s “target”.