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
- A 404 page is opened when selecting "Open Documentation" on the Float Node in Shader Graph
- Shader Graph Importer's Documentation Reference button leads to a 404 page
- Crash on WriteParticleLineVertex when particle systems are rendered in a specific project
- Asset names longer than the allowed system file path are not handled gracefully
- Moving VFX Particles leave a ghosting trial in Ray Traced Screen Space Reflections
Add comment