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
- “FocusController has unprocessed focus events.” warnings are thrown after adding iOS, tvOS or visionOS Build Profiles
- Holes and different colors appear on default Tree Materials after applying them to the Tree GameObject and undoing changes
- Error indicating that the Text Asset Importer hasn't been disposed properly is logged when switching Importer Type in a Focused Inspector
- Documentation installation shows "Install failed: Validation Failed" when installing Android Build Support module
- Error indicating that the Package Manifest Importer hasn't been disposed properly is logged when switching Importer Type in a Focused Inspector
Resolution Note:
I can't reproduce on latest 6.3 and 6.4 - could you please check whether this has been fixed already?