[0.7.8] Terrain biome loading / replacement errors

Bgrmystr2

Well-Known Member
Joined
Oct 29, 2015
Messages
373
Likes
295
Points
470
Age
31
Location
Gensokyo
Website
en.touhouwiki.net
#1
I made a brand new save fresh off the 0.7.8 patch, played for a few hours, saved, went to sleep, played it earlier today and all was normal. After re-joining the game just now, I've found some major errors in the biome loading.
TerraTechWin64_2017-10-31_01-07-12.jpg

The salt flat was not there originally, nor was the mountain biome. It was all grass biome of some type as far as I could see. I had to go 2000 distance away from spawn to find a mountain just to find out there was no Oleite in the mountains. (Need desert biome, I guess.) First time I've played where I didn't find three or four desert biomes before I found my first mountains.

This save is not edited in any way and is completely vanilla. I used a some (about 15 or so) GSO auto-miners really early on to make some money off some Erudite seams, left to do some missions, forgot about it, came back to 1fps and hundreds of them everywhere... the whole thing was clogged because of design flaw, had to sell everything to get my fps back. so that kind of explains the money. :oops:

Attached is the game save and the output log as-is.
 

Attachments

Sammi

PAYLOAD STUDIOS
Joined
Oct 9, 2017
Messages
94
Likes
86
Points
425
Age
27
#2
Hi @Bgrmystr2 , thanks for reporting this! This one is quite rare so we appreciate all the info you've provided. It's logged and with the code guys :)
 

Jari-Bou

New Member
Joined
Feb 26, 2018
Messages
5
Likes
2
Points
4
Location
Hérault, France
#5
Hi!
I was with a friend when he told he had a glitch and he showed me that there was a rectangle of desert levitating in the middle of a grassland!
Unfortunately I have no screenshot but I wonder, is that a bug or a graphic trouble?

EDIT: beneath the desert rectangle it was all white like if there was nothing....
 
Last edited:
Likes: ZeroGravitas

ZeroGravitas

Breaker of Games
Joined
Jun 29, 2017
Messages
3,542
Likes
4,661
Points
675
Age
36
Location
UK
Website
www.youtube.com
#7
I've just merged @Jari-Bou's new thread titled "A terrain glitch??" [0.7.9] with this existing thread. Thanks for the report, I see this a lot, as much as every 3rd or 4th load of the game, sometimes, going into campaign, etc.

See also this bigger thread on the same issue in the "unstable" bugs section of the forum.
 

Django

PAYLOAD STUDIOS
Joined
Apr 21, 2016
Messages
258
Likes
460
Points
475
Location
London, UK
#12
Thanks for the report, I see this a lot, as much as every 3rd or 4th load of the game, sometimes, going into campaign, etc.
Hey ZG, I'm trying to make some headway with this bug. It sounds like you're getting it quite frequently, any idea why that might be? I have only had this happen once on my own machine while testing, and even inside the studio with all the testing going on we've only seen it a handful of times. Any idea why you might be seeing it more regularly? Computer specs, actions, changing window focus?
Or is it pretty much just 1/4 when you start a campaing, and it happens fairly early?
 
Likes: ZeroGravitas

ZeroGravitas

Breaker of Games
Joined
Jun 29, 2017
Messages
3,542
Likes
4,661
Points
675
Age
36
Location
UK
Website
www.youtube.com
#13
Any idea why you might be seeing it more regularly? Computer specs, actions, changing window focus?
I certainly was loading and reloading different (people's) saves quite a lot, and certainly tabbing in and out a fair bit.

But I don't know that it wasn't just 'luck' - I've not seen it myself in 0.8+, as it happens (despite playing a fair bit again, with different things). Only saw it in SSundee's vid, heh.

I've attached my current DxDiag, just in case. Only Windows 10 and driver updates have changed on my system recently (although Microsoft did cause minor problems with other games, which was then resolved with further updates).

I have a minor suspicion that the Folding@Home app may have been paused in the background, on some ocasions (though probably not). Probably a red herring. I only say this because maybe it's caused some instability previously. Certainly it causes stutter during browser video playback, as TerraTech itself does, because it uses GPU processing. Certainly by using it to put 100% load on the GPU I was able to instigate the fun, new Silo entry dither bug.

I feel like you've really got your work cut out for you... Have you guys looked more generally at memory management issues, data methods or whatever? I know it's tantamount to a conspiracy theory, but it feels like there are an increasing number of bugs with points of similarity, appearing apparently randomly, transferring between save game loads in the same session, etc. Maybe if you guys tidy house in general a lot of these issues will magically go away...?
 

Attachments

Zorgomol

Not a Number
Joined
Apr 9, 2018
Messages
199
Likes
352
Points
270
#14
I would not really go as far as looking into blaming GPU on this. Between all sorts of differences that are happening between clean-loading a save in a freshly started game and a reload, my wager would be simply that the game (or Unity) does not completely clear its caches between gameplay sessions. There's this terrain bug, the mysterious case of vanishing base not vanishing on reload, and recently I experienced a stuck looping sound effect persisting between save+reload but gone on a clean load - they all somewhat point in the same direction and that is object caching system, whether it is terrain segments, whole techs or sound effects.

It would be interesting to see if the bugged terrain segment matches a previously loaded game. Then again, there is the main menu terrain as well in the mix.
 
Likes: ZeroGravitas

Django

PAYLOAD STUDIOS
Joined
Apr 21, 2016
Messages
258
Likes
460
Points
475
Location
London, UK
#15
This terrain issue is most likely a race condition during generation, timing or edge case related, which makes it non-deterministic and so infrequent and hard to track. Tiles aren't reused in the same way other objects are, because terrain needs to be created from scratch every time.

We're focussing heavily on fixing bugs at the moment, so hopefully a lot of these issues will be fixed soon.

the mysterious case of vanishing base not vanishing on reload
Tell me more.
 
Likes: ZeroGravitas

ZeroGravitas

Breaker of Games
Joined
Jun 29, 2017
Messages
3,542
Likes
4,661
Points
675
Age
36
Location
UK
Website
www.youtube.com
#16
It would be interesting to see if the bugged terrain segment matches a previously loaded game. Then again, there is the main menu terrain as well in the mix.
I think this definitely happens in the first world loaded and my assumption was that it was merely a misplaced section of terrain from the same map. Primarily because some of the examples look exactly like the terrain was shifted over by about 1/2 of a world tile distance.

But then, yeah, the main menu is also a world load with terrain, prone to the same bug.

my wager would be simply that the game (or Unity) does not completely clear its caches between gameplay sessions.
Certainly there is residue. The bugs that make this most obvious are with block animations getting stuck, like the scrapper being stuck on, refinery, etc, smoke stuck on, SCU orb being in two positions if it's unloaded and re-loaded without being retracted first. (Happens with fully reloading world, or just the specific tech, from leaving range.)

This terrain issue is most likely a race condition during generation, timing or edge case related
So, in other words, related to multi-thread (and multiple CPU core) use? Parallel processing.

We're focussing heavily on fixing bugs at the moment, so hopefully a lot of these issues will be fixed soon.
I'll probably quote you on that. :)
 

Zorgomol

Not a Number
Joined
Apr 9, 2018
Messages
199
Likes
352
Points
270
#18
Threading issue? That would kind of explain then why I have never had it happen on my measly quadcore i5, people with 8 (logical) core i7 get it once in a blue moon, and ZG's 12 (logical) core Ryzen has it happening every now and then.

Let's see now, if I was making an infinite landscape game I would either use a rolling window or a moving window over the underlying procedural model... in either case when a player crosses a load line you'd update the window and fire off threaded tasks to re-generate the terrain over the relevant window edges. In the case of moving window I suppose it could be possible for the landscape task to read old data from the window array either before it has been written by the updating thread, or even from processor L2 cache. The former case would probably glitch out a lot more than it does currently, and the latter case would happen more often on CPUs with larger L2 caches and needs either use interlocked operations or MemoryBarrier() before invoking the worker threads/tasks.

Eh, just an old man rambling hypothetical technicalities, never mind me. o_O
 

ZeroGravitas

Breaker of Games
Joined
Jun 29, 2017
Messages
3,542
Likes
4,661
Points
675
Age
36
Location
UK
Website
www.youtube.com
#19
I have never had it happen on my measly quadcore i5
Although some people have. But it *might* well influence the chances.

Reading back through the other thread (which has more details than this one), I thought there was an association with "Fastest" graphics settings and loading very big bases, or having the "Position Blocked" bug, which was churning the CPU causing bad FPS drops: https://forum.terratechgame.com/ind...n-biomes-tears-in-the-world.13052/#post-94739

But I'd been unable to stimulate the bug reliably with external CPU loading or by massively filling the game's "Cache" folder with snapshot temp files (which makes the game hang fairly drastically on load).

(What are you PC specs @Nightblade Greyswandir, @YAKFLY, @Bgrmystr2, @Soviet_Samuelson, etc, for other examples? Do us a DxDiag, maybe, please?)
 

harpo99999

Ah kick till it starts
Joined
Aug 14, 2014
Messages
2,076
Likes
1,011
Points
570
Location
australia
#20
as an overclocked i7 player, I have not seen the terrain mis-alignment issue, so can not chime in here other than to say that I have not seen the issue