Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

TLS Allocator ALLOC_TEMP_THREAD bug 2019.3.15f1

Discussion in 'Editor & General Support' started by Drowning-Monkeys, Jun 30, 2020.

  1. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    Hi guys,

    I've seen this bug crop up a few times over the years, and now when upgrading my project to 2019.3 and adding HDRP support it's back.

    It looks like this:
    First i get 5 debug outputs, each at a different address:
    Allocation of 4588 bytes at 00000265000069D0


    Then I get the following error:
    TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations, size 13760


    And that's followed by 2 warnings:
    Internal: Stack allocator ALLOC_TEMP_THREAD has unfreed allocations, size 13760
    To Debug, enable the define: DEBUG_STACK_LEAK in StackAllocator.h. This will output the callstacks of the leaked allocations


    This happens regardless of what's loaded, so an empty scene has these same errors.

    Can anyone help me with this?
     
    Last edited: Jun 30, 2020
  2. Sergio_SQ

    Sergio_SQ

    Joined:
    Jun 11, 2020
    Posts:
    7
    Same problem here.
     
  3. HeavyMind

    HeavyMind

    Joined:
    Feb 27, 2020
    Posts:
    2
    I am also having this issue in the same version of Unity. I've used memory profiler to try and pinpoint the leaks by examining the diff between snapshots, one taken at the start of the project in an open scene, and another snapshot after the leaked allocations have grown, but the result hasn't been as clear cut as I hoped. So I'd like to know how I would go about enabling the define: DEBUG_STACK_LEAK in StackAllocator.h?
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,198
    You sadly can't unless you are a source customer... (hence the "Internal:" part of that log)

    However, this sounds like it might be a bug with the engine if it happens in an empty scene, so could you please file a bug report?

    The TEMP allocators are, due to their transient nature, currently not really ones we have good support for in the Memory Profiler. We're aware of the need to have something to analyze them though and are looking at ways to continuously capture memory to allow better introspection on these.