Search Issue Tracker

In Progress

Under Consideration for 6000.0.X

Votes

0

Found in

6000.0.20f1

Issue ID

UUM-80063

Regression

Yes

Trying to access destroyed UnityEditor.HostView after clicking "Fix now" on NormalMap settings

--

-

*Steps to reproduce:*
# Create a new URP project.
# Drag all the individual files in the attached Tree.zip to the Project view in the Editor.
# A NormalMap settings window will pop up. Click "Fix now".

*Actual results:* MissingReferenceException error appears. Detailed in notes.

*Expected results:* No errors.

*Reproducible with versions:* 6000.0.20f1, 6000.0.7f1

*Not reproducible with versions:* 6000.0.6f1, 2022.3.47f1, 2021.3.42f1

*Tested on (OS):* MacOS Sonoma 14.6.1

{*}Notes:{*}{*}{*}
{code:java}
MissingReferenceException: The object of type 'UnityEditor.HostView' 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:815)
UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/BindingsHelpers.cs:61)
UnityEditor.GUIView.GetBackingScaleFactor () (at <642f1e8612c54a1a810c9718ca7ddabc>:0)
UnityEditor.UIElements.EditorPanel.GetBackingScaleFactor (System.Object obj) (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/EditorPanel.cs:53)
UnityEditor.UIElements.EditorPanel.GetBackingScaleFactor () (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/EditorPanel.cs:46)
UnityEditor.UIElements.EditorPanel.CheckPanelScaling () (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/EditorPanel.cs:68)
UnityEditor.UIElements.EditorPanel.ValidateLayout () (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/EditorPanel.cs:86)
UnityEngine.UIElements.Panel.Pick (UnityEngine.Vector2 point) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:1227)
UnityEngine.UIElements.BaseVisualElementPanel.RecomputeTopElementUnderPointer (System.Int32 pointerId, UnityEngine.Vector2 pointerPos, UnityEngine.UIElements.EventBase triggerEvent) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:628)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToElementUnderPointerOrPanelRoot (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:499)
UnityEngine.UIElements.MouseEnterWindowEvent.Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/MouseEvents.cs:881)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:415)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:365)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:318)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:79)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:429)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:215)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:590)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:513)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:232)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:76)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:30)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219){code}

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.