Search Unity

Bug Help with a red warning "Resolve of invalid GC handle" (UNRESOLVED)

Discussion in 'Editor & General Support' started by Brother_77, Sep 20, 2022.

  1. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
    Hi, I recently did 2 new things and started getting an error that I have no idea how to get rid of? Maybe it is not even connected to these but:

    I updated to Unity 2020.3.39 and tried out the built in screenshot capture with the code below (I got rid of this script and the error is still there):

    Code (CSharp):
    1. #if UNITY_EDITOR
    2. using UnityEditor;
    3. using UnityEngine;
    4. public class ScreenshotGrabber
    5. {
    6.     [MenuItem("Screenshot/Grab")]
    7.     public static void Grab()
    8.     {
    9.         ScreenCapture.CaptureScreenshot("Screenshot.png", 1);
    10.     }
    11. }
    12. #endif

    and now the error warning stacktrace:

    Resolve of invalid GC handle. The handle is from a previous domain. The resolve operation is skipped.
    0x00007ff69e98b90c (Unity) StackWalker::GetCurrentCallstack
    0x00007ff69e992f09 (Unity) StackWalker::ShowCallstack
    0x00007ff69f72a09c (Unity) GetStacktrace
    0x00007ff6a019aef7 (Unity) DebugStringToFile
    0x00007ff6a019ac12 (Unity) AssertImplementation
    0x00007ff69decb436 (Unity) IMGUI::DoWindow
    0x00007ff69e08f170 (Unity) GUI_CUSTOM_Internal_DoWindow_Injected
    0x00000247f8917ea3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GUI:Internal_DoWindow_Injected (int,int,UnityEngine.Rect&,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,object,bool,UnityEngine.Rect&)
    0x00000247f8917d7b (Mono JIT Code) UnityEngine.GUI:Internal_DoWindow (int,int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,object,bool)
    0x00000247f8917cab (Mono JIT Code) UnityEngine.GUI:DoWindow (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,UnityEngine.GUISkin,bool)
    0x00000247f8917bdb (Mono JIT Code) UnityEngine.GUI:Window (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle)
    0x00000247f89179eb (Mono JIT Code) UnityEngine.GUILayout:DoWindow (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,UnityEngine.GUILayoutOption[])
    0x00000247f8917813 (Mono JIT Code) UnityEngine.GUILayout:Window (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,string,UnityEngine.GUIStyle,UnityEngine.GUILayoutOption[])
    0x00000247f89176f3 (Mono JIT Code) UnityEditor.SceneViewOverlay:End ()
    0x00000247f88be54b (Mono JIT Code) UnityEditor.SceneView:OnGUI ()
    0x00000247f5c970d3 (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect,UnityEngine.Rect)
    0x00000247f5c96e83 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect,UnityEngine.Rect)
    0x00000247f5c8ba83 (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
    0x00000247f5c71fc0 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
    0x00000247f5c71153 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
    0x00000247f886e5b3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint ()
    0x00000247f886badb (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&)
    0x00000247f8869fcb (Mono JIT Code) UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Material,UnityEngine.Material,UnityEngine.Texture,UnityEngine.Texture,UnityEngine.Texture,single,Unity.Collections.NativeSlice`1<UnityEngine.UIElements.UIR.Transform3x4>,Unity.Collections.NativeSlice`1<UnityEngine.Vector4>,UnityEngine.MaterialPropertyBlock,bool,System.Exception&)
    0x00000247f88656e3 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChain:Render ()
    0x00000247f8851d43 (Mono JIT Code) UnityEngine.UIElements.UIRRepaintUpdater:Update ()
    0x00000247f5c523ae (Mono JIT Code) UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase)
    0x00000247f885150b (Mono JIT Code) UnityEngine.UIElements.Panel:UpdateForRepaint ()
    0x00000247f8851173 (Mono JIT Code) UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event)
    0x00000247f5c51c77 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    0x00000247f5c519cb (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
    0x00000247f5c517cf (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:processEvent (int,intptr)
    0x00000247f5c5170b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
    0x00000247f5c5156d (Mono JIT Code) UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
    0x00000247f5c5161e (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
    0x00007ffa952800e0 (mono-2.0-bdwgc) [mini-runtime.c:2849] mono_jit_runtime_invoke
    0x00007ffa95202ac2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    0x00007ffa9520bb1f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    0x00007ff69e8cfed4 (Unity) scripting_method_invoke
    0x00007ff69e8cafd1 (Unity) ScriptingInvocation::Invoke
    0x00007ff69e8c4d95 (Unity) ScriptingInvocation::Invoke<void>
    0x00007ff69db7b7fa (Unity) Scripting::UnityEngine::GUIUtilityProxy::processEvent
    0x00007ff69f1f27b8 (Unity) GUIView::processRetainedMode
    0x00007ff69f761652 (Unity) GUIView::OnInputEvent
    0x00007ff69f1f26a8 (Unity) GUIView::processInputEvent
    0x00007ff69f75a7d2 (Unity) GUIView::DoPaint
    0x00007ff69f76438d (Unity) GUIView::RepaintAll
    0x00007ff69f2bfa97 (Unity) PlayerLoopController::UpdateScene
    0x00007ff69f2aa4e2 (Unity) PlayerLoopController::EnterPlayMode
    0x00007ff69f2baef0 (Unity) PlayerLoopController::SetIsPlaying
    0x00007ff69f2bcf69 (Unity) Application::TickTimer
    0x00007ff69f730551 (Unity) MainMessageLoop
    0x00007ff69f7346f1 (Unity) WinMain
    0x00007ff6a0df2aae (Unity) __scrt_common_main_seh
    0x00007ffaeb547034 (KERNEL32) BaseThreadInitThunk
    0x00007ffaed4c26a1 (ntdll) RtlUserThreadStart
     
  2. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
  3. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
    Again this error but was not using Screenshot functionality, just editing prefabs...
    (Still on 2020.3.39)
    Stack trace:

    Resolve of invalid GC handle. The handle is from a previous domain. The resolve operation is skipped.
    0x00007ff743f3b90c (Unity) StackWalker::GetCurrentCallstack
    0x00007ff743f42f09 (Unity) StackWalker::ShowCallstack
    0x00007ff744cda09c (Unity) GetStacktrace
    0x00007ff74574aef7 (Unity) DebugStringToFile
    0x00007ff74574ac12 (Unity) AssertImplementation
    0x00007ff74347b436 (Unity) IMGUI::DoWindow
    0x00007ff74363f170 (Unity) GUI_CUSTOM_Internal_DoWindow_Injected
    0x000001df8281f313 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GUI:Internal_DoWindow_Injected (int,int,UnityEngine.Rect&,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,object,bool,UnityEngine.Rect&)
    0x000001df8281f1eb (Mono JIT Code) UnityEngine.GUI:Internal_DoWindow (int,int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,object,bool)
    0x000001df8281f11b (Mono JIT Code) UnityEngine.GUI:DoWindow (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,UnityEngine.GUISkin,bool)
    0x000001df8281f04b (Mono JIT Code) UnityEngine.GUI:Window (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle)
    0x000001df8281ee5b (Mono JIT Code) UnityEngine.GUILayout:DoWindow (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,UnityEngine.GUILayoutOption[])
    0x000001df8281ec83 (Mono JIT Code) UnityEngine.GUILayout:Window (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,string,UnityEngine.GUIStyle,UnityEngine.GUILayoutOption[])
    0x000001df8281eb63 (Mono JIT Code) UnityEditor.SceneViewOverlay:End ()
    0x000001df827e1e5b (Mono JIT Code) UnityEditor.SceneView:OnGUI ()
    0x000001df817dded3 (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect,UnityEngine.Rect)
    0x000001df817ddc83 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect,UnityEngine.Rect)
    0x000001df817d34c3 (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
    0x000001df81790870 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
    0x000001e05b14df43 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
    0x000001e05b14c7d3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint ()
    0x000001e05b14978b (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&)
    0x000001e05b1479ab (Mono JIT Code) UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Material,UnityEngine.Material,UnityEngine.Texture,UnityEngine.Texture,UnityEngine.Texture,single,Unity.Collections.NativeSlice`1<UnityEngine.UIElements.UIR.Transform3x4>,Unity.Collections.NativeSlice`1<UnityEngine.Vector4>,UnityEngine.MaterialPropertyBlock,bool,System.Exception&)
    0x000001e05b142b43 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChain:Render ()
    0x000001e05b12de43 (Mono JIT Code) UnityEngine.UIElements.UIRRepaintUpdater:Update ()
    0x000001df81711d0e (Mono JIT Code) UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase)
    0x000001e05b11074b (Mono JIT Code) UnityEngine.UIElements.Panel:UpdateForRepaint ()
    0x000001e05b110223 (Mono JIT Code) UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event)
    0x000001e05b10f777 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    0x000001e05b10f48b (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
    0x000001e05b10f2af (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:processEvent (int,intptr)
    0x000001e05b10f1cb (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
    0x000001e05b10f02d (Mono JIT Code) UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
    0x000001e05b10f0de (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
    0x00007ff9abec00e0 (mono-2.0-bdwgc) [mini-runtime.c:2849] mono_jit_runtime_invoke
    0x00007ff9abe42ac2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    0x00007ff9abe4bb1f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    0x00007ff743e7fed4 (Unity) scripting_method_invoke
    0x00007ff743e7afd1 (Unity) ScriptingInvocation::Invoke
    0x00007ff743e74d95 (Unity) ScriptingInvocation::Invoke<void>
    0x00007ff74312b7fa (Unity) Scripting::UnityEngine::GUIUtilityProxy::processEvent
    0x00007ff7447a27b8 (Unity) GUIView::processRetainedMode
    0x00007ff744d11652 (Unity) GUIView::OnInputEvent
    0x00007ff7447a26a8 (Unity) GUIView::processInputEvent
    0x00007ff744d0a7d2 (Unity) GUIView::DoPaint
    0x00007ff744d1438d (Unity) GUIView::RepaintAll
    0x00007ff74486fa97 (Unity) PlayerLoopController::UpdateScene
    0x00007ff74486dac9 (Unity) Application::TickTimer
    0x00007ff744ce0551 (Unity) MainMessageLoop
    0x00007ff744ce46f1 (Unity) WinMain
    0x00007ff7463a2aae (Unity) __scrt_common_main_seh
    0x00007ff9efb57034 (KERNEL32) BaseThreadInitThunk
    0x00007ff9f06026a1 (ntdll) RtlUserThreadStart
     
  4. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
    Still this error on Unity 2020.3.40

    Resolve of invalid GC handle. The handle is from a previous domain. The resolve operation is skipped.
    0x00007ff753fdc4cc (Unity) StackWalker::GetCurrentCallstack
    0x00007ff753fe3ac9 (Unity) StackWalker::ShowCallstack
    0x00007ff754d7ad5c (Unity) GetStacktrace
    0x00007ff7557eb677 (Unity) DebugStringToFile
    0x00007ff7557eb392 (Unity) AssertImplementation
    0x00007ff75351b436 (Unity) IMGUI::DoWindow
    0x00007ff7536df370 (Unity) GUI_CUSTOM_Internal_DoWindow_Injected
    0x0000018e029c6d93 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GUI:Internal_DoWindow_Injected (int,int,UnityEngine.Rect&,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,object,bool,UnityEngine.Rect&)
    0x0000018e029c6c6b (Mono JIT Code) UnityEngine.GUI:Internal_DoWindow (int,int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,object,bool)
    0x0000018e029c6b9b (Mono JIT Code) UnityEngine.GUI:DoWindow (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,UnityEngine.GUISkin,bool)
    0x0000018e029c6acb (Mono JIT Code) UnityEngine.GUI:Window (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle)
    0x0000018e029c68db (Mono JIT Code) UnityEngine.GUILayout:DoWindow (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,UnityEngine.GUIContent,UnityEngine.GUIStyle,UnityEngine.GUILayoutOption[])
    0x0000018e029c6703 (Mono JIT Code) UnityEngine.GUILayout:Window (int,UnityEngine.Rect,UnityEngine.GUI/WindowFunction,string,UnityEngine.GUIStyle,UnityEngine.GUILayoutOption[])
    0x0000018e029c65e3 (Mono JIT Code) UnityEditor.SceneViewOverlay:End ()
    0x0000018e0296d4fb (Mono JIT Code) UnityEditor.SceneView:OnGUI ()
    0x0000018e0165c403 (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect,UnityEngine.Rect)
    0x0000018e0165c1b3 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect,UnityEngine.Rect)
    0x0000018e01650bf3 (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
    0x0000018e01636860 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
    0x0000018e016359f3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
    0x0000018e0290d4e3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint ()
    0x0000018e0290aa0b (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&)
    0x0000018e02908efb (Mono JIT Code) UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Material,UnityEngine.Material,UnityEngine.Texture,UnityEngine.Texture,UnityEngine.Texture,single,Unity.Collections.NativeSlice`1<UnityEngine.UIElements.UIR.Transform3x4>,Unity.Collections.NativeSlice`1<UnityEngine.Vector4>,UnityEngine.MaterialPropertyBlock,bool,System.Exception&)
    0x0000018e02904613 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChain:Render ()
    0x0000018e027707e3 (Mono JIT Code) UnityEngine.UIElements.UIRRepaintUpdater:Update ()
    0x0000018e01616c5e (Mono JIT Code) UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase)
    0x0000018e0274ffdb (Mono JIT Code) UnityEngine.UIElements.Panel:UpdateForRepaint ()
    0x0000018e0275fe83 (Mono JIT Code) UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event)
    0x0000018e01616527 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    0x0000018e0161627b (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
    0x0000018e0161607f (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:processEvent (int,intptr)
    0x0000018e01615fbb (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
    0x0000018e01615e1d (Mono JIT Code) UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
    0x0000018e01615ece (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
    0x00007ffd95d100e0 (mono-2.0-bdwgc) [mini-runtime.c:2849] mono_jit_runtime_invoke
    0x00007ffd95c92ac2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    0x00007ffd95c9bb1f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    0x00007ff753f20754 (Unity) scripting_method_invoke
    0x00007ff753f1b851 (Unity) ScriptingInvocation::Invoke
    0x00007ff753f15615 (Unity) ScriptingInvocation::Invoke<void>
    0x00007ff7531cb7fa (Unity) Scripting::UnityEngine::GUIUtilityProxy::processEvent
    0x00007ff754843378 (Unity) GUIView::processRetainedMode
    0x00007ff754db2312 (Unity) GUIView::OnInputEvent
    0x00007ff754843268 (Unity) GUIView::processInputEvent
    0x00007ff754dab492 (Unity) GUIView::DoPaint
    0x00007ff754db504d (Unity) GUIView::RepaintAll
    0x00007ff754910657 (Unity) PlayerLoopController::UpdateScene
    0x00007ff7548fb0a2 (Unity) PlayerLoopController::EnterPlayMode
    0x00007ff75490bab0 (Unity) PlayerLoopController::SetIsPlaying
    0x00007ff75490e8f7 (Unity) Application::TickTimer
    0x00007ff754d81211 (Unity) MainMessageLoop
    0x00007ff754d853b1 (Unity) WinMain
    0x00007ff75645326e (Unity) __scrt_common_main_seh
    0x00007ffdee597034 (KERNEL32) BaseThreadInitThunk
    0x00007ffdef9026a1 (ntdll) RtlUserThreadStart