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
- Multiple exceptions are thrown after exiting Play mode when Layout Group component is displayed in Debug Inspector and Padding section is expanded
- ScrollView elements are not restored to their original positions after removing a Layout Group with Undo action
- "Assembly with name already exists" errors are thrown when two packages with different technical names resolve to the same namespace
- A Select Scene Entry is added to Undo History when Deleting while a Scene is selected in the Hierarchy
- The Add Component Menu's back arrow accumulates phantom levels when the Menu is repeatedly opened into a Category and closed without selecting
Add comment