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
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
Resolution Note:
I can't reproduce on latest 6.3 and 6.4 - could you please check whether this has been fixed already?