Planetside Software Forums

Support => Terragen Support => Topic started by: jaf on December 18, 2012, 02:00:08 PM

Title: Crashing TG2
Post by: jaf on December 18, 2012, 02:00:08 PM
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.....

Title: Re: Crashing TG2
Post by: Oshyan on December 20, 2012, 12:35:26 AM
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
Title: Re: Crashing TG2
Post by: jaf on December 20, 2012, 01:36:27 PM
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?

Title: Re: Crashing TG2
Post by: Oshyan on December 20, 2012, 06:42:55 PM
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
Title: Re: Crashing TG2
Post by: jo on December 21, 2012, 01:18:23 AM
Hi,

Just to say I can reproduce this on the Mac.

Regards,

Jo
Title: Re: Crashing TG2
Post by: Oshyan on December 21, 2012, 01:29:07 AM
Ah good, then I presume you will look into it Jo. :D

- Oshyan