Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.50f1
2022.3.61f1
6000.0.46f1
6000.1.0b14
6000.2.0a9
6000.3.0a1
Issue ID
UUM-78456
Regression
No
Editor freeze/out of memory when recompiling specific scripts
Reproduction steps:
1. Open the attached “ReproProj” project
2. Open the “Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play Mode
Expected result: The scripts are recompiled
Actual result: The Editor freezes
Reproducible with: 2021.3.50f1, 2022.3.61f1, 6000.0.46f1, 6000.1.0b14, 6000.2.0a9 (1f9e5cde43d1)
Reproducible on: macOS 14.6.1 (M1 Max), Windows 10
Not reproducible on: No other environment tested
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
Thank you for reporting a bug to Unity.
After investigating this bug, we found that the infinite hang is caused by the code in CutListComponent :
public void Recalculate()
{
CutListGenerator.partMax = partMax;
cutList = CutListGenerator.GetCutList(.....); //Edit serial value
}
private void OnValidate() //Called after serialization
{
update = false;
Recalculate();
}
In Recalculate, a new CutList array is assigned to cutList. This will trigger another serialization and call to OnValidate, which will assign a new array and so on.
Your "update = false;" line in the OnValidate method suggest that you are missing a "if(!update) return;" that would prevent this infinite loop.
Also, concerning the warning : Serialization depth limit 10 exceeded at 'SheetCutList.cuts'.
It can be resolved by adding a [NonSerialized] attribute in SheetCut l.15 :
[NonSerialized]
private SheetCutList allCuts;
To prevent a loss of context in the editor, we might try to serialize a private field so that we can restore its value after a domain reload.
In such cases, we test for recursive serialization, hence the warning.
Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the context or severity of this issue.