Search Issue Tracker
Fixed in 2022.1.X
Editor crashes after deleting a material variant which has a child variant sometimes resulting in a large memory leak
1. Create a new project
2. Create a Material
3. Create a variant of that Material
4. Create a variant of that Material variant
5. Delete the middle Material variant (child to original) with "Delete Only": this will not reparent the child
Expected result: the Material variant gets deleted, an error indicating that a Material variant has no parent is thrown
Actual result: the Material variant gets deleted, Editor starts leaking memory, then crashes (the memory leak results in different behaviours further described in notes below (1-4))
Reproducible with: 2022.1.0b8, 2022.2.0a5
Not reproducible with: 2022.1.0b7
Could not test with 2019.3.36f1, 2020.3.29f1, 2021.2.12f1 (no option to create Material variant)
1. Sometimes a window appears when the Editor is using up the RAM called: Inspector.InitOrRebuild.
2. Sometimes the leak starts taking up all RAM available and it takes around 1 minute for RAM to be used up completely before the crash (in 64GB system, ~44GB allocated to Unity). I was able to reproduce this behaviour only once.
3. Sometimes the process gets stuck and all the available RAM will not be used but the Editor does not break out of this loop without external monitoring software that is able to force quit the application.
4. Sometimes the crash is almost instantaneous and the RAM does not get used up at all.
5. The issue is reproducible with SRP materials as well (tested HDRP Template with HDRP Lit)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- AudioManager.Update takes up significantly more CPU time when a big number of Audio Sources are stopped at one time
- [Linux] Editor doesn't build a project when "Install into source code 'build' folder" is enabled after switching projects
- [OpenXR][Vulkan][URP] MSAA does not work on Quest 1/2 builds when using URP + OpenXR + Vulkan
- UI Builder lacks visual feedback on reordering elements when Unity Editor is set to Light Theme
- Crash on core::StringStorageDefault<char>::assign when opening a project