Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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 'General Discussion' started by halley, Nov 28, 2022.

  1. halley


    Aug 26, 2013
    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


    Jul 3, 2015
    Which Unity version?
  3. halley


    Aug 26, 2013
    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


    Dec 29, 2011
    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


    Feb 11, 2021
    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


    Oct 11, 2015
    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


    Jul 14, 2011
    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


    Unity Technologies

    Jun 3, 2021
    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.