Too many command builders active - again?!

  • A* version: 5.3.7
  • Unity version: 6000.1.4f

Hi there,

We seem to be facing the same issue that was reported here, unless we are using a Recast Graph:
Too many command builders active. Are some command builders not being disposed?
(sorry, but posting links directly is not possible for me)

We are running our game server as a dedicated server build with no cameras, and recently all AI-controlled creatures stopped moving, with this error message appearing in our logs.
Before this, the server had been running without any issues for about 25 days, so it does not happen very often and cannot be reproduced on our side.

Exception: Too many command builders active. Are some command builders not being disposed?
  at Pathfinding.Drawing.DrawingData+BuilderData.Reserve (System.Int32 dataIndex, System.Boolean isBuiltInCommandBuilder) [0x00000] in <00000000000000000000000000000000>:0
  at Pathfinding.Drawing.DrawingData+BuilderDataContainer.Reserve (System.Boolean isBuiltInCommandBuilder) [0x00000] in <00000000000000000000000000000000>:0
  at Pathfinding.Drawing.CommandBuilder..ctor (Pathfinding.Drawing.DrawingData gizmos, Pathfinding.Drawing.DrawingData+Hasher hasher, Pathfinding.Drawing.RedrawScope frameRedrawScope, Pathfinding.Drawing.RedrawScope customRedrawScope, System.Boolean isGizmos, System.Boolean isBuiltInCommandBuilder, System.Int32 sceneModeVersion) [0x00000] in <00000000000000000000000000000000>:0
  at Pathfinding.Drawing.DrawingData.GetBuilder (Pathfinding.Drawing.RedrawScope redrawScope, System.Boolean renderInGame) [0x00000] in <00000000000000000000000000000000>:0
  at Pathfinding.Drawing.DrawingManager.GetBuilder (Pathfinding.Drawing.RedrawScope redrawScope, System.Boolean renderInGame) [0x00000] in <00000000000000000000000000000000>:0
  at Pathfinding.RVO.SimulatorBurst.UpdateInternal[T] (Unity.Jobs.JobHandle dependency, System.Single deltaTime, System.Boolean drawGizmos, Unity.Collections.Allocator allocator) [0x00000] in <00000000000000000000000000000000>:0
  at Pathfinding.RVO.RVOSimulator.Update () [0x00000] in <00000000000000000000000000000000>:0

On shutdown, we saw this message as well:

Drawing data is being destroyed, but a drawing instance is still active. Are you sure you have called Dispose on all drawing instances? This will cause a memory leak!

Are we missing something on our side, as the bug should have been fixed long ago?

It’s possible this is a regression or something :smiley: I’m seeing the thread you’re talking about (Too many command builders active. Are some command builders not being disposed?) and it looks like it was quite a minute ago. Thanks for the report, I’ll tag @aron_granberg on it :+1: