Search Feedback

41
votes
Declined

Enable TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp.

Scripting

-

-

I have been occasionally getting this error message for a while (across multiple Unity versions):

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

Since I upgraded to Unity 2018.2, this error message is followed by this one:

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

However, I don't have access to ThreadsafeLinearAllocator.cpp. It would be helpful if debugging for leaked allocations could be turned on, or at least if we had the option to.

Response avatar

lukaszunity

Dec 20, 2018

Please report a bug on this issue, so it can be investigated and fixed.

Comments (3)

  1. 646ffaf82fb8434451b71da6930518fd?d=mm

    QuantumMagDev

    Dec 13, 2018 01:15

    Hey guys, I had this issue come up.
    I had a 2D Array in the form of List<2DStruct> column = new List<2DStruct>();
    Where 2DStruct =
    [System.serializable]
    struct 2DStruct {
    public List<GameObject> Row;
    }
    and on Scene Load the warnings:
    -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 was not able to enable this or find any info on how, but when i switched from struct to class, suddenly the warning is gone (Example fix below)

    List<2DClass> column = new List<2DClass>();
    Where 2DClass =
    [System.serializable]
    struct 2DClass {
    public List<GameObject> Row = new List<GameObject>();
    }

    Struct seems to throw an allocation warning in Native Arrays, If possible switch to Class for Native Arrays!
    Hope this solves your issue,
    Phil Ferland President/CEO of QME Inc.

  2. 3c77503a3eead4d2d35b2081cb96193a?d=mm

    ZiggyZeg2005

    Dec 02, 2018 17:05

    I've been having this problem too. I'm learning how to code in untiy, and i did the exact same thing as in the tutorial (from 2017 btw). But when i added a script that would write what my player collided with in the console, It just came with the same error message as you. I don't know what is happening, but i just thought i'd say this so you know you are not alone. Good luck :)

  3. F5783bbe26316e5f534b146b56c71b35?d=mm

    NoDumbQuestion

    Oct 12, 2018 06:09

    For extra detail. I also receive this error with Headless build. From early build, I notice it is related to animation somehow.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(11034)

2D

(291)

Ads

(63)

AI & Navigation

(83)

Analytics

(130)

Animation

(413)

Asset Store

(371)

Asset Store Publisher

(21)

Assets

(557)

Audio

(185)

Cloud Build

(154)

Collaborate

(70)

Docs & Tutorials

(251)

Editor

(2579)

Everyplay

(17)

Game Performance Reporting

(22)

General

(1003)

Graphics

(903)

GUI

(447)

Input

(173)

Licensing

(93)

Networking

(193)

Physics

(392)

Platforms

(448)

Profiling & Optimization

(84)

Runtime

(188)

Scripting

(1154)

Terrain

(178)

WebGL

(145)