Search Issue Tracker
Fixed in 5.5.0
Votes
0
Found in
5.3.6p1
Issue ID
820976
Regression
No
Array, Lists and nested Behaviours: error message does not refer to the cause of the issue
Steps to reproduce the issue:
1. Open attached project.
2. Open scene named "Init".
3. In the "Hierarchy" window select game object named "Controller".
4. Add "Custom Behaviour (Script)" component if it is not already added.
5. Enter any positive value in the "Behaviour Count" field.
6. Delete that value.
7. Notice that this error message appears:
MissingReferenceException: The object of type 'SomeThirdBehaviour' 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.Editor.IsEnabled () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:587)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1151)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1027)
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:352)
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)
Actual result:
The error message dos not help to solve the problem, because it does not identify the line of code that tries to access destroyed object (double clicking on script to find the line that causes the issue does not work).
Expected result:
The error message should help to solve the problem by identifying the line of code that tries to access destroyed object (double clicking on script to find the line that causes the issue should work fine).
Reproduced with:
5.1.5f1, 5.2.5f1, 5.3.6p2, 5.4.0f3, 5.5.0a5.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment