On unity 2022.2.1f - Windows 10.
In editor and Win Builds player log.
The errors appears randomly after some Debug.Log calls … and seems to be related to: UnityEngine.StackTraceUtility:ExtractStackTrace ()
Deleting the Debug.Log calls or disabling the stacktrace from the log makes most of them disappear.
Is this some internal bug where the stack trace is jobified?
Could someone point me to what exactly is internally managed by the JobSystem in unity? Update calls, StackTrace, coroutines, is there any internal check on pure C# tasks age? (guess they should be indipendent)
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 11)
Processing queue in navmesh left are : 2 blockall is: False
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
Or the memory the stacktraceutility uses when called by the log. This is with the leak diagnostic on.
Beacause of the Debug.log call and since deleting them makes the error disappear I thought this is some internal stuff related to the StackTraceUtility.
But I can’t fully understand the diagnotic log.
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 9)
Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations.
Allocation of 512 bytes at 4056c880 in block 1 (frameIndex=8, lifetime=4, age=4, state=OK)
0x00007ff79c5da422 (Unity) ujob_schedule_parallel_for_internal
0x00007ff79c5da2cc (Unity) ujob_schedule_parallel_for
0x00007ff79c5d7919 (Unity) JobQueue::ScheduleJobsForEach
0x00007ff79c5d632d (Unity) ScheduleJobForEachInternal
0x00007ff79cc8f208 (Unity) ScheduleJobForEach<BuildNavMeshInfo>
0x00007ff79cc93f1d (Unity) ClassifyTilesAndComputeMeshJob
0x00007ff79cc8e847 (Unity) AggregateJobCombineFunc<BuildNavMeshInfo>
0x00007ff79c5d99a8 (Unity) ujob_execute_job
0x00007ff79c5d9007 (Unity) lane_guts
0x00007ff79c5daeb4 (Unity) worker_thread_routine
0x00007ff79c7f2ff7 (Unity) Thread::RunThreadWrapper
0x00007ffa6c1e74b4 (KERNEL32) BaseThreadInitThunk
0x00007ffa6dda26a1 (ntdll) RtlUserThreadStart
01 00 00 00 07 00 00 00 02 00 00 00 00 00 00 00 ................
c0 c8 56 40 a4 02 00 00 a1 26 da 6d fa 7f 00 00 ..V@.....&.m....
00 00 00 00 00 00 00 00 00 00 00 00 43 22 fd 3f ............C".?
46 5f 2c bf e7 d5 12 bf 00 00 00 00 06 3f b1 3f F_,..........?.?
02 00 00 00 02 00 00 00 09 00 00 00 00 00 00 00 ................
00 c9 56 40 a4 02 00 00 c8 d2 ad 3f 00 00 00 00 ..V@.......?....
00 00 00 00 00 00 00 00 00 00 00 00 43 22 fd 3f ............C".?
46 5f 2c bf e7 d5 12 bf 00 00 00 00 06 3f b1 3f F_,..........?.?
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 11)
Processing queue in navmesh left are : 2 blockall is: False
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])