Search Issue Tracker

Fixed in 2022.3.12f1

Fixed in 2023.3.0a10

Votes

0

Found in

2023.2.0b10

2023.3.0a7

Issue ID

UUM-52048

Regression

No

NullReferenceException: SerializedObject errors after altering SO

IMGUI Framework

-

How to reproduce:

  1. Download and open [https://github.cds.internal.unity3d.com/unity/rqa-project-nebula/tree/so-errors]
  2. Open Level1 scene
  3. In Project view find and open "NPCChatData.asset" in Inpector
  4. Expand Element 0 > Chat Items
  5. Enter Play Mode
  6. Notice the Chat Items list ends up with just 1 item
  7. Click + sign to add new item
  8. Exit Play Mode
  9. Observe Console

Expected result: SO returning to the previous state(Chat Items to full list - restarting the editor it does) and no errors

Actual result: SO stays altered in Inspector after leaving Play Mode and errors start spamming in Console while the SO is selected

Errors:

`NullReferenceException: SerializedObject of SerializedProperty has been Disposed.
UnityEditor.SerializedProperty.get_objectReferenceInstanceIDValue () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SerializedProperty.bindings.cs:1427)
UnityEditor.EditorGUIUtility.ObjectContent (UnityEngine.Object obj, System.Type type, UnityEditor.SerializedProperty property, UnityEditor.EditorGUI+ObjectFieldValidator validator) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUIUtility.cs:1003)
UnityEditor.UIElements.ObjectField+ObjectFieldDisplay.Update () (at /Users/bokken/build/output/unity/unity/Editor/Mono/UIElements/Controls/ObjectField.cs:182)
UnityEditor.UIElements.ObjectField.UpdateDisplay () (at /Users/bokken/build/output/unity/unity/Editor/Mono/UIElements/Controls/ObjectField.cs:132)
UnityEngine.UIElements.VisualElement+SimpleScheduledItem.PerformTimerUpdate (UnityEngine.UIElements.TimerState state) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/VisualElementScheduler.cs:346)
UnityEngine.UIElements.TimerEventScheduler.UpdateScheduledEvents () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Scheduler.cs:363)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.UpdateSchedulers () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:273)
UnityEngine.UIElements.UIEventRegistration.UpdateSchedulers () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:105)
UnityEditor.RetainedMode.UpdateSchedulers () (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/RetainedMode.cs:55)`

 

Reproduced with: 2023.2.0b11, 2023.3.0a7 on MacOS 13.6

Could not downgrade the project to test earlier versions

  1. Resolution Note (fix version 2022.3.12f1):

  2. Resolution Note (fix version 2023.3.0a10):

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.