Search Unity

Memory Leak - TLS Allocator ALLOC_TEMP_THREAD

Discussion in 'Editor & General Support' started by xDavidLeon, Feb 20, 2020.

  1. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    123
    Hi there,

    We are having difficulties working with Unity as it keeps crashing on different machines. Looks like a memory leak. Unity Version is 2019.3.1f1

    The console spams:

    TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations .. and there are multiple 'Allocation of X bytes at Y' messages:

    upload_2020-2-20_10-4-6.png

    We are using the latest verified Universal Render Pipeline (URP) and Burst packages:

    upload_2020-2-20_10-4-42.png

    Project is too big to send out as a bug report, so no idea how to report it to Unity.

    Anyone had to deal with this?
     
  2. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    We are getting the same thing, with HDRP. It only started happening in non beta 2019.3.
     
  3. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    @xDavidLeon did you ever solve this in your project?
     
  4. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    123
    Nope, I'm trying to find a way to reproduce it on a smaller project. Managed to make it crash on a new project by messing around with lightmapping, but couldn't find a way to make the crash consistent.
     
  5. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    Thanks. It seems there are many causes as this message appears on a lot of google searches for all sorts of issues. We are wondering if it was because our project was originally preview HDRP.
     
  6. E_T_

    E_T_

    Joined:
    May 14, 2018
    Posts:
    19
    Hi. I am running 2019.3.0f6 and I am also getting this in my HDRP project. It sucks and I wish I could find a fix.
     
  7. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    123
    That might have something to do. We migrated from HDRP to URP and since then we've had this error. I don't know if there's any way to find this "residual" HDRP data?
     
  8. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    My only idea right now is to remove and re-add pieces of the project until it breaks. But we are very busy and it seems like it might take a long time, because we tried this with the packages and didn't solve it.
     
  9. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    123
    I managed to get Unity to notice the issue. Their first recommendation was to remove/clear the GI Cache, but that's not working for me. I'll keep you updated.
     
  10. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    123
    I think it got fixed by disabling the Cache Server and deleting the Library folder. The library folder got corrupted when switching from HDRP to URP.

    There's some people in the team that deleted the Library and still have the error... so still not sure if that's a permanent solution.
     
  11. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    We can't seem to find a permanent solution. We tried to make the entire project a unitypackage and make a fresh project. That helped for a minute, then a restart made the error reappear.
     
  12. LucasRizzotto

    LucasRizzotto

    Joined:
    Dec 11, 2015
    Posts:
    27
    Still problematic in July
     
    Krull likes this.
  13. batonPiotr

    batonPiotr

    Joined:
    Apr 8, 2016
    Posts:
    10
    Still problematic. Unity 2019.3.0f5 macOS environment + Android build
     
  14. Piko-Island-Studios

    Piko-Island-Studios

    Joined:
    Nov 30, 2013
    Posts:
    12
    Getting the same error now.
     
  15. Da_Neel

    Da_Neel

    Joined:
    Dec 29, 2013
    Posts:
    15
    Me too
     
  16. dhruv_mv

    dhruv_mv

    Joined:
    Jul 12, 2020
    Posts:
    2
    U can try to right click on the project tab and select reimport
    It worked for me
    Wish u best with ur game :)
     
    unitytest116 likes this.
  17. Si2G

    Si2G

    Joined:
    Feb 22, 2020
    Posts:
    6
    Just had this problem. Started right after I turned on Collaborate and did the first commit.
    I have also managed to make it go away.
    I Right-Clicked my ASSET folder and selected REIMPORT ALL.
    Unity closes itself down, reopens and reimports everything.
    Hit play and error has gone.
     
    chazgw likes this.
  18. EaglemanGameDev

    EaglemanGameDev

    Joined:
    Aug 29, 2020
    Posts:
    6
    I am also getting this error in Unity Editor 2020.3.25f1 but mine starts when after backing my project up using the Collaborate feature in Unity. To fix my problem, I just close Unity and start it back up. Would be nice not to have to do this each time though.
     
  19. reev4eg

    reev4eg

    Joined:
    May 10, 2015
    Posts:
    37
    Same thing when using the Collaborate feature in Unity.
     
  20. Parajao

    Parajao

    Joined:
    Jan 21, 2018
    Posts:
    1
    Same, publish on collaborate tool and boom on play mode tests.
    The workaround, close and open the editor.