#Where does "JobTempMemoryLeakValidation" log to?

1 messages · Page 1 of 1 (latest)

shadow crown
#

I have a collection that is not being disposed of, but I am having a hard tracking it down. I thought I would try the diagnostic "JobTempMemoryLeakValidation". But I can't for the life of me figure out were it outputs the log to. Any ideas?

tawdry orbit
#

Preferences -> Jobs -> Leak Detection Level
Turn on stack traces

#

not there are currently a bunch from the packages that will show up (hopefully cleaned up next release)

shadow crown
tawdry orbit
#

it will appear in your log

#

however it will require a domain reload though before it will appear

#

something like this

shadow crown
#

Hmm, I am not seeing that at all :/

tawdry orbit
#

version of entities?

#

or unity

shadow crown
#

I am on unity 2022.2.20

tawdry orbit
#

should be fine

shadow crown
#

I have restarted Unity a number of times already

tawdry orbit
#

that setting wont really help you

shadow crown
#

What setting do I want then?

tawdry orbit
#

(that said i suspect this leak isn't even your leak)

shadow crown
shadow crown
shadow crown
tawdry orbit
#

are you using unsafe containers?

#

or custom allocated memory

#

etc

shadow crown
#

I am using a lot of NativeArrays

#

To clarify, I am not using Entities. I am just using Jobs

tawdry orbit
#

yeah that's fine

#

shouldn't matter for this at all

shadow crown
tawdry orbit
#

are you completing the job?

shadow crown
#

Yup

#

It isn't like I couldn't read through the code and stuff to figure out what it is I am not disposing of. But for now and the future it would be easier if I could just see the stack trace of it instead

tawdry orbit
#

this is why i think you're either using untracked memory or it's not your leak

#

because it's very clear when code you write leaks if you turn on stacks

shadow crown
#

Huh interesting. Right so that does produce a stacktrace

#

Ahh @tawdry orbit so it seems that NativeLists are not tracked

tawdry orbit
#

oh

#

what version of collections are you using?

#

because list works fine

#

but you need the latest collections package

shadow crown
#

2.1.0-pre.18

tawdry orbit
#

yeah update, latest is 2.1.4

#

2.1.1 is when collections added tracking

#

Fixed
Properly tracks allocations made from the collections package such that when Unity.Collections.NativeLeakDetectionMode is NativeLeakDetectionMode.Enabled or NativeLeakDetectionMode.EnabledWithStackTrace, native memory leaks will be reported upon domain reload.

shadow crown
#

Of course it was haha

#

I think I need to upgrade to 2022.3 since I am not seeing 2.1.4 in the package manger

tawdry orbit
#

nah its not required

#

was out well before then (2 months old)

#

just remove collections to make it appear

#

or just manually go into manifest and update it

shadow crown
#

Yeah I did remove it, but wasn't seeing it.

#

Well I updated and I see 2.1.4, so its fine