Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2020.3.X, 2021.2.X
Votes
0
Found in
2018.4
2019.4
2020.3
2021.1
2021.1.3f1
2021.2
Issue ID
1338040
Regression
No
Editor crashes when PreviewRenderUtility.BeginPreview is not followed by PreviewRenderUtility.EndPreview
How to reproduce:
1. Open the user's attached "Handles don't receive input in custom preview scene.zip" project
2. Open the "MyEditorWindows.cs" script and uncomment line 38 ( //throw new Exception();)
3. In the Editor go to Bug -> My Editor Window
4. Open the "MyEditorWindows.cs" script and comment out the same line 38
5. Go back into the Editor
Expected result: No crash happens
Actual result: Editor crashes
Reproducible with: 2018.4.34f1, 2019.4.27f1, 2020.3.10f1, 2021.1.8f1, 2021.2.0a17
Update: the same issues without throwing that Exception. Setting `texture` to `null` before drawing still works, but commenting out "var texture = _PreviewRenderUtility.EndPreview();" (and again setting `texture` to `null`) again crashes the engine.
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
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a15
Resolution Note (fix version 2021.2):
Fixed in 2021.2.5f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.25f1