Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Possible Bug involving Memory Allocation

Discussion in 'Editor & General Support' started by allyn_alves, Jun 27, 2022.

  1. allyn_alves

    allyn_alves

    Joined:
    Jan 15, 2022
    Posts:
    18
    I suddenly started getting the following errors during test runs of my Unity project on Xbox Dev Kits (same error messages for both Xbox One and Xbox Series X kits) the errors do not happen in the Unity editor. I am currently waiting on my company's Windows admin contact to gain access to the Unity Xbox forum so I cannot post up there quite yet about it, but I need answers ASAP as this is holding up the production process.

    Allocation of 32 bytes at 000001FDA0000040 TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 32 Internal: Stack allocator ALLOC_TEMP_MAIN has unfreed allocations, size 32 To Debug, enable the define: DEBUG_STACK_LEAK in StackAllocator.h. This will output the callstacks of the leaked allocations

    The error says to debug this is the StackAllocator.h file, but apparently the StackAllocator.h file is in Unity's C++ engine code, so there is no way to access this or debug the leak in that way. I could not find any publicly available info on how to access that file aside from the following Unity forum post:
    https://forum.unity.com/threads/how...kallocator-h-to-debug-issue-in-2019-2.746243/

    These errors spam continually as the project runs and causes all tests to fail. This happens with multiple projects regardless of unity version I use (LTS versions of 2019, 2020, and 2021) and the issue seemed to come up without any specific trigger. I run test builds with Powershell scripts and had not had these errors until a few days ago. I have positively scrubbed Google for answers with similar errors and have had no luck with fixes. Most others who get this error seem to be making builds for iOS (I am not in this case) and solutions have been deleting temporary files and reloading projects and I have done all of that with no luck.

    Editor versions: "2021.3.4f1", "2020.3.34f1", "2019.4.19f1", "2018.4.36f1"
    Using git for source control
    Game build targets: UWP for Xbox One / S and Xbox Series X/S
    Scripting Backend and API Compatibility Level: Direct3D12 listed on top of list in Player Settings, with Direct3D11 below. .ps1 scripts forces a Direct3D12 build.


    Hoping someone on here has seen this before, but it's looking more and more like a Unity bug! Please let me know if more info is needed.
     
    Last edited: Jun 27, 2022
  2. allyn_alves

    allyn_alves

    Joined:
    Jan 15, 2022
    Posts:
    18
    @G_Wojo it seemed like you might have some info on this sort of error? I saw your comment in the above referenced forum post. Thank you for the time
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,519
  4. allyn_alves

    allyn_alves

    Joined:
    Jan 15, 2022
    Posts:
    18
    Kurt-Dekker likes this.
  5. allyn_alves

    allyn_alves

    Joined:
    Jan 15, 2022
    Posts:
    18
    Update: This ended up being a Unity bug that a fix was implemented in newer install versions from what I was using. After I updated the install version I was using for the project all of the Allocator errors stopped.
     
    Kurt-Dekker likes this.