Burst errors in new Unity version

Hi, we are using the latest Unity version 2021.1.0f1 with the latest A* Pathfinding Project 4.3.41 (Pro) via Package Manager.

  • Burst 1.5.0
  • Jobs 0.8.0-preview.23
  • Universal RP 11.0.0

The game runs fine in the editor, but when compiling to Android / iOS it throws these errors every frame. Any idea we can fix this?

03-29 13:19:52.580 14384 14445 E Unity   : Rethrow as TypeInitializationException
03-29 13:19:52.599 14384 14445 E Unity   : Exception: You cannot dispose an invalid command builder. Are you trying to dipose it twice?
03-29 13:19:52.599 14384 14445 E Unity   :   at Pathfinding.Drawing.CommandBuilder.DisposeInternal () [0x00013] in C:\Projects\lr2020\Unity\Library\PackageCache\com.arongranberg.astar@4.3.41\Drawing\CommandBuilder.cs:162
03-29 13:19:52.599 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingManager.CheckFrameTicking () [0x0004f] in C:\Projects\lr2020\Unity\Library\PackageCache\com.arongranberg.astar@4.3.41\Drawing\DrawingManager.cs:388
03-29 13:19:52.599 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingManager.SubmitFrame (UnityEngine.Camera camera, UnityEngine.Rendering.CommandBuffer cmd, System.Boolean usingRenderPipeline) [0x00023] in C:\Projects\lr2020\Unity\Library\PackageCache\com.arongranberg.astar@4.3.41\Drawing\DrawingManager.cs:416
03-29 13:19:52.599 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingManager.ExecuteCustomRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) [0x00018] in C:\Projects\lr2020\Unity\Library\PackageCache\com.arongranberg.astar@4.3.41\D
03-29 13:19:52.619 14384 14445 E Unity   : Exception: You cannot dispose an invalid command builder. Are you trying to dipose it twice?
03-29 13:19:52.619 14384 14445 E Unity   :   at Pathfinding.Drawing.CommandBuilder.DisposeInternal () [0x00013] in C:\Projects\lr2020\Unity\Library\PackageCache\com.arongranberg.astar@4.3.41\Drawing\CommandBuilder.cs:162
03-29 13:19:52.619 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingManager.CheckFrameTicking () [0x0004f] in C:\Projects\lr2020\Unity\Library\PackageCache\com.arongranberg.astar@4.3.41\Drawing\DrawingManager.cs:388
03-29 13:19:52.619 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingManager.SubmitFrame (UnityEngine.Camera camera, UnityEngine.Rendering.CommandBuffer cmd, System.Boolean usingRenderPipeline) [0x00023] in C:\Projects\lr2020\Unity\Library\PackageCache\com.arongranberg.astar@4.3.41\Drawing\DrawingManager.cs:416
03-29 13:19:52.619 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingManager.ExecuteCustomRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) [0x00018] in C:\Projects\lr2020\Unity\Library\PackageCache\com.arongranberg.astar@4.3.41\D
03-29 13:19:52.629 14384 14445 E Unity   : NullReferenceException: Could not find the delegate type ''
03-29 13:19:52.629 14384 14445 E Unity   :   at Unity.Burst.BurstCompiler.CompileUnsafeStaticMethod (System.RuntimeMethodHandle handle) [0x00149] in C:\Projects\lr2020\Unity\Library\PackageCache\com.unity.burst@1.5.0\Runtime\BurstCompiler.cs:215
03-29 13:19:52.629 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingData+BuilderData+ResetAllBuffers_0000013F$BurstDirectCall.GetFunctionPointerDiscard (System.IntPtr& ) <0x9e95a2e8 + 0x00067> in <eb106b94e57745a58f438dd94bbc3458>:0
03-29 13:19:52.629 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingData+BuilderData+ResetAllBuffers_0000013F$BurstDirectCall.GetFunctionPointer () <0x9e95a250 + 0x0003f> in <eb106b94e57745a58f438dd94bbc3458>:0
03-29 13:19:52.629 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingData+BuilderData+ResetAllBuffers_0000013F$BurstDirectCall.Constructor () <0x9e95a1e0 + 0x0001f> in <eb106b94e57745a58f438dd94bbc3458>:0
03-29 13:19:52.629 14384 14445 E Unity   :   at Pathfinding.Drawing.DrawingData+BuilderData+ResetAllBuffers_0000013F$BurstDirectCall..cctor () <0x9e95a138 + 0x0002b> in <eb106b94e57745a58f438dd94bbc3458>:0

Hi

That looks like it might potentially be a Unity bug.
Just to be sure, can you try to disable all kinds of bytecode stripping and things like that when building?

Hey Aron,

For now we have fixed it by downgrading only the Burst to 1.4.6 which works. So the problem resides in the new version 1.5.0.
I haven’t tried disabling the bytecode stripping, but I’ve tried to link.xml to preserve the whole assembly from A*, Burst and Jobs, but without success.

And after upgrading to the beta, sometimes the “RVOController.cs:340” (rvoAgent.CalculatedTargetPoint) has a NaN in the x or z of the Vector3, resulting in the RVO controllers to not move sometimes.

1 Like