Search Issue Tracker
Fixed
Fixed in 2022.3.14f1, 2023.1.20f1, 2023.2.0b18, 2023.3.0a14
Votes
0
Found in
2022.3.7f1
2023.1.8f1
2023.2.0b4
2023.3.0a1
Issue ID
UUM-45896
Regression
Yes
[Inspector] NullReferenceException on serialized classes in an array can break interaction with the Inspector
This problem can render the inspector mostly unresponsive until you click off the game object.
*Repro:*
1. Create a new project.
2. Import attached Repro.cs script.
3. Create an empty GameObject in hierarchy and add Repro.cs as a component.
4. Add two items to the Sound Clips array.
5. Remove two items from the Sound Clips array.
6. Add an item to the Sound Clips array.
*Expected:* No visual issues.
*Actual:* The item in Step 6 is empty.
7. Click and drag the empty item.
*Extended Issue:* Much of the inspector will throw NullReferenceExceptions when you click on it, and is unresponsive until you select another item to display in the inspector. (This also fixes the NullReferenceExceptions and the missing item)
See error details below.
Reproducible in: 2023.2.0b4
Not Reproducible in: 2023.1.0a1, 2022.3.7f1, 2021.3.29f1
Marking as a regression. Did not regression test further, please contact the ticket reporter if you need this done.
Notes:
- Tested on Windows 10
- See attachments for video of this occurring.
- See also UUM-45890 for another error visible in the video.
{code:java}
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.ListViewDraggerAnimated.OnDrop (UnityEngine.Vector3 pointerPosition) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.DragEventsProcessor.OnPointerUpEvent (UnityEngine.UIElements.PointerUpEvent evt) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEvent_TrickleDownCallbacks (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement element) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPathWithCompatibilityEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.EventBase compatibilityEvt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElement (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.PointerEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <aa3ec7e2ca8b4084bec2604d78034962>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <12925959293b4620817a59e0f861a519>:0){code}
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Add comment