Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.43k stars 310 forks source link

NullReferenceException when editing Input Actions asset #767

Closed m4ff closed 5 years ago

m4ff commented 5 years ago

Reproduced in Unity 2019.2.0f1, package version 0.9.1.

Steps:

Stack trace

NullReferenceException: Object reference not set to an instance of an object UnityEngine.InputSystem.Editor.PropertiesViewBase..ctor (System.String label, UnityEditor.SerializedProperty bindingOrAction, System.Action1[T] onChange, System.String expectedControlLayout) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/PropertiesViewBase.cs:21) UnityEngine.InputSystem.Editor.InputActionPropertiesView..ctor (UnityEditor.SerializedProperty actionProperty, System.Action1[T] onChange) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionPropertiesView.cs:22) UnityEngine.InputSystem.Editor.InputActionEditorWindow.LoadPropertiesForSelection () (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs:499) UnityEngine.InputSystem.Editor.InputActionEditorWindow.OnActionTreeSelectionChanged () (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs:423) UnityEngine.InputSystem.Editor.InputActionTreeView.SelectionChanged (System.Collections.Generic.IList1[T] selectedIds) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionTreeView.cs:359) UnityEditor.IMGUI.Controls.TreeViewController.NotifyListenersThatSelectionChanged () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:442) UnityEditor.IMGUI.Controls.TreeView.SetSelection (System.Collections.Generic.IList1[T] selectedIDs, UnityEditor.IMGUI.Controls.TreeViewSelectionOptions options) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewControl/TreeViewControl.cs:321) UnityEngine.InputSystem.Editor.InputActionTreeView.SelectFirstToplevelItem () (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionTreeView.cs:354) UnityEngine.InputSystem.Editor.InputActionEditorWindow.OnActionMapTreeSelectionChanged () (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs:397) UnityEngine.InputSystem.Editor.InputActionTreeView.SelectionChanged (System.Collections.Generic.IList1[T] selectedIds) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionTreeView.cs:359) UnityEditor.IMGUI.Controls.TreeViewController.NotifyListenersThatSelectionChanged () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:442) UnityEditor.IMGUI.Controls.TreeView.SetSelection (System.Collections.Generic.IList1[T] selectedIDs, UnityEditor.IMGUI.Controls.TreeViewSelectionOptions options) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewControl/TreeViewControl.cs:321) UnityEngine.InputSystem.Editor.InputActionTreeView.SelectItem (UnityEngine.InputSystem.Editor.ActionTreeItemBase item, System.Boolean additive) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionTreeView.cs:296) UnityEngine.InputSystem.Editor.InputActionTreeView.SelectItemAndBeginRename (UnityEditor.SerializedProperty property) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionTreeView.cs:1016) UnityEngine.InputSystem.Editor.InputActionTreeView.OnNewItemAdded (UnityEditor.SerializedProperty property) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionTreeView.cs:1002) UnityEngine.InputSystem.Editor.InputActionTreeView.AddNewActionMap () (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionTreeView.cs:945) UnityEngine.InputSystem.Editor.InputActionTreeView.DrawHeader (UnityEngine.Rect& rect) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionTreeView.cs:1099) UnityEngine.InputSystem.Editor.InputActionTreeView.OnGUI (UnityEngine.Rect rect) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionTreeView.cs:1044) UnityEngine.InputSystem.Editor.InputActionEditorWindow.DrawColumnWithTreeView (UnityEditor.IMGUI.Controls.TreeView treeView, System.Single width, System.Boolean fixedWidth) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs:630) UnityEngine.InputSystem.Editor.InputActionEditorWindow.DrawActionMapsColumn (System.Single width) (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs:612) UnityEngine.InputSystem.Editor.InputActionEditorWindow.OnGUI () (at Library/PackageCache/com.unity.inputsystem@0.9.1-preview/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs:573) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:359) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:353) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:329) UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:374) UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:341) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:298) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:483) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:466) UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:447) UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:93) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280) UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156) UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:190) UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:255) UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

m4ff commented 5 years ago

Seems to be fixed in version 0.9.2