Hey folks,
I have a memory leak in my UE5.2 code and I can’t debug it. I’m grabbing and saving textures using the code from this repo but after a few thousands images, the executable goes OOM and gets killed by Linux. I’ve already tried Unreal Insights to debug this problem, it says that the untracked memory grows “like a staircase” but nothing more, it can’t pinpoint the source of the problem.
Valgrind is the correct tool for this job, unfortunately I can’t get past the UGameplayTagsManager::InitializeManager
line and I never reach Initializing FReadOnlyCVARCache
. I already tried using different options and even different Valgrind tools: even nulgrind
can’t pass that point.
Attaching gdb I see a lot of looping over ProcessAsyncLoading
, but without using valgrind this step completes in a couple of seconds (at worst), I left valgrind run overnight and after 10 hours it hadn’t moved a line.
Anybody knows some nice tricks to discover such kind of memory leaks? What’s the fastest approach in these cases, should I redefine new()
and delete()
? I’m missing something in Unreal Insights?
Thanks everybody!