-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashes - Nested behavior trees #7
Comments
Hi, thanks for the report! Could you let us know more about how to set this up/reproduce that with an example tree? |
Hi, sure no problem. Just create new BehaviorTree asset which has selector under the root node. That selector can for example run EQS to perceive player using perception system. In my case I have two sub nodes of the selector. Each if them is sequence which contains a decorator. One should be run if TargetActor is set and second should run if TargetActor is not set. In AIController OnPossess I run my default BehaviorTree which can be seen on the screenshot above. We also need to set the subtree which will find the RunBehaviorDynamic node within the default BehaviorTree using the GameplayTag.
Now, the Active Behavior looks like for example this.. Once the UtilityDecorator is reach, we got Crash at
Directly at the line
with output warning: `this' is not accessible (substituting 0) I don't know if it's because the data is on another thread... are behavior trees multithreaded? Unfortunately I don't have much time to dig deeper. In my opinion, the decorator is trying to access the memory of the node at incorrect instance index "OwnerComp.GetActiveInstanceIdx()", which returns the memory of the node to the RunBehaviorDynamic task in the RootTree? Which might not be accessible that way? I hope this helps at least a little bit. EDIT:
|
Thanks for the report, we're looking into this. |
The memory management of utility nodes does not take into account the nested behavioral trees of "RunBehaviorDynamic" tasks within the UBehaviorTreeComponent. It only tries to access the RootTree memory, causing various crashes.
The text was updated successfully, but these errors were encountered: