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)
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
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
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.