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
- "Rendering Debugger" displays incorrect overdraw count when using "Unlit/Texture" shader
- Scene and Game views break when the Editor window is snapped with the Microsoft PowerToys
- Materials do not transfer texture when the "Shader" parameter is changed from "Unlit/Texture" to "Universal Render Pipeline/Unlit"
- [Linux][Vulkan] Crash when opening searchable dialog
- The "Shader error in 'AE/Leaves': "Undefined punctual shadow filter algorithm"" error appears when build completes on a specific project
This is a duplicate of issue #1355141