Search Issue Tracker
Won't Fix
Won't Fix in 6000.3.X
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
- Console shows Exception: {"error":"not found","detail":["not found"]} after opening Build History window
- [HDRP] Volumetric cloud shadows disappear when there is no directional light shadows
- “Selector” column names in the Search window are lowercase when added
- Install List Project Counter Panel can be right clicked through and Install Context Menu can be opened disabling Project Counter Panel's buttons
- [MacOS] Scene is marked/flickering as dirty (with asterisk) when dragging a Material on a GameObject in Scene view
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.
Resolution Note (6000.3.X):
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.