Enable Full StackTrace not working?

I’m trying to debug an error which show the following in the Console of the editor (2021.3.f.1)
“A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.” So I went into project settings and changed all the stack trace settings to “full”.
Now I’m getting stack traces on all my Debug.Log informational console entries, but the error about the “memory leak” still does not have a stack trace, and in fact, it still says “Enable Full StackTraces to get more details.”

Is there another place I need to turn on full stack trace?
Or is there another way to investigate this kind of error?

Thanks!
Eric

Try a reimport all… it might need to recompile some assemblies and just ticking that option might not trigger it.

If reimport all is too onerous (large project), then just:

  • close Unity
  • delete the Library/ScriptAssemblies folder in your project
  • open Unity to let it recompile

Thanks so much for the suggestion! I don’t think it worked, though. I did Assets > Reimport All (the project isn’t that big) and the behavior was the same. Then I deleted Library/ScriptAssemblies. The same.

The stack trace is definitely there for Debug.Log output. Not only does it show “StackWalker::GetCurrentCallstack” at the end of the console entry, but if I select it, I see a detailed call stack, quite different from the one with the other setting.

I tried causing a different kind of error (a null reference) and when it displayed, it did not show a detailed system callback, it looks the same with either setting.

Any ideas what I should try next?

Does it matter what kind of build is set (Windows, in this case, but I’m running in the editor)?

Thanks!

Interesting idea… wonder what you get if you build for Windows and then attach the debugger to the built executable. Perhaps the VS debugger would be able to give you more at that point?

In that case, I have some learning to do:). I’m new to Unity and VS, and I’ve been wanting to learn to use the debugger in this environment. So I’ll learn that and try the experiment, which might be a good workaround to the bug(?) that keeps me from showing the stack trace in the console.

Take a look on this thread: A Native Collection has not been disposed, Enable Full Stack?

You have to install the com.unity.jobs and enable the Full Stack Traces (Menu Job/Leak Detection/Full Stack Traces (Expensive)).

You can add the package by name, like I did :wink: