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
- Context menu actions (Collapse All, Expand All, Enable All, Disable All, Remove All, Reset All) do nothing in Volume component
- [Android] Audio volume decreases when returning to the app during screen recording
- Graphical issues are caused by GPU Occlusion Culling when using Amplify Shaders
- ”Last item reached” warning is thrown when no search results are found in UI Toolkit Layout Debugger
- UI Elements overlap in the Shortcuts window when docked and resized to a smaller window size
Add comment