Search Issue Tracker

Active

Under Consideration for 6000.0.X, 6000.2.X, 6000.3.X, 6000.4.X

Votes

2

Found in

6000.0.59f1

6000.2.7f1

6000.3.0b4

6000.4.0a1

Issue ID

UUM-120175

Regression

No

Memory leaks occur when Shader with more than 128 keywords is compiled

-

How to reproduce:
1. Delete the Library folder from the “TestURP“ project
2. Open the “TestURP“ project
3. Open the “Scene“
4. Observe the Console

Expected result: No errors are displayed in the Console
Actual result: The Console reports “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 48” error

Reproducible in: 6000.0.59f1, 6000.2.7f1, 6000.3.0b4, 6000.4.0a1

Reproduced on: Windows 11
Not reproduced on: No other environment tested

Comments (1)

  1. R_Delta

    Sep 27, 2025 13:10

    I ran several tests when I encountered this issue.
    It seems to be affected not only by the number of keywords but also by the number of preprocessor directives and include directives.

    When the keyword count approaches around 128, and especially when there are many complex branching directives or #include directives, the likelihood of memory leaks increases significantly.
    If there are only a few preprocessor directives, error messages may not occur.
    However, when the number of directives increases, errors almost always occur.

    In addition, this issue is not limited to Unity 6000. Similar errors and memory leaks were also observed in the generally out of support versions 2022.3.62f1 and 2022.3.22f1.
    I could not obtain versions newer than 2022.3.62f1, so I have not tested them.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.