Search Unity

[Jobs][Lags] JobTempAlloc has allocations that are more than 4 frames old

Discussion in 'Entity Component System' started by dyox, Jan 18, 2018.

  1. Vuh-Hans

    Vuh-Hans

    Joined:
    Sep 24, 2013
    Posts:
    42
    I'm glad the 4 frames limit on jobs is being removed, it's something that severely limits the use cases of jobs where they would otherwise be ideal. It also ties your code to the framerate, causing all sorts of "different hardware" problems. Say your job takes 30ms to finish; no bug at 60FPS, hard to track bug at 144FPS.
     
  2. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    After some research I found another case when this problem occurs. In our case while using WebGL and the Particle System..... kind of like @castor76 problem but slightly different.

    I'm using Unity 2018.3.0f2

    Here are some details of the bug-report

    EDIT: It's even simpler. Just publish an empty scene with fresh out-of-the-box particle system and (de)activate the Trail-Module. If active it will trigger the error.
     
    Last edited: Jan 4, 2019
  3. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Would you please submit a bug report and post the bug number here?
     
  4. EssencyStudios

    EssencyStudios

    Joined:
    May 18, 2018
    Posts:
    10
    I'm having this issue and between the hundreds of "JobTempAlloc has allocations that are more than 4 frames old.."
    it says "To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations"

    Anyone figure out how to do this? I cant seem to.
    Here are some of those crash reports:

    one dude: https://pastebin.com/CcjPkuHj
    other dude: https://pastebin.com/Ce0TL821
    another dude: https://pastebin.com/CiNyXn04
     
    xieJunSheng likes this.
  5. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Peter77 likes this.
  6. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Not fixed in 2018.3.1f1

    Build Target: WebGL
    Empty Scene -> New Particle System -> Active trails will trigger the error in build
     
  7. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    247
    That is some sad news - was happy to see a new build today but looking at the release notes I was kinda let down :(
     
  8. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Has this been fixed? I have the problem now in 2018.3 where its saying this in the browser:

    Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak


    Then gives memory warnings

    UnityLoader.js:4 GC Warning: Repeated allocation of very large block (appr. size 7192576):
    printErr @ UnityLoader.js:4
    UnityLoader.js:4 May lead to memory leak and poor performance
    printErr @ UnityLoader.js:4
    UnityLoader.js:4 GC Warning: Repeated allocation of very large block (appr. size 3596288):
    printErr @ UnityLoader.js:4
    UnityLoader.js:4 May lead to memory leak and poor performance


    Then crashes because of out of memory
     
    LightYarn likes this.
  9. seldom

    seldom

    Joined:
    Dec 4, 2013
    Posts:
    118
    Same here. 2018.3.0f2 WebGL build spams the console with this error. Going back to 2018.2 makes it go away.
     
  10. JoleEh

    JoleEh

    Joined:
    Jan 29, 2017
    Posts:
    2
    Any estimate on when the 4 frame limit will be completed? Also would it be bad if i had jobs runnning for up to 15 seconds?
     
  11. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
  12. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77

    Hey everyone:
    Version 2018.3.4 fixed the problem! *yaay* :)
     
  13. Zephus

    Zephus

    Joined:
    May 25, 2015
    Posts:
    356
    ...it did? I am on 2018.3.4 and I'm here because I'm getting spammed by the warning right now.
     
    siddharth3322 likes this.
  14. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    We didn't fix anything relating to it in 2018.3.4.

    In 19.1 next week beta build has a fix.
     
    FROS7 likes this.
  15. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    @Joachim_Ante

    Well, your own patchnotes say that you did :confused:

    Unbenannt.PNG

    And I tested it: New scene -> add particle system -> activate trails -> build as WebGL -> no problem

    Maybe we are talking about two different problems?
     
  16. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    I am pretty sure that that is specifically not the issue the thread was originally about.

    What is being discussed here is C# jobs in user projects that take longer than 1 frame causing the warning. That should be fixed in 19.1, i am sure the particle system specific issue indeed was fixed in 18.3 as the release notes state.
     
  17. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    Getting the same error all the time in 2018.3.5 when using a particle system.
     
  18. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Ah, I see! Thank you for clarifying that.
    In my case the bug was indeed only about the particle system, I did not recognized any other problems regarding the job system. Sorry for mixing things up.
     
  19. BillBucky

    BillBucky

    Joined:
    Nov 4, 2016
    Posts:
    7
    Hello,

    This is still happening to me as well on Unity 2018.2.14f1. Any fixes for this, I don't believe I am using any job system.

    Thanks!
     
  20. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    19.1 fixes it.
     
  21. alligator76

    alligator76

    Joined:
    Nov 24, 2018
    Posts:
    9
    Hello
    I get this problem with 2018.3.6f1, only when i enable "deep profile" in the profiler.
    I get even more message /details with 2019.1.0b4 and 2019.2.0a6.

    That happens randomly depending on the state of the project (sometimes disappears, sometimes come back), and greatly disturbs the profiler (FPS greatly reduced).

    I am not using jobsystem (but i tried it briefly and cancelled).
     
    siddharth3322 and Sylmerria like this.
  22. Aeolus_Codes

    Aeolus_Codes

    Joined:
    Mar 6, 2019
    Posts:
    7
    I am having the same problem, even with no self-made code. Help?
     
  23. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    Any chance of adding this fix to your only LTS release so far (2017.4)? Getting this bug when importing assets from the store.
     
  24. TomPo

    TomPo

    Joined:
    Nov 30, 2013
    Posts:
    86
    So in general...
    Example with documentation like a+b is..... no comment.
    Question then is: how to use jobs in real scenarios?
    We can't use references, we can't use static data (sic!)

    so let's imagine real world scenario - pathfinding being calculated on separate thread.

    we have a List<Tile> MapTiles - keeping information albout all tiles on the map
    now how to use job system to calculate pathinding and get the result
    (result should be Tile[] or int[] (tiles have own ID) or List<Tile>)

    we can't pass our MapTiles to the job, we can't refer to it, we can't make MapTIles static to be accessible from the job...

    So... for what purposes is this job system for?

    BTW - 2019.1.0f2 - problem still exists
     
    Last edited: Apr 19, 2019
  25. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,659
    You must marshal your data into a blittable format. In the case of pathfinding, that might mean:

    • A TileData struct which contains the information about a tile in blittable format - its ID, maybe the terrain type identifier, etc
    • A NativeArray<TileData> that contains all your tiles - List<T> and T[] cannot be used in jobs but NativeArray<T> can be
    • A NativeList<int> for storing the result

    This allows the engine to guarantee of your data because it is able to reason about ownership of the native containers. More information in the manual.
     
  26. Stephen-Hodgson

    Stephen-Hodgson

    Joined:
    Jul 15, 2014
    Posts:
    35
    I've been seeing this warning a lot in clean projects lately.

    Mainly when switching scenes.

    Using 2019.1
     
    xieJunSheng and FlightOfOne like this.
  27. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    Wrymnn likes this.
  28. Kmsxkuse

    Kmsxkuse

    Joined:
    Feb 15, 2019
    Posts:
    306
    I'm getting the same problem randomly it seems.

    It goes away for roughly 20 min or so whenever I restart my editor but then comes back. I made no changes to any code between restart and warning appearing. I've also started and stopped my code (still unchanged) multiple times without the warning showing up. Very strange.

    upload_2019-4-26_0-15-53.png
     
    GuardHei likes this.
  29. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    I think I have managed to find the cause for this and it seems like it is a Unity bug.

    Background: I have an IJobParallelFor set up that is scheduled in one FixedUpdate() and finished in the next FixedUpdate(). The same frame it is finished it gets re-scheduled again and so the cycle continues. This job calculates some physics forces so this is needed. If I limit the framerate through V-Sync this message disappears which leads me to believe that there is some code checking if the job has been finished inside 4 Update() calls, not taking into account if the job was scheduled inside FixedUpdate() since only one FixedUpdate() passes between scheduling and finishing. It also means that the error is entirely framerate dependent.
    In the official Unity documentation it says that finishing the job just after it was scheduled is a bad design, and yet if we want to use job system with physics that would mean either finishing jobs inside Update() instead of FixedUpdate() which is not always practical. So please investigate this.
     
    FlightOfOne and Wrymnn like this.
  30. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    384
    This bug still appears on 2019.1.1f1, specifically with LocalNavMeshBuilder using AsyncOperation.
    When restarting unity and not running AsyncOperation from NavMeshBuilder.UpdateNavMeshDataAsync(), the leak is not there, everything is fine.

    It seems async does not stop, keeps running even after exiting play mode, it will eventually freeze editor for me
     
  31. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    I have managed to get rid of the error by getting rid of the struct I was allocating inside the job. Still - it is still a bit weird that we can not use structs if we want to run jobs in FixedUpdate().
     
  32. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    I am getting the same thing on 2019.1.6

    If I create and dispose the NativeArray on the same frame, I do NOT get this warning message. However, if I were to create, for example, in OnEnable() and dispose in OnDisable() I get this message. Does the create/dispose has to be done in the same frame?

    What am I doing wrong here?

    Here's the code:
    This gives me the message in question (4 frames old...)

    Code (CSharp):
    1. using Unity.Collections;
    2. using Unity.Jobs;
    3. using Unity.Mathematics;
    4. using UnityEngine;
    5. using UnityEngine.Jobs;
    6. using Unity.Burst;
    7. public class TestJob : MonoBehaviour
    8. {
    9.     public float3 velocity;
    10.     public float3[] velocities;
    11.     public float3[] positions;
    12.     public Transform testPrefab;
    13.     public Transform[] transforms;
    14.     public int count = 1000;
    15.     public bool update;
    16.     public bool useJobs;
    17.  
    18.     public SimpleMoveJob simpleMoveJob = new SimpleMoveJob();
    19.  
    20.     private void Awake()
    21.     {
    22.         Unity.Mathematics.Random random = new Unity.Mathematics.Random(1);
    23.         velocities = new float3[count];
    24.         positions = new float3[count];
    25.  
    26.         transforms = new Transform[count];
    27.         for (int i = 0; i < count; i++)
    28.         {
    29.             transforms[i] = Instantiate<Transform>(testPrefab);
    30.             float3 bulletPos = transform.position;
    31.             bulletPos += random.NextFloat3(10, 60f);
    32.             transforms[i].position = bulletPos;
    33.             velocities[i] = velocity;
    34.             positions[i] = transforms[i].position;
    35.         }
    36.  
    37.    
    38.     }
    39.  
    40.     private void OnEnable()
    41.     {
    42.         simpleMoveJob.posX = new NativeArray<float>(count, Allocator.TempJob);
    43.         simpleMoveJob.posY = new NativeArray<float>(count, Allocator.TempJob);
    44.         simpleMoveJob.posZ = new NativeArray<float>(count, Allocator.TempJob);
    45.  
    46.         simpleMoveJob.vX = new NativeArray<float>(count, Allocator.TempJob);
    47.         simpleMoveJob.vY = new NativeArray<float>(count, Allocator.TempJob);
    48.         simpleMoveJob.vZ = new NativeArray<float>(count, Allocator.TempJob);
    49.     }
    50.  
    51.     private void OnDisable()
    52.     {
    53.         simpleMoveJob.posX.Dispose();
    54.         simpleMoveJob.posY.Dispose();
    55.         simpleMoveJob.posZ.Dispose();
    56.  
    57.         simpleMoveJob.vX.Dispose();
    58.         simpleMoveJob.vY.Dispose();
    59.         simpleMoveJob.vZ.Dispose();
    60.     }
    61.  
    62.     private void Update()
    63.     {
    64.         if (update)
    65.         {
    66.             if (!useJobs)
    67.             {
    68.                 float deltaTime = Time.deltaTime;
    69.  
    70.                 for (int i = 0; i < count; i++)
    71.                 {
    72.                     positions[i] += velocities[i] * deltaTime;
    73.                     transforms[i].position = positions[i];
    74.                 }
    75.             }
    76.             else
    77.             {
    78.  
    79.                 for (int i = 0; i < count; i++)
    80.                 {
    81.                     simpleMoveJob.posX[i] = positions[i].x;
    82.                     simpleMoveJob.posY[i] = positions[i].y;
    83.                     simpleMoveJob.posZ[i] = positions[i].z;
    84.  
    85.                     simpleMoveJob.vX[i] = velocities[i].x;
    86.                     simpleMoveJob.vY[i] = velocities[i].y;
    87.                     simpleMoveJob.vZ[i] = velocities[i].z;
    88.                 }
    89.  
    90.                 simpleMoveJob.deltaTime = Time.deltaTime;
    91.  
    92.                 JobHandle simpleMoveJobHandle = simpleMoveJob.Schedule(count, 1000);
    93.                 simpleMoveJobHandle.Complete();
    94.  
    95.                 for (int i = 0; i < count; i++)
    96.                 {
    97.                     positions[i].x = simpleMoveJob.posX[i];
    98.                     positions[i].y = simpleMoveJob.posY[i];
    99.                     positions[i].z = simpleMoveJob.posZ[i];
    100.  
    101.                     transforms[i].position = positions[i];
    102.                 }
    103.             }
    104.         }
    105.     }
    106. }
    107.  
    108. [BurstCompile]
    109. public struct SimpleMoveJob : IJobParallelFor
    110. {
    111.     public NativeArray<float> posX, posY, posZ;
    112.  
    113.     [ReadOnly]
    114.     public NativeArray<float>vX, vY, vZ;
    115.     [ReadOnly]
    116.     public float deltaTime;
    117.  
    118.     public void Execute(int i)
    119.     {
    120.         posX[i] += vX[i] * deltaTime;
    121.         posY[i] += vY[i] * deltaTime;
    122.         posZ[i] += vZ[i] * deltaTime;
    123.     }
    124. }
    This one runs with no warnings:
    Code (CSharp):
    1. using Unity.Collections;
    2. using Unity.Jobs;
    3. using Unity.Mathematics;
    4. using UnityEngine;
    5. using UnityEngine.Jobs;
    6. using Unity.Burst;
    7. public class TestJob : MonoBehaviour
    8. {
    9.     public float3 velocity;
    10.     public float3[] velocities;
    11.     public float3[] positions;
    12.     public Transform testPrefab;
    13.     public Transform[] transforms;
    14.     public int count = 1000;
    15.     public bool update;
    16.     public bool useJobs;
    17.  
    18.     public SimpleMoveJob simpleMoveJob = new SimpleMoveJob();
    19.  
    20.     private void Awake()
    21.     {
    22.         Unity.Mathematics.Random random = new Unity.Mathematics.Random(1);
    23.         velocities = new float3[count];
    24.         positions = new float3[count];
    25.  
    26.         transforms = new Transform[count];
    27.         for (int i = 0; i < count; i++)
    28.         {
    29.             transforms[i] = Instantiate<Transform>(testPrefab);
    30.             float3 bulletPos = transform.position;
    31.             bulletPos += random.NextFloat3(10, 60f);
    32.             transforms[i].position = bulletPos;
    33.             velocities[i] = velocity;
    34.             positions[i] = transforms[i].position;
    35.         }
    36.  
    37.    
    38.     }
    39.  
    40.  
    41.     private void Update()
    42.     {
    43.         if (update)
    44.         {
    45.             if (!useJobs)
    46.             {
    47.                 float deltaTime = Time.deltaTime;
    48.  
    49.                 for (int i = 0; i < count; i++)
    50.                 {
    51.                     positions[i] += velocities[i] * deltaTime;
    52.                     transforms[i].position = positions[i];
    53.                 }
    54.             }
    55.             else
    56.             {
    57.  
    58.                 simpleMoveJob.posX = new NativeArray<float>(count, Allocator.TempJob);
    59.                 simpleMoveJob.posY = new NativeArray<float>(count, Allocator.TempJob);
    60.                 simpleMoveJob.posZ = new NativeArray<float>(count, Allocator.TempJob);
    61.  
    62.                 simpleMoveJob.vX = new NativeArray<float>(count, Allocator.TempJob);
    63.                 simpleMoveJob.vY = new NativeArray<float>(count, Allocator.TempJob);
    64.                 simpleMoveJob.vZ = new NativeArray<float>(count, Allocator.TempJob);
    65.  
    66.                 for (int i = 0; i < count; i++)
    67.                 {
    68.                     simpleMoveJob.posX[i] = positions[i].x;
    69.                     simpleMoveJob.posY[i] = positions[i].y;
    70.                     simpleMoveJob.posZ[i] = positions[i].z;
    71.  
    72.                     simpleMoveJob.vX[i] = velocities[i].x;
    73.                     simpleMoveJob.vY[i] = velocities[i].y;
    74.                     simpleMoveJob.vZ[i] = velocities[i].z;
    75.                 }
    76.  
    77.                 simpleMoveJob.deltaTime = Time.deltaTime;
    78.  
    79.                 JobHandle simpleMoveJobHandle = simpleMoveJob.Schedule(count, 1000);
    80.                 simpleMoveJobHandle.Complete();
    81.  
    82.                 for (int i = 0; i < count; i++)
    83.                 {
    84.                     positions[i].x = simpleMoveJob.posX[i];
    85.                     positions[i].y = simpleMoveJob.posY[i];
    86.                     positions[i].z = simpleMoveJob.posZ[i];
    87.  
    88.                     transforms[i].position = positions[i];
    89.                 }
    90.  
    91.                 simpleMoveJob.posX.Dispose();
    92.                 simpleMoveJob.posY.Dispose();
    93.                 simpleMoveJob.posZ.Dispose();
    94.  
    95.                 simpleMoveJob.vX.Dispose();
    96.                 simpleMoveJob.vY.Dispose();
    97.                 simpleMoveJob.vZ.Dispose();
    98.             }
    99.         }
    100.     }
    101. }
    102.  
    103. [BurstCompile]
    104. public struct SimpleMoveJob : IJobParallelFor
    105. {
    106.     public NativeArray<float> posX, posY, posZ;
    107.  
    108.     [ReadOnly]
    109.     public NativeArray<float>vX, vY, vZ;
    110.     [ReadOnly]
    111.     public float deltaTime;
    112.  
    113.     public void Execute(int i)
    114.     {
    115.         posX[i] += vX[i] * deltaTime;
    116.         posY[i] += vY[i] * deltaTime;
    117.         posZ[i] += vZ[i] * deltaTime;
    118.     }
    119. }
     

    Attached Files:

  33. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Never mind, I think I figured it out.

    If I set these as Allocator.Persistent no warnings.

    Code (CSharp):
    1.     private void OnEnable()
    2.     {
    3.         posX = new NativeArray<float>(count, Allocator.Persistent);
    4.         posY = new NativeArray<float>(count, Allocator.Persistent);
    5.         posZ = new NativeArray<float>(count, Allocator.Persistent);
    6.  
    7.         vX = new NativeArray<float>(count, Allocator.Persistent);
    8.         vY = new NativeArray<float>(count, Allocator.Persistent);
    9.         vZ = new NativeArray<float>(count, Allocator.Persistent);
    10.     }
    Can someone please explain the difference between Allocator.Temp and Allocator.TempJob? How should the life cycle of each be? are they both intended to work during one frame?

    https://docs.unity3d.com/ScriptReference/Unity.Collections.Allocator.html
    Doc. doesn't really explain much.
     
  34. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Temp is for new containers allocated inside job
     
    FlightOfOne likes this.
  35. mattKsp

    mattKsp

    Joined:
    Jul 15, 2014
    Posts:
    15
    I am getting this error on 2019.2.0b3 and 2019.3.0a5, using Native Arrays and Native Hash Maps.
     
  36. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    406
    I am on Unity 2019.1.5f1 and am suddenly getting this error now. It was fine a few days ago, but now all of a sudden it starts every time I click play. I cannot find the source of the issue as it was as stated fine a few days ago, and I am currently not using ECS or Jobs in my project, except for in the ECS and Jobs example files from the GitHubs.

    Is there some sort of update feature I am unaware of for this?
     
  37. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Not sure if this is related but, I believe some of the dependencies (forget exactly which) were updated. Might want to check the package manager. I'd back things up though since these updates may create other errors etc..
     
  38. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    I am having the same issue without any kind of Job System usage.
    Screenshot 2019-06-22 at 6.20.56 PM.png

    I have this error when I run the project within the iOS device, within Unity editor, I am not getting any kind of error messages.
    Unity Version 2018.4.2
     
    clinton_d likes this.
  39. LouisStudyUnity

    LouisStudyUnity

    Joined:
    Mar 26, 2019
    Posts:
    2
    I have the same issue in Unity 2019.1.8f1

    bug report id: 1170392
     
    siddharth3322 likes this.
  40. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    I've been getting this forever. It is definitely an internal Unity problem and I am surprised it has been around as a bug for so long. At least back to 2017 Unity from my research.
     
    timdevil and siddharth3322 like this.
  41. DanielSuperKing

    DanielSuperKing

    Joined:
    Mar 26, 2019
    Posts:
    11
    This error message just started spamming my console on 2019.1.10f1 with no apparent changes on my end to cause them.

    I'm not using the job system, I haven't made any changes that would cause this. It wasn't happening yesterday and I checked out yesterday's commits... still happening.
     
  42. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    When did you install 2019.1.10??
     
  43. DanielSuperKing

    DanielSuperKing

    Joined:
    Mar 26, 2019
    Posts:
    11
    According to the git commit log... July 18th.
     
  44. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    Yeah, I've been getting this error forever. Only happens when I hit play, never before I start up the scene. I have VR installed. I am not sure what else it could be.
     
  45. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Sent a +1 bug report regarding this one. Got these constantly spamming into console.

    It wasn't that bad on 2019.1 / 2019.2, but on 2019.3 it completely destroyed my FPS (in editor).

    (Case 1173391) <- Always occurs for me

    For some reason I think it might be related to the hybrid render package / moving camera.
     
  46. DanielSuperKing

    DanielSuperKing

    Joined:
    Mar 26, 2019
    Posts:
    11
    It's no longer happening today, literally one day later. I can't think of anything I did to fix it either.
     
  47. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    @xVergilx I am running the hybrid render package and that could be the reason. I find as the day goes on I get more and more of the errors.
     
  48. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    I have to ask goose, what version of Unity are you using and what platforms are you targeting?

    I feel like you're not getting much of a response because as far as I'm aware most if not all internal causes of this have been fixed in various 19.x builds. I have not seen this issue appear in months outside of screwing up something myself.

    Are you sure it's not your code causing the issue?

    The annoying thing is if you screw up something then the warning will stay until you restart Unity.

    (I did recently have this popup in an Android build but it was simply a bad link.xml that I had forgot to update. And I can easily create the warnings due to exceptions or not properly returning job handles but the warning is working as intended for this.)
     
  49. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    The problem is that you can't tell 100%. Those warnings are really poorly written.
    It doesn't help that they continue to spam constantly when you don't know what causing them, or how to fix it.

    I've had similar messages popup even in a project that didn't have a Jobs packages installed. The issue was that I've installed newer drivers, and didn't reboot the pc. Unity simply couldn't handle driver reload correctly (even after restart).

    Things like this is impossible to track down with these messages.
    UT has to do something about them, not just plain tell "Okay you can't do anything, spam the S*** out of our bug tracker, we'll figure 1 eternity later what's going on".
     
  50. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    @tertle I am using Unity 2019.1.8, targeting VR and windows. Gonna update to 2019 now. The errors that throw when I haven't deallocated a job in time are different. They have a different format and don't tell you to turn on a weird stack trace. These are ones that are internal to the Unity Engine. It is pretty clear from @DanielSuperKing 's report that it happens somewhere deep inside Unity's stuff since it came out of nowhere and then went away. "TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp" is something to do with a c++ file I think.

    I'll see if 2019.2 fixes it, but there are enough people continuing to report this problem that I don't think it is from my code. Plus I am about 95% sure I've deallocated every job either in the same frame or in the next frame in my code. Of course I could be wrong, but I am pretty sure if I don't deallocate a job it gives me a proper stack trace with the disposal sentinel.
     
    siddharth3322 and xVergilx like this.