Crashing TG2

Started by jaf, December 18, 2012, 02:00:08 PM

Previous topic - Next topic

jaf

I've had a few crashes in the past few days using TG2 2.5 and am pretty sure I know the cause.  It's not a big deal and has been a known "characteristic" of the program for quite a while.

I build a lot of my terrains with World Machine and have a habit of naming them ddmmmyyx.ter, such as "18dec12a.ter.  When I load a heightfield, I like to change the name of the "Heightfield load 0x" to the World Machine name.  The problem is, if the preview window is still rendering when I start to change the name (not the path to the file, just the name) TG2 crashes.

Surprisingly, I seem to be able to attempt to change the name while a regular quick or full render is in progress -- I suspect the changes are "locked out" until the render finishes.

I've trained myself to not make changes during a render -- it only makes sense anyway, but it's so easy to forget the preview is a render and many times you don't realize you've initiated one.  Keeping "pause" on the preview enabled seems to work, but then it's easy to forget too.

So I guess the  best advice is "no changes when renders, including previews, should be made until those renders finish.  Note that there's also  the example where you start a final render before the preview finishes and the preview will resume (when the finale render finishes.)  It's easy to start making changes to your file, not realizing a render (preview) is still ongoing after the main render has finished.

Maybe the preview should have an automatic mode, like it currently works, and a user start/stop mode, like the regular renders?  Then the user can choose.

No big deal, just some thoughts.....

(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

Oshyan

Strange that it's been crashing when renaming nodes. In general I think it's a common thing that you'd be renaming a node while the preview is updating. Making changes during actual rendering is generally not advised, but is also *not* locked out (and can indeed cause crashes).

In any case it's good to be aware of the problem and we'll definitely look at it. I think the solution is to either prevent it from crashing, or to prevent changes during renders, however preventing changes during *preview* renders seems excessive, so probably the first solution is best.

- Oshyan

jaf

Here's an easy way to replicate the problem.
1.  Add a terrain heightfield load file.
2.  Navigate to the "Heightfield load 0x" and make a change to initiate a preview update (change "number of points" from 1000 to 1001.
3.  Before the preview update finishes, attempt to change the name -- crash.

The Visual Studio 2010 debug info is: Unhandled exception at 0x00d37256 in tgd.exe: 0xC0000005: Access violation reading location 0x0000000000000098.  Looks like trlib.dll  I'm running the x64 version of tg2 (2.5).

Using the same procedure but clicking on "pause" on the preview and then changing the name works fine.

Maybe allowing changes but not committing them until all renders/previews are inactive?

(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

Oshyan

Hmm, except that I can't reproduce the issue with those steps. Do you have a specific heightfield loaded? Does it happen with other nodes?

- Oshyan

jo

Hi,

Just to say I can reproduce this on the Mac.

Regards,

Jo

Oshyan

Ah good, then I presume you will look into it Jo. :D

- Oshyan