Search Unity

Discussion If you can't give a stack trace that includes any code I have access to, I don't want to hear it.

Discussion in 'Editor & General Support' started by halley, Nov 28, 2022.

  1. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,421
    I get so tired of Editor leaks. Every time I hit Play, I get chaff in the console. Well, not EVERY time. Just any time there's an object selected. Or an Inspector tab is visible. Or I use a package from <somePublisher>. Or some other mystical dance-in-the-moonlight coincidence I can't reproduce in a small project.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.SceneView.CallOnPreSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:3693)
    3. UnityEditor.SceneView.DoOnPreSceneGUICallbacks (UnityEngine.Rect cameraRect) (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2248)
    4. UnityEditor.SceneView.DoOnGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2330)
    5. UnityEditor.SceneView.OnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2255)
    6. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:351)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
    Notice all the /Users/bokken stuff, that's not my username. That's Unity's MacOS build CI/CD platform, I guess. None of the code here is code that I have access to. None of it points any blame at anything I am doing, so I can stop doing it. It's just chaff.

    If you can't tell me a line of code or a package that I have any control over, just suppress the message by default.
     
  2. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,697
    Which Unity version?
     
  3. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,421
    Any of the 2021.3 LTS builds have been giving me 3 such messages on each Play for me this week. And then it won't for a few hours. And then it will again. And it's nothing special, it's been like this for years, maybe different exact lines but the general "we're telling you something bad happened inside the black box but nothing to diagnose or fix the problem."
     
    Marble likes this.
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    Yeah, this irks me, too. We've got a couple of traceless errors popping up, one of which is especially spammy.

    That said, I don't want them suppressed. I want more data so I can fix it or work around it. If a stack trace isn't possible, point me to the data which was being used at the time, or something.

    Another thought: make them a separate class of error in the console so they can be toggled off without hiding my own errors.
     
    NotaNaN, ippdev, timsibiski and 2 others like this.
  5. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,819
    I had the opposite happen recently, oddly enough. Been working on an property drawer for the addressables asset reference field, and was getting an error that had the entire stack trace only up to my own code that called the method in the addressables API that was actually throwing the error. Had to step through the code to figure out what/why was causing the issue (spoiler, bad code on Unity's part; had to use reflection to stop the issue).

    But I agree these uninformative errors are a pain. Especially the 'objects are trying to loaded during a domain reload' which gives you nothing to figure out the issue.
     
  6. PizzaPie

    PizzaPie

    Joined:
    Oct 11, 2015
    Posts:
    106
    I have same issue with whole stacktrace getting spammed on every log and honestly it is useless got enough of my own errors don't care to fix random editor bugs anyway. Plus majority of call sequence is not accessible anyway.
    Any clue what is causing that change in logs behaviour? Would be cool if editor had options on how to display logs.

    Parsing manifest 'Assets\SDKs\ExternalDependencyManager\Editor\external-dependency-manager_version-1.2.172_manifest.txt' of package 'External Dependency Manager'
    0x00007ff6d0ae50dc (Unity) StackWalker::GetCurrentCallstack
    0x00007ff6d0aeb279 (Unity) StackWalker::ShowCallstack
    0x00007ff6d12ddd83 (Unity) GetStacktrace
    0x00007ff6d21da7ca (Unity) DebugStringToFile
    0x00007ff6d0c707dd (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000027575d2742b (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    0x0000027575d2726b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000027575d26ff0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x0000027575d26eb8 (Mono JIT Code) UnityEngine.Debug:Log (object)
    0x00000275a3bb11eb (Mono JIT Code) [Logger.cs:125] Google.Logger:Log (string,Google.LogLevel)
    0x00000275a3bb1149 (Mono JIT Code) [VersionHandlerImpl.cs:2577] Google.VersionHandlerImpl:Log (string,bool,Google.LogLevel)
    0x00000275e4287003 (Mono JIT Code) [VersionHandlerImpl.cs:1834] Google.VersionHandlerImpl/ManifestReferences:parseManifests (Google.VersionHandlerImpl/FileMetadataByVersion,Google.VersionHandlerImpl/FileMetadataSet)
    0x00000275e4280c63 (Mono JIT Code) [VersionHandlerImpl.cs:1925] Google.VersionHandlerImpl/ManifestReferences:FindAndReadManifestsByPackageName (Google.VersionHandlerImpl/FileMetadataSet)
    0x0000027697a93e9b (Mono JIT Code) [VersionHandlerImpl.cs:1896] Google.VersionHandlerImpl/ManifestReferences:FindAndReadManifests (Google.VersionHandlerImpl/FileMetadataSet)
    0x0000027697a916b3 (Mono JIT Code) [VersionHandlerImpl.cs:2830] Google.VersionHandlerImpl:UpdateVersionedAssetsOnMainThread (bool,System.Action,bool)
    0x0000027697a9139b (Mono JIT Code) [VersionHandlerImpl.cs:2796] Google.VersionHandlerImpl/<UpdateVersionedAssets>c__AnonStoreyB:<>m__1A ()
    0x00000275a3bce80a (Mono JIT Code) [RunOnMainThread.cs:487] Google.RunOnMainThread:ExecuteNext ()
    0x00000275a3bce5d3 (Mono JIT Code) [RunOnMainThread.cs:536] Google.RunOnMainThread:<ExecuteAllUnnested>m__12 ()
    0x00000275a3bce4c6 (Mono JIT Code) [RunOnMainThread.cs:343] Google.RunOnMainThread:RunAction (System.Action)
    0x00000275a3bce45b (Mono JIT Code) [RunOnMainThread.cs:550] Google.RunOnMainThread:ExecuteAllUnnested (bool)
    0x0000027697a8932b (Mono JIT Code) [RunOnMainThread.cs:513] Google.RunOnMainThread:ExecuteAll ()
    0x0000027697a80f42 (Mono JIT Code) (wrapper delegate-invoke) <Module>:invoke_void ()
    0x0000027697a882f4 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    0x000002757606affd (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    0x00007fff003de640 (mono-2.0-bdwgc) [mini-runtime.c:2812] mono_jit_runtime_invoke
    0x00007fff00362ad2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    0x00007fff0036bb2f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    0x00007ff6d0a31534 (Unity) scripting_method_invoke
    0x00007ff6d0a2cba1 (Unity) ScriptingInvocation::Invoke
    0x00007ff6d0a26ec5 (Unity) ScriptingInvocation::Invoke<void>
    0x00007ff6cfd3b2cb (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallUpdateFunctions
    0x00007ff6d0d4c95f (Unity) SceneTracker::Update
    0x00007ff6d0ee3cb9 (Unity) Application::TickTimer
    0x00007ff6d12e3ac1 (Unity) MainMessageLoop
    0x00007ff6d12e76f6 (Unity) WinMain
    0x00007ff6d2e55782 (Unity) __scrt_common_main_seh
    0x00007fff949574b4 (KERNEL32) BaseThreadInitThunk
    0x00007fff953826a1 (ntdll) RtlUserThreadStart
     
  7. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    I've got a few weird bugs like once or twice a day the editor will throw up the prompt asking to auto upgrade outdated API, but there isn't any outdated api in the project...hitting don't upgrade doesn't show any errors. Hitting upgrade outdated API throws an error: "APIUpdater encountered some issues and was not able to finish."
     
  8. timsibiski

    timsibiski

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    38
    I think this is a great suggestion and the first thing that came to mind for me. I will suggest the idea internally.
     
    The_Island, NotaNaN, ippdev and 3 others like this.
  9. UnityGuy1717

    UnityGuy1717

    Joined:
    Mar 20, 2020
    Posts:
    13
    Hey everyone, any updates on this? Still happening in 2021.3.17f1
     
  10. Prosto_Lyubo

    Prosto_Lyubo

    Joined:
    Aug 15, 2013
    Posts:
    18
    Still present in 2021.3.33f1, please either fix this or make it disappear, it is so annoying!

    Here, grab some stacktraces I can do nothing about

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.SceneView.CallOnPreSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:3716)
    3. UnityEditor.SceneView.DoOnPreSceneGUICallbacks (UnityEngine.Rect cameraRect) (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2267)
    4. UnityEditor.SceneView.DoOnGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2349)
    5. UnityEditor.SceneView.OnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2274)
    6. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:372)
    7. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:693)
    8. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:665)
    9. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:658)
    10. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:618)
    11. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:607)
    12. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:535)
    13. UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/EventHandler.cs:151)
    14. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/IEventDispatchingStrategy.cs:74)
    15. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:35)
    16. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:26)
    17. UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:19)
    18. UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:381)
    19. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:344)
    20. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:222)
    21. 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:420)
    22. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:479)
    23. UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/EventHandler.cs:151)
    24. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/IEventDispatchingStrategy.cs:74)
    25. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:35)
    26. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:26)
    27. UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:19)
    28. UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:381)
    29. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:344)
    30. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:222)
    31. 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:420)
    32. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:479)
     
  11. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    As always, you too can improve your Unity Editor experience by purchasing an asset in the asset store!

    Editor Console Pro allows you to create various filter rules to filter out all the gunk you're not interested, hell you can even colour code it.
     
    Ryiah likes this.