Planetside Software Forums

Support => Terragen Support => Topic started by: WAS on July 06, 2019, 04:52:58 PM

Title: Memory Leak v4.3.23
Post by: WAS on July 06, 2019, 04:52:58 PM
There seems to be a memory leak in Terragen. This morning after finishing the path traced Lava Flows scene, I noticed my system was at memory usage, with the render closed. I was confused so I closed Terragen and thought it would clear the memory, but it didn't release any of it. The system wasn't released literally several gigabytes of memory. While it itself isn't going to break anything, it can cause crashes in the OS, which can break things.

I restarted my computer and it was back to the normal 18% usage. When you load a file, and Terragen loads a project, it uses 99% disk usage while memory doesn't change (I don't know what that's about?). Idle, terragen uses 0.2gb memory. With the lava flows project is uses a little over 3gb (I forgot as it quickly popped up when the preview loaded). With the project all loaded it uses an additional 0.4gb memory for a mean of 0.6gb. (pretty slim usage really). I than close the software and let the settle back down. I'm still at 18% usage (down from 21%) but, I've lost 0.1gb of memory. So there is definitely a issue with the memory not being released back to the system. That's just opening and closing a project for 0.1gb / ~100mb loss.

Before I restarted I was sure to use the detailed process tree to calculated all the memory including the kernel, and there was definitely several gigabytes of ghost memory used.


Title: Re: Memory Leak v4.3.23
Post by: jaf on July 06, 2019, 06:17:00 PM
I wrote something here a while back (darned if I can find it now), but I found if I rendered a scene and then made a change and rendered again, it used more memory.  If I exited TG and then made the change, it didn't use as much memory.

I have to find that thread, or maybe someone remembers where it was.
Title: Re: Memory Leak v4.3.23
Post by: WAS on July 06, 2019, 08:15:03 PM
Quote from: jaf on July 06, 2019, 06:17:00 PM
I wrote something here a while back (darned if I can find it now), but I found if I rendered a scene and then made a change and rendered again, it used more memory.  If I exited TG and then made the change, it didn't use as much memory.

I have to find that thread, or maybe someone remembers where it was.

It seems to be pretty random too. I checked my memory after testing some lava folds ideas and I was up another 0.2gb of ghost memory allocated to nothing, but than I just did some more glow tests in my lava flows scene and taking a break to go to dinner, and my system was able to reclaim all the memory back down to 2.8gb. So strange. Definitely seems to be something erroneous but TG can possible recover the memory if you open and close another blank/project.
Title: Re: Memory Leak v4.3.23
Post by: Dune on July 07, 2019, 02:15:20 AM
It has been mentioned several times over time. That's why it's best to restart TG for a major render (or anyway after some hours of work), and better still reboot machine. But it's not good, of course.