Search Issue Tracker
Fixed
Fixed in 6000.0.64f1, 6000.2.15f1, 6000.3.1f1, 6000.4.0b1, 6000.5.0a3
Votes
3
Found in
6000.0.59f1
6000.2.7f1
6000.3.0b4
6000.4.0a1
6000.5.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)
-
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
I can't reproduce on latest 6.3 and 6.4 - could you please check whether this has been fixed already?