[0.7.7.0] Undo "Send [tech] to Inventory" allows intersecting techs and game crash.

ZeroGravitas

Breaker of Games
Jun 29, 2017
3,938
5,762
675
38
UK
www.youtube.com
A fairly obvious one (you must be aware of). This is essentially another way to achieve the intersecting techs crash described already, back here (which involved in-place snapshot loading - R&D, Creative).

There seems like some resistance to this happening with modest sized techs pushing apart, but a player could quite easily trigger this accidentally by driving their main tech into the middle of where their main base was stored from. (Or trying to cause trouble, for fun.)

(1) Send a large tech into the void.
(2) Drive a second fairly large tech to where the first used to be.
(3) Click Undo.
(4) You have interlocking techs - if dimensions and designs are sufficient. Crash then follows, if there's enough physics engine trauma. The crash, demonstrated below, threw NaN (divide by zero) type error, with fun UI/position screw-ups.


Output log attached. No crash dump generated.
 

Attachments

  • Like
Reactions: Legionite

Legionite

taking a break from TAC Pack
May 20, 2017
2,298
3,819
575
[TAC HQ R&D]
forum.terratechgame.com
Stuff above
This could be a source to figuring out how to handle Tech-in-Tech issues.
Maybe just warp the clipping non-player Tech to the side?
It has to know when to do this properly, or it may break many multi-Tech designs.

A big button that appears to "escape" to the side(warp to the right side by some distance) whenever the game has massive frame-rate loss and a Tech's center of mass is within another Tech's maximum block area?
NaN (divide by zero)
lol
 

ZeroGravitas

Breaker of Games
Jun 29, 2017
3,938
5,762
675
38
UK
www.youtube.com
Maybe just warp the clipping non-player Tech to the side?
Well, there's going to be situations where that won't work, or will cause another collision, and certainly many where a previously anchored tech won't anchor. And the game already does fairly well in pushing techs apart that only intersect a little.

It's tricky; Undo is an extremely powerful feature (that's tricky to program), with a lot of unforseeable potential side affects.

Perhaps the tech that's warped back in via Undo should just disintegrate (with all blocks ensured to be outside the blocking tech(s) footprint?). With clicking Undo again restoring the disintegrate... Ideally an error handler would recognise the NaN type error and disintegrate instead. Explode the tech even - helping to discourage players from trying shenanigans.

Why "lol" btw? I'm not talking nonsense there, am I? (Just the speed and location read-outs in video?)
 
Last edited:

xSoNz

Loves building
Aug 1, 2017
38
51
425
19
Serbia
So, I was wondering what will happen if I put a SCU down, send it to inventory, then drive in the place where it was, and pressing 'undo' button. Well, i lost my save... At least i lost my auto-save, i didn't save the 'main' game-save. So, first of all, my camera was moved, and my game crashed. Then when i started up the game again, and loaded 'continue' I encountered this (it crashed when i tried to place a cab).


And then... When i opened the game again, it just crashed. After restarting steam, my autosave was like in the video, and my 'main' save was not broken. But i think that this is a really big issue. Maybe when something is blocking the way you could add that, when you press the 'undo' button, it just says 'unable to undo reason: blocked'?
Idk, I'm gonna leave this here, and the saves and a log (when the game crashed after video, it kicked me out of the game and created a folder with this).
 

Attachments

  • Like
Reactions: ZeroGravitas

Adriano

PAYLOAD STUDIOS
May 16, 2016
2,598
1,355
570
38
Thanks for this @xSoNz , it's a know issue, to do with blocks being in the same location. Essentially what you're doing here is forcing blocks to overlap. It doesn't always result in a crash, but it is possible. We're aware of it and are looking into solutions.
 
  • Like
Reactions: xSoNz