Support Forum

Memory leak when compiling example scene

Hey @aron_granberg

We have following error when compiling in Unity but this is treated like a warning, it doesn’t stop the compilation:

11483: [Unity] ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
11484: [Unity] Parameter name: Empty string
11485: [Unity]   at System.ParseNumbers.StringToLong (System.String value, System.Int32 fromBase, System.Int32 flags, System.Int32* parsePos) [0x00042] in <695d1cc93cca45069c528c15c9fdd749>:0 
11486: [Unity]   at System.ParseNumbers.StringToLong (System.String value, System.Int32 fromBase, System.Int32 flags) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 
11487: [Unity]   at System.Convert.ToInt64 (System.String value, System.Int32 fromBase) [0x00022] in <695d1cc93cca45069c528c15c9fdd749>:0 
11488: [Unity]   at Unity.Burst.BurstCompiler.GetILPPMethodFunctionPointer (System.IntPtr ilppMethod) [0x00040] in /BUILD_PATH/art...q3w/Library/PackageCache/com.unity.burst@1.6.0-pre.2/Runtime/BurstCompiler.cs:188 
11489: [Unity]   at Pathfinding.Drawing.DrawingData+BuilderData+ResetAllBuffers_0000014E$BurstDirectCall.GetFunctionPointerDiscard (System.IntPtr& ) [0x0000a] in <3c230ad1ca834c9ea97c462dc666424d>:0 
11490: [Unity]   at Pathfinding.Drawing.DrawingData+BuilderData+ResetAllBuffers_0000014E$BurstDirectCall.GetFunctionPointer () [0x00003] in <3c230ad1ca834c9ea97c462dc666424d>:0 
11491: [Unity]   at Pathfinding.Drawing.DrawingData+BuilderData+ResetAllBuffers_0000014E$BurstDirectCall.Invoke (Unity.Collections.LowLevel.Unsafe.UnsafeAppendBuffer* buffers, System.Int32 numBuffers) [0x0000a] in <3c230ad1ca834c9ea97c462dc666424d>:0 
11492: [Unity]   at Pathfinding.Drawing.DrawingData+BuilderData.ResetAllBuffers (Unity.Collections.LowLevel.Unsafe.UnsafeAppendBuffer* buffers, System.Int32 numBuffers) [0x00002] in /BUILD_PATH/art...q3w/Library/PackageCache/com.arongranberg.astar@4.3.47/Drawing/DrawingData.cs:516 
11493: [Unity]   at Pathfinding.Drawing.DrawingData+BuilderData.ClearData () [0x00040] in /BUILD_PATH/art...q3w/Library/PackageCache/com.arongranberg.astar@4.3.47/Drawing/DrawingData.cs:630 
11494: [Unity]   at Pathfinding.Drawing.DrawingData+BuilderData.Release () [0x00015] in /BUILD_PATH/art...q3w/Library/PackageCache/com.arongranberg.astar@4.3.47/Drawing/DrawingData.cs:616 
11495: [Unity]   at Pathfinding.Drawing.DrawingData+BuilderDataContainer.Release (Pathfinding.Drawing.DrawingData+BuilderData+BitPackedMeta meta) [0x00000] in /BUILD_PATH/art...q3w/Library/PackageCache/com.arongranberg.astar@4.3.47/Drawing/DrawingData.cs:677 
11496: [Unity]   at Pathfinding.Drawing.CommandBuilder.DiscardAndDisposeInternal () [0x00048] in /BUILD_PATH/art...q3w/Library/PackageCache/com.arongranberg.astar@4.3.47/Drawing/CommandBuilder.cs:194 
11497: [Unity]   at Pathfinding.Drawing.DrawingManager.OnDisable () [0x0008b] in /BUILD_PATH/art...q3w/Library/PackageCache/com.arongranberg.astar@4.3.47/Drawing/DrawingManager.cs:313 
11498: [Unity] (Filename: Library/PackageCache/com.unity.burst@1.6.0-pre.2/Runtime/BurstCompiler.cs Line: 188)
11499: [Unity] AcceleratorClientConnectionCallback - disconnected - :0
11500: [Unity] Cleanup mono
11501: [Unity] A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.
11502: [Unity] A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.
11503: [Unity] A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.
11504: [Unity] debugger-agent: Unable to listen on 44
11505: [Unity] Exiting batchmode successfully now!
11506:        Unity ran in '1396.829491' seconds
11507:        Cleaning up
11508:        Compile ran in '1403.487466' seconds

Environment:

  • Unity 2020 LTS on Windows and Ubuntu
  • Happens on our own machines and on Unity Cloud Build
  • Target player: Ubuntu, iOS (not tested for Android)
  • Latest A*Path BETA PRO
  • Reproducible all the time, even in your example scene without any modifications: Example4_Recast_Navmesh2/RecastExample2.unity

Geoffrey.

Hmmm. This looks like a bug in burst I’d say. I would report it to Unity.