Search Issue Tracker

Fixed

Fixed in 2023.1.0b9, 2023.2.0a6

Votes

0

Found in

2023.1.0b3

Issue ID

UUM-26279

Regression

No

Console displays error "ObjectDisposedException: SerializedProperty m_DefaultPresets.Array.data[0].second.Array.data[0].m_Preset has disappeared!" when user removes preset from default component view and closes "Select Preset" window

-

Steps to reproduce:

  1. Create a project
  2. Add 3D game object
  3. Go to "Inspector" tab
  4. Find "Mesh Renderer" component
  5. In "Materials" field enter 2 and click enter
  6. Verify, that elements become displayed in the mentioned section
  7. Click "Preset" icon
  8. In Preset section click "Create New MeshRenderer Preset..."
  9. Enter name and save it
  10. Again click preset icon in "Mesh Renderer" component
  11. Select created preset in "Project" section
  12. Verify, that preset data becomes displayed in the "Inspector" section in the "Select Preset" window
  13. Click "Add to MeshRenderer default" button
  14. Go to "Edit" menu and select "Project Settings"
  15. Click "Add Default Preset" button
  16. Find "Mesh Renderer" component
  17. In Preset section click on "Select Preset" icon
  18. In displayed "Select Preset" window select created preset
  19. Find and click "Remove from MeshRenderer default" button
  20. Close "Select Preset" window by clicking window "X"

 

Expected result: Preset should be removed. Window should be closed. No errors in the console.

Actual result:  Console displays error "ObjectDisposedException: SerializedProperty m_DefaultPresets.Array.data[0].second.Array.data[0].m_Preset has disappeared!". Screenshot and video added in the "Attachments" section.

Reproducible with: 2023.1.0.a17, 2023.1.0b3
Not reproducible with:

  • 2022.2.6f1 (this stream has old UI)

2021.3.18f1 (this one has more older UI)
h4.  Error:

ObjectDisposedException: SerializedProperty m_DefaultPresets.Array.data[0].second.Array.data[0].m_Preset has disappeared!
UnityEditor.SerializedProperty.set_objectReferenceValue (UnityEngine.Object value) (at /Users/bokken/build/output/unity/unity/Editor/Mono/SerializedProperty.bindings.cs:1244)
UnityEditor.Presets.PresetSelector.ApplyValues (UnityEditor.Presets.PresetContext& presetContext, UnityEditor.Presets.Preset selection) (at /Users/bokken/build/output/unity/unity/Modules/PresetsUIEditor/PresetSelector.cs:327)
UnityEditor.Presets.PresetSelector.OnPresetSelected (UnityEditor.Presets.PresetContext& presetContext, UnityEditor.Presets.Preset selection, System.Boolean canceled) (at /Users/bokken/build/output/unity/unity/Modules/PresetsUIEditor/PresetSelector.cs:292)
UnityEditor.Presets.PresetSelector+<>c__DisplayClass31_0.<ShowSelector>b__1 (UnityEditor.Search.SearchItem item, System.Boolean canceled) (at /Users/bokken/build/output/unity/unity/Modules/PresetsUIEditor/PresetSelector.cs:239)
UnityEditor.Search.SearchWindow.OnDisable () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/SearchWindow.cs:539)
UnityEditor.Search.SearchPickerWindow.OnDisable () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UI/SearchPickerWindow.cs:29)
UnityEditor.ContainerWindow:InternalCloseWindow() (at /Users/bokken/build/output/unity/unity/Editor/Mono/ContainerWindow.cs:350)

  1. Resolution Note (fix version 2023.2.0a6):

    Verified with:
    2023.2.0a6.452.4021
    Revision: trunk 5de4d4fd9e52
    Built: Wed, 08 Mar 2023 01:22:58 GMT

  2. Resolution Note (fix version 2023.1.0b9):

    Verified with:
    2023.1.0b9.3067.2625
    Revision: 2023.1/staging 824d2f8c920d
    Built: Wed, 15 Mar 2023 02:38:28 GM

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.