Castle terrain subdivisions?

It doesn’t crash if I only build only the center tile where queryoffset = 0,0 which confirms my suspicions that it is somehow involved. This at least unblocks me since I am working on parametric buildings which are all working in that dialog and not the main scene. Makes the program start a lot faster too:)

Can you submit a testcase to reproduce the error? From what I can see, QueryOffset does pretty much the same thing it did before the changes, it just shifts the coordinates we query with.

My tiled variable LOD terrain is complicated running across multiple units. It will not be easy to make a test case. It works when there is one tile at queryoffset (0,0). It is still unclear why Height call is requesting invalid out-of-grid coordinates making it crash. But I am not wanting to work on terrain now… that was ‘in the bag’ waiting for new terrain features. So I will keep going on my current fronts with just one tile, or revert TCastleTerrain if I need more. I do wish I could load all the tiles to see the performance difference from your recent efforts. It feels faster, but one tile is just 100x100 so was quite fast already.

Understood, though I hate to think we have a crashing regression in the new version :slight_smile:

If you want to throw at me even very complicated code, and do it privately (you can send it e.g. to [email protected]) you’re welcome. If the crash is trivially reproducible, then maybe I don’t need to understand much of your code to debug it – or at least conclude for sure “CGE fault / not CGE fault”.

1 Like

CGE doesn’t crash. My code is where the crash resides. I could check the values and avoid the crash… but something is wrong as they are ending up negative but should always be positive. So you don’t have to worry that there is a crash hiding in CGE. I am probably the only person using tiled terrain anyways. I haven’t figured out how to enable debugging into cge though haven’t really looked. If I could trace up the stack back up from the Height call and compare before/after version, the difference might be obvious.