Author Topic: Random Crashes - The lead up  (Read 259 times)

Offline WASasquatch

  • Member
  • *
  • Posts: 3136
  • The Homeless Landscape Artist
Random Crashes - The lead up
« on: October 30, 2018, 06:59:36 PM »
Does anyone else notice when TG suddenly locks up and CTD when you're working casually, does anyone elses TG start slowing down first? Like changing a simple scalar setting causing a visible "Thinking" mouse symbol and hiccuping before applying change?

Note my preview is paused. I'll just get this progressively slower and slower TG for about a minute before a random edit causes a CTD.
Art can be a window into the soul

Offline Dune

  • Member
  • *
  • Posts: 15081
    • www.ulco-art.nl
Re: Random Crashes - The lead up
« Reply #1 on: October 31, 2018, 06:47:31 AM »
It does help to open a fresh instance of TG now and then (after a few hours working intensely or so). Seems so clear up the memory.

Offline WASasquatch

  • Member
  • *
  • Posts: 3136
  • The Homeless Landscape Artist
Re: Random Crashes - The lead up
« Reply #2 on: October 31, 2018, 07:38:46 AM »
I wonder if a ram flush with TG active would clear any leaked memory. I'll try a batch loop with the coand every minute and see if I get a slowdown crash. Likely TG will hold onto it lost or not
Art can be a window into the soul

Offline jaf

  • Member
  • *
  • Posts: 775
Re: Random Crashes - The lead up
« Reply #3 on: October 31, 2018, 06:47:42 PM »
I've found that if you load a scene with objects (vegetation, hard surface models, etc.) and render it, then without exiting TG, load a different scene with objects, you will find TG did not release all the memory used by the first scene.  If you continue to load and render scenes this way, the memory TG is using keeps increasing.
(26Apr19) Ryzen 1800x, 960 EVO 500GB NVME-M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 430.39 (26Apr19), Win 10 Pro x64, Terragen Frontier 4.4.18

Offline WASasquatch

  • Member
  • *
  • Posts: 3136
  • The Homeless Landscape Artist
Re: Random Crashes - The lead up
« Reply #4 on: October 31, 2018, 07:47:37 PM »
I've found that if you load a scene with objects (vegetation, hard surface models, etc.) and render it, then without exiting TG, load a different scene with objects, you will find TG did not release all the memory used by the first scene.  If you continue to load and render scenes this way, the memory TG is using keeps increasing.

That should be normal behavior though, right? TG reads and loads models into active memory? So two instances (processes) would have their own addressed memory. Me having only 8GB RAM with a total of 21GB usable memory in general, I tend to not open up multiple instances that utilize objects, as often one will be most my memory that is of any useful speed, where physical memory while dedicated, is still at about half the speed of my RAM.
Art can be a window into the soul

Offline jaf

  • Member
  • *
  • Posts: 775
Re: Random Crashes - The lead up
« Reply #5 on: October 31, 2018, 09:10:50 PM »
I don't think so.  If you load a scene and render and then load a different scene, the first scene is gone.  The next load is into the same instance of TG.  All I'm pointing out is TG does not have a file|close and it doesn't give up all of the memory used by a previous scene, which to me is a bug.  It doesn't occur if you exit TG and then load/render the scene.

Now two instances of TG will use more resources (tg instance 1 plus tg instance 2), but if you're rendering and reloading one or both instances with scenes with objects, one or both instances will use more resources than the first scene(s) render.

I know this sounds confusing -- I'll try to make a workflow/chart that depicts what I'm trying to express.
(26Apr19) Ryzen 1800x, 960 EVO 500GB NVME-M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 430.39 (26Apr19), Win 10 Pro x64, Terragen Frontier 4.4.18

Offline WASasquatch

  • Member
  • *
  • Posts: 3136
  • The Homeless Landscape Artist
Re: Random Crashes - The lead up
« Reply #6 on: October 31, 2018, 09:27:21 PM »
I don't think so.  If you load a scene and render and then load a different scene, the first scene is gone.  The next load is into the same instance of TG.  All I'm pointing out is TG does not have a file|close and it doesn't give up all of the memory used by a previous scene, which to me is a bug.  It doesn't occur if you exit TG and then load/render the scene.

Now two instances of TG will use more resources (tg instance 1 plus tg instance 2), but if you're rendering and reloading one or both instances with scenes with objects, one or both instances will use more resources than the first scene(s) render.

I know this sounds confusing -- I'll try to make a workflow/chart that depicts what I'm trying to express.

Ohh, I thought you meant opening two instances heavily populated and shared memory and duplicate memory for each instance.

What I'm wondering is if these are true memory leaks, or if the ram is being held active erroneously.
« Last Edit: October 31, 2018, 09:29:08 PM by WASasquatch »
Art can be a window into the soul

Offline jaf

  • Member
  • *
  • Posts: 775
Re: Random Crashes - The lead up
« Reply #7 on: October 31, 2018, 10:48:06 PM »
Doesn't appear to be memory leaks -- it looks like it doesn't release all the memory it used to render the scene, and it's additive if you load a new scene without exiting TG.  Here's a little chart I made using two simple scenes with built in rock populations.  The second scene is identical to the first, but with a larger rock population.  I'm using Sysinternals Process Explorer since it will graph used resources for a process.

1. load and render scene1 (uses 1.9gb after finished rendering)
2. load and render scene1 (uses 2.0gb after finished rendering)
3. load and render scene1 (uses 2.1gb after finished rendering)
4. load and render scene1 (uses 2.2gb after finished rendering)
5. load and render scene2 (uses 2.4gb after finished rendering)
6. load and render scene2 (uses 2.5gb after finished rendering)
Exit Terragen
7. load and render scene2 (uses 2.0gb after finished rendering)
Exit Terragen
8. load and render scene1 (uses 1.9gb after finished rendering)
9. load and render scene1 (uses 2.0gb after finished rendering)

Note that I did not exit Terragen until after step 6.  The scene1 increased TG in size by .1gb upon each load/render as did scene 2 on step 6. Exiting TG and the loading and rendering scene2 gave a .5 decrease in what Terragen was using in memory.  Exiting TG and loading and rendering scene1 put it back at 1.9gb (agreeing with step 1.)  Another load/render put it at 2.0gb.
(26Apr19) Ryzen 1800x, 960 EVO 500GB NVME-M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 430.39 (26Apr19), Win 10 Pro x64, Terragen Frontier 4.4.18

Offline WASasquatch

  • Member
  • *
  • Posts: 3136
  • The Homeless Landscape Artist
Re: Random Crashes - The lead up
« Reply #8 on: October 31, 2018, 11:04:37 PM »
That's pretty much what a memory leak is, and looks like such. When a program isn't handling memory allocation appropriately and fails to release them. I tried several methods of flushing memory and TG will not release the erroneously allocated memory, and nothing in TG can fix that (aside from ending the process), so it's been "leaked".
« Last Edit: October 31, 2018, 11:07:52 PM by WASasquatch »
Art can be a window into the soul

Offline jaf

  • Member
  • *
  • Posts: 775
Re: Random Crashes - The lead up
« Reply #9 on: November 01, 2018, 12:01:37 AM »
Yes.  I wasn't sure if you were reloading without exiting TG, and using two instances, it might be more severe.  I need to check that, but I highly suspect that's true.
(26Apr19) Ryzen 1800x, 960 EVO 500GB NVME-M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 430.39 (26Apr19), Win 10 Pro x64, Terragen Frontier 4.4.18

 

anything