UE5.0.1 Assertion failed: !bBranchDeactivationSuspended

Hello! For the asset I am using, every time I play it, the editor crashes and I get this message:

Assertion failed: !bBranchDeactivationSuspended [File:D:\build++UE5\Sync\Engine\Source\Runtime\AIModule\Private\BehaviorTree\BehaviorTreeComponent.cpp] [Line: 721] This logic does not support re-entrance

I have been trying to figure out what exactly would cause this, but I cannot figure it out. It seems to coincide with my AI characters transitioning from fighting to navigating around the map.

I have opened this in UE4.27 and 4.26, but this ONLY occurs in UE5.0.1… Is this something with UE5?

I have tried:

  • Deleting items in Saved Folder
  • Deleting items in Intermediate Folder
  • Deleting CachedAssetRegistry
  • Removed the Bridge plugin
  • Disabled motion blur

Any ideas? I am at a loss. . . .

I have the same problem with one of my ai. Could you fix the problem?

I came across this issue myself when I unpossessed the AI Pawn indirectly through a call change of a method call within a BTService Tick. According to this Reddit post, it looks like this has already been filed as a bug and is slated to be fixed in 5.1:

In the meantime I am going to re-design what I am doing to move the direct method call that causes the Controller change and by association the change to the behavior tree state out of the BTService and into the AIController via a timer that will be activated on the next tick to apply the requested change outside the behavior tree execution stack.

Update: Already had Tick() running on the target actor so just had a DeferredXYZ member function that set a boolean that was then processed and invoked the target method in Tick and this worked beautifully.