Search Unity

how to enable TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp?

Discussion in 'Editor & General Support' started by EssencyStudios, Jan 7, 2019.

  1. EssencyStudios

    EssencyStudios

    Joined:
    May 18, 2018
    Posts:
    10
    I've received multiple crash logs which spam until the user's game freezes

    (Filename: C:\buildslave\unity\build\Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 539)
    Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 9)


    hidden between hundreds of these lines lies another message

    To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations

    I cannot for the life of me find out how to enable this thing, google wont give me any answers!
    For anyone interested here are the crash logs as well:

    one dude: https://pastebin.com/CcjPkuHj
    other dude: https://pastebin.com/Ce0TL821
     
  2. echeg

    echeg

    Joined:
    Aug 1, 2012
    Posts:
    90
    Same question. How know what a system have leak?
     
  3. SunnyChow777

    SunnyChow777

    Joined:
    Nov 17, 2016
    Posts:
    2
    see this log in Xcode. Google tells me nothing either
     
  4. Kobald-Klaus

    Kobald-Klaus

    Joined:
    Jun 20, 2014
    Posts:
    127
    Getting thousands of that errors since update to 2019.1

    There is no such file where I can turn on that #define !!!
    (Filename: ./Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 541)
     
  5. Blackx_xCat

    Blackx_xCat

    Joined:
    Aug 8, 2017
    Posts:
    1
    me too
     
  6. EssencyStudios

    EssencyStudios

    Joined:
    May 18, 2018
    Posts:
    10
    Its been a few months and still can't find a solution!
     
    good_anti likes this.
  7. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    Same here, it seems to not happen right when I start up Unity, but as soon as Unity runs for a while this nasty bug comes about. I am betting it is something internal to Unity where a job is not written correctly.
     
  8. cloud1989

    cloud1989

    Joined:
    May 30, 2016
    Posts:
    32
    me too!
     
  9. Jbs_GameZone

    Jbs_GameZone

    Joined:
    Dec 14, 2018
    Posts:
    118
    Got the same issue, using Unity 2019.2.1f1

    Has anyone found a solution / workaround ?
     
  10. Domas_L

    Domas_L

    Unity Technologies

    Joined:
    Nov 27, 2018
    Posts:
    111
    Hello! Could you please submit a bug report with a minimal reproduction project for this issue and reply in here with the issue ID?
     
  11. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    This was a horrible problem for me and then I cleaned up how I was generating allocations and it went away. I think if your game throws a null error and doesn't shut down properly in the editor, that stuff will be left and leaky. So try restarting Unity first and check those TempJob allocations.
     
  12. FuDaNing

    FuDaNing

    Joined:
    Sep 29, 2014
    Posts:
    6
    Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations

    I removed all "Job", "Allocator", but the warning still exist.
    I'm using 2018.4.7f1 Personal.
     
  13. FuDaNing

    FuDaNing

    Joined:
    Sep 29, 2014
    Posts:
    6
    NavMeshBuilder.UpdateNavMeshDataAsync() is the reason about my issue. But I don't know how to fix it.
     
  14. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    @fUring most definitely internal. You are gonna have to submit a report to Unity. They seem to be leaking garbage that way everywhere. Does it go away if you restart Unity?
     
  15. FuDaNing

    FuDaNing

    Joined:
    Sep 29, 2014
    Posts:
    6
    I've restarted my Computer, but it still there. I'll submit a report soon. Thank you`
     
  16. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    108
    Still in 2019.2.3 :(
     
  17. alexrau

    alexrau

    Joined:
    Mar 1, 2015
    Posts:
    80
    Having same issue in 2019.2r5. Jut came out of seemingly nowhere. Opened bug with Unity and waiting to hear back. I can reproduce on a scene containing just a camera and directional light. Waiting to hear back from them. (The bug uploader would not for the project, so I had to zip it. Upgraded to the latest version of Post Processing and CORE, going to try the 2019.2.r6 that came out yesterday).

    Error is :

    Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations

    Visually on more complex scenes where I see it, it looks like the UI is resizing itself between bigger and smaller.