Search Issue Tracker
Duplicate
Votes
3
Found in
2019.2
2019.3
2019.3.0f6
2020.1
Issue ID
1215840
Regression
No
Editor freezes on script recompilation when a custom window is open and it has a reference to a Serializable VisualElement class
How to reproduce:
1. Open the attached 'project-1215840.zip' project
2. In the Editor select 'Bug' > 'Bug_Test'
3. Make a change in 'Bug_Test.cs' script and click on the Editor to recompile scripts
4. Try clicking anywhere in the Editor or resize the 'NewUI' window (only the top tool-bar is responsive)
Expected result: Editor does not freeze
Actual result: Editor freezes indefinitely
Reproducible with: 2019.2.21f1, 2019.3.1f1,  2019.4.9f, 2020.1.0a23, 2020.2.0b1
Could not test with: 2017.4.37f1, 2018.4.17f1 (UI Elements not available)
Note: the custom window includes a property that derives from VisualElement. During assembly reload that property is serialized, even though it is private. This puts the window into a bad state freezing the editor. Putting the [System.NonSerialized] attribute on the property avoids the freeze by making sure it is never serialized during assembly reload.
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
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- Addressables Profiles and Analyze windows no minimum window size
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
This is a duplicate of issue #1355141