Search Issue Tracker
Fixed in 2019.3.X
Votes
0
Found in
2019.2.0a11
2019.3.0a1
Issue ID
1171833
Regression
Yes
[Scripting] Argument exception is thrown on right-clicking a gameObject with missing script instance
"ArgumentException: Object at index 0 is null" exception is thrown on right-clicking a gameObject with missing script instance. Refer to the attached video.
Steps to reproduce:
1) Create a new project.
2) Main Camera > Add component > New script > Create and add.
3) Delete the script from the project.
4) Select Main Camera > Right-click on the missing script instance
Actual result: Argument exception is thrown in console.
Expected result: No exception is thrown in console.
Occurring in: 2019.3.0a11, 2019.2.0f1, 2019.2.0a11
Working fine in: 2019.2.0a10
Environment: Both Windows and Mac.
Stack trace:
ArgumentException: Object at index 0 is null
UnityEditor.SerializedObject.GetType () (at C:/buildslave/unity/build/Editor/Mono/SerializedObject.bindings.cs:34)
UnityEditor.EditorGUI.FillPropertyContextMenu (UnityEditor.SerializedProperty property, UnityEditor.SerializedProperty linkedProperty, UnityEditor.GenericMenu menu) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:2367)
UnityEditor.EditorGUI.DoPropertyContextMenu (UnityEditor.SerializedProperty property, UnityEditor.SerializedProperty linkedProperty, UnityEditor.GenericMenu menu) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:2468)
UnityEditor.EditorGUI.EndProperty () (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:5654)
UnityEditor.EditorGUI.DefaultPropertyField (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6334)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:149)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:106)
UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:208)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9355)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9339)
UnityEditor.GenericInspector.MissingMonoBehaviourGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GenericInspector.cs:137)
UnityEditor.GenericInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GenericInspector.cs:197)
UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:479)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Joint Physics result in unexpected behaviors when used for articulated vehicles like buses or trucks
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts which worked with TMP Font Asset Creator
Add comment