Search Issue Tracker
Fixed in 2017.2.X
Votes
0
Found in
2017.1.0b1
Issue ID
900668
Regression
Yes
[Regression] MissingReferenceException after deleting duplicated Terrain gameobject
Steps to repro:
1. Open attached project and 't1' scene;
2. Select 'New Terrain 1' asset file in Project view's Assets folder;
3. Press Ctrl + D (cmd + D on Mac) to duplicate terrain asset file;
4. Drag duplicated terrain asset file to the scene view;
5. Quickly move new duplicated gameobject in Scene view by using transform gizmos and press Delete keyboard button.
Actual result:
Error:
MissingReferenceException: The object of type 'Terrain' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEditor.TerrainInspector.OnSceneGUICallback (UnityEditor.SceneView sceneView) (at C:/buildslave/unity/build/Editor/Mono/TerrainEditor/TerrainInspector.cs:1803)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2397)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1715)
UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1585)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
is shown in the console. See attached video.
Regression introduced in Unity 5.6.0.
Expected result:
No errors are shown after deleting duplicated terrain gameobject.
Notes:
- Reproducible in 2017.1.0b1, 2017.1.0a6, 5.6.0f3;
- Not reproducible in 5.5.2p1;
- Reproducible on both OSX 10.12.3 and Windows 10;
- The bug is reproducible only when quickly moving duplicated terrain with scene view gizmos and deleting it afterwards;
- On OSX additional error is shown after doing abovementioned actions: 'Assertion failed: Assertion failed on expression: '!dest.m_MultiFrameGUIState.m_NamedKeyControlList''.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
Add comment