yasirkula / UnityRuntimeInspector

Runtime Inspector and Hierarchy solution for Unity for debugging and runtime editing purposes
MIT License
1.67k stars 135 forks source link

NullReferenceException using Hierarchy Search #54

Open msamora-supernatural opened 5 months ago

msamora-supernatural commented 5 months ago

Description of the bug

Changes to search field did not update the view.

Reproduction steps

Search for something (one time repro)

Platform specs

Please provide the following info if this is a Unity 3D repository.

Additional info

Errors in the order they were reported `NullReferenceException Object reference not set to an instance of an object.

<00000000000000000000000000000000> RuntimeInspectorNamespace.HierarchyData.FindDataAtIndex(System.Int32 index) <00000000000000000000000000000000> RuntimeInspectorNamespace.RuntimeHierarchy.GetDataAt(System.Int32 index) <00000000000000000000000000000000> RuntimeInspectorNamespace.RuntimeHierarchy.RuntimeInspectorNamespace.IListViewAdapter.SetItemContent(RuntimeInspectorNamespace.RecycledListItem item) <00000000000000000000000000000000> RuntimeInspectorNamespace.RecycledListView.UpdateItemContentsBetweenIndices(System.Int32 topIndex, System.Int32 bottomIndex) <00000000000000000000000000000000> RuntimeInspectorNamespace.RecycledListView.UpdateItemsInTheList(System.Boolean updateAllVisibleItems) <00000000000000000000000000000000> UnityEngine.Events.UnityEvent'1[T0].Invoke(T0 arg0) <00000000000000000000000000000000> UnityEngine.UI.ScrollRect.LateUpdate()` `ArgumentOutOfRangeException Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index <00000000000000000000000000000000> System.Collections.Generic.List'1[T].get_Item(System.Int32 index) <00000000000000000000000000000000> RuntimeInspectorNamespace.HierarchyData.FindDataAtIndex(System.Int32 index) <00000000000000000000000000000000> RuntimeInspectorNamespace.RuntimeHierarchy.GetDataAt(System.Int32 index) <00000000000000000000000000000000> RuntimeInspectorNamespace.RuntimeHierarchy.RuntimeInspectorNamespace.IListViewAdapter.SetItemContent(RuntimeInspectorNamespace.RecycledListItem item) <00000000000000000000000000000000> RuntimeInspectorNamespace.RecycledListView.UpdateItemContentsBetweenIndices(System.Int32 topIndex, System.Int32 bottomIndex) <00000000000000000000000000000000> RuntimeInspectorNamespace.RecycledListView.UpdateItemsInTheList(System.Boolean updateAllVisibleItems) <00000000000000000000000000000000> UnityEngine.Events.UnityEvent'1[T0].Invoke(T0 arg0) <00000000000000000000000000000000> UnityEngine.UI.ScrollRect.LateUpdate()` `NullReferenceException Object reference not set to an instance of an object. <00000000000000000000000000000000> RuntimeInspectorNamespace.HierarchyField.RefreshName() <00000000000000000000000000000000> RuntimeInspectorNamespace.RuntimeHierarchy.Update()` `NullReferenceException Object reference not set to an instance of an object. <00000000000000000000000000000000> RuntimeInspectorNamespace.HierarchyField.Refresh() <00000000000000000000000000000000> RuntimeInspectorNamespace.RuntimeHierarchy.Refresh() <00000000000000000000000000000000> RuntimeInspectorNamespace.RuntimeHierarchy.Update()` `NullReferenceException Object reference not set to an instance of an object. <00000000000000000000000000000000> RuntimeInspectorNamespace.RuntimeHierarchy.RuntimeInspectorNamespace.IListViewAdapter.OnItemClicked(RuntimeInspectorNamespace.RecycledListItem item) <00000000000000000000000000000000> UnityEngine.EventSystems.ExecuteEvents.Execute[T](UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction'1[T1] functor) <00000000000000000000000000000000> UnityEngine.XR.Interaction.Toolkit.UI.UIInputModule.ProcessPointerButton(UnityEngine.XR.Interaction.Toolkit.UI.ButtonDeltaState mouseButtonChanges, UnityEngine.EventSystems.PointerEventData eventData) <00000000000000000000000000000000> UnityEngine.XR.Interaction.Toolkit.UI.UIInputModule.ProcessTrackedDevice(UnityEngine.XR.Interaction.Toolkit.UI.TrackedDeviceModel& deviceState, System.Boolean force) <00000000000000000000000000000000> UnityEngine.XR.Interaction.Toolkit.UI.XRUIInputModule.DoProcess()`
yasirkula commented 5 months ago

Is the source code modified in any way that may have caused this issue? Did you register to hierarchy's GameObjectFilter? Is this issue always reproducible and does it still occur if you set Refresh Interval to 0?