Search Issue Tracker

Fixed

Fixed in 2023.1.0b18, 2023.2.0a15

Votes

0

Found in

2023.1.0b10

2023.2.0a9

Issue ID

UUM-31969

Regression

Yes

"MissingReferenceException: The object of type 'UnityEditor.Search.SearchQueryAsset' has been destroyed but you are still trying to access it." error displayed in the "Console" after asset creation in the Search window

--

-

Steps to reproduce:
# Create a 3D project
# Add any 3D game object for example "Cube"
# Go to the "Window" menu and select "Search" ->"New Window"
# In the "Search" window click the "Inspector" button and verify that the "Inspector" section becomes visible
# Type "Cube" into the search input section and click "Enter"
# Verify, that the results list for the "Cube" is displayed
# Clean the "Cube" search criteria and enter AAA and click "Enter
# Verify, that you get "No results found for AAA"
# Still, click "Discette" next to the search input field
# Select the "Save Project" option
# Leave the proposed default name and click "Save"
# Verify, that the saved query becomes displayed in the "Project" section
# Verify, that AAA.asset is displayed in the "All" tab
# Close the Search window and open it again
# Select AAA.asset in All section
# Verify, that the "Inspector" tab displays its data
# Click the kebab button next to the "Open" button in the "Inspector" tab
# Select "Delete"
# Confirm the action in the Delete popup
# Observe how data changes in the "Search" window
# AAA query is still displayed in the "Project" list and  AAA.asset with its size displayed in the "Inspector" tab (added screenshot in the Attachments section)
# Doubleclick on the AAA query, which still is displayed in the "Project" list
# Observe console

 

Expected result: AAA query and AAA.asset both should be removed after the deletion (step 19) without the errors.

Actual result:  AAA query is displayed and after selecting it, the console displays errors. Added video in the "Attachments" section.

 

Reproducible with: 2023.1.0a15, 2023.1.0b10, 2023.2.0a9.

Not reproducible with:  2023.1.0a14, 2022.2.13f1, 2021.3.22f1, 2020.3.46f1 (this stream has no this window).

 

Error:

MissingReferenceException: The object of type 'UnityEditor.Search.SearchQueryAsset' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object+MarshalledUnityObject.TryThrowEditorNullExceptionObject (UnityEngine.Object unityObj, System.String parameterName) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:696)
UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/BindingsHelpers.cs:47)
UnityEngine.Object.SetName (System.String name) (at <25ffc17b513f413da6b3fe6006a1d6d5>:0)
UnityEngine.Object.set_name (System.String value) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:212)
UnityEditor.Search.SearchProjectQueryListViewItemHandler.RenameQuery (UnityEditor.Search.ISearchQuery query, UnityEditor.Search.SearchQueryListViewItem item, System.String newName) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/SearchQueryListView.cs:117)
UnityEditor.Search.SearchQueryListViewItem.HandleRenameFinished (System.String newName) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/SearchQueryListView.cs:177)
UnityEditor.Search.RenamableLabel.SendRenameFinishedEvent () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/RenamableLabel.cs:75)
UnityEditor.Search.RenamableLabel.AcceptRename (System.String newName) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/RenamableLabel.cs:70)
UnityEditor.Search.RenamableLabel.HandleBlurEvent (UnityEngine.UIElements.BlurEvent evt) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/RenamableLabel.cs:58)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/EventCallback.cs:67)
UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/EventCallbackRegistry.cs:206)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPath (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/EventDispatchUtilities.cs:183)
UnityEngine.UIElements.EventDispatchUtilities.DefaultDispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/EventDispatchUtilities.cs:564)
UnityEngine.UIElements.EventBase.Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/EventBase.cs:110)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:336)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:291)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:255)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:78)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:346)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:200)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Panel.cs:550)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:497)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:225)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:28)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:196)

  1. Resolution Note (fix version 2023.2.0a15):

    Verified with:
    2023.2.0a15.2253.2683
    Revision: trunk e4d2a7e41f40
    Built: Tue, 09 May 2023 02:23:23 GMT

  2. Resolution Note (fix version 2023.1.0b18):

    Verified with:
    2023.1.0b18.3067.5283
    Revision: 2023.1/staging 5823d77fe92a
    Built: Wed, 17 May 2023 02:16:47 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.