Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Editor's ReRoot is screwed from KSP >= 1.8.0 #66

Open
Lisias opened this issue Apr 23, 2023 · 8 comments
Open

Editor's ReRoot is screwed from KSP >= 1.8.0 #66

Lisias opened this issue Apr 23, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@Lisias
Copy link
Contributor

Lisias commented Apr 23, 2023

That's sweet (I'm being sarcastic).

From KSP 1.8.0, a new old bug on Editor was detected when using the ReRoot feature. To reproduce the problem, fire up a KSP >= 1.8.0 (any one) completely "naked" (i.e., only DLCs installed, no 3rd parties) and then:

  1. Open VAB (SPH also works, but VAB is easier for this test).

  2. Place a FTL-400 Fuel Tank as root part:
    step-02

  3. Add 4 TT-38K Radial Decouplers in 4 radial symmetry:
    step-03

  4. Add another FTL-400 Fuel Tank on top of the root part:
    step-04

  5. Alt+Click (Clone) the newest Tank and place it over the original:
    step-05

  6. Alt+Click (Clone) the top Tank and place it over the original:
    step-06

  7. Click on the first Tank after the root and leave it on the side:
    step-07

  8. Select the ReRoot feature and ReRoot the 3 tanks stack to the center one:
    step-08

  9. Attach the stack into the Decoupler.

  10. Voilà:
    step-10

This M.O. was reproduced on KSP 1.8.1 and 1.12.5, it was assumed anything between is also affected.

This was not reproduced on anything below 1.8.0 (i.e., 1.7.3. to 1.4.1 works fine, didn't bothered to check 1.3.x and 1.2.x). The following ScreenShot is the result of the same procedure on KSP 1.7.3:

OK

Notes

I have reasons to believe that the ReRoot feature is screwing things beyound the Attachment Points, as at least one 3rd party PartModule I'm debugging is presenting misbehaviours after its part is ReRooted.

@Lisias Lisias added the enhancement New feature or request label Apr 23, 2023
@Lisias Lisias self-assigned this Apr 23, 2023
@Lisias
Copy link
Contributor Author

Lisias commented Apr 23, 2023

Hanlor's razor: "Never attribute to malice that which is adequately explained by stupidity." - but, boy, sometimes it's hard not to do such.

@net-lisias-ksp net-lisias-ksp locked as too heated and limited conversation to collaborators Apr 23, 2023
@Lisias
Copy link
Contributor Author

Lisias commented Apr 23, 2023

This is a craft made on the naked 1.8.1 test bed using only new parts from the Palette mimicking the steps on the OP (no clones, no dupes):
made-new.craft.zip

And this is a craft made using the steps from the OP:
made-bad.craft.zip

The files have different sizes, what is a hint that something is pretty different between them - besides being essentially the same parts tied together in the same way:

-rw-r--r-- 1 lisias staff  29363 Apr 23 17:43  made-bad.craft
-rw-r--r-- 1 lisias staff  29549 Apr 23 17:42  made-new.craft

@Lisias
Copy link
Contributor Author

Lisias commented Apr 23, 2023

KDIFF3 revealed some of the problems: not only the attachment coordinates are screwed, but the bad craft has missing attachment nodes!

Screen Shot 2023-04-23 at 17 50 10

The implications on any AddOn that needs such data (as TweakScale) are obvious.

@Lisias
Copy link
Contributor Author

Lisias commented Apr 25, 2023

This is the very same test done with TweakScale (and KSP-Recall). Apparently, other than the problems already mentioned above, no new misbehaviours were detected - the TweakScale (and Recall) PartModules were correctly handled.

The only difference is that the FTL-400 tanks from step 4 and forward were scaled up.

screenshot78

test-ts-new.craft.zip
test-ts-bad.craft.zip

Screen Shot 2023-04-25 at 10 48 16

@Lisias
Copy link
Contributor Author

Lisias commented Apr 25, 2023

Reproducing the test using only ScrapYard and OhScrap did not triggered any new misbehaviours (i.e., no Log Spam on Flight!).

I'm concluding that whatever is screwing up ScrapYard, it's happening on a later KSP Version (i.e., yet a new bug on KSP).

test-syd-bad.craft.zip
test-syd-new.craft.zip

Again - all the tests made until this moment were done on KSP 1.8.1.

@Lisias
Copy link
Contributor Author

Lisias commented Apr 28, 2023

Oukey, we are handling TWO problems when ScrapYard is involved.

On a nearly naked KSP 1.12.5 (only KSPe and my MM fork, and a specially debug compiling for ScrapYard and OhScrap), the problem described on the OP was easily reproduced:

But now things get hairy: the problem described on this post and also on zer0Kerbal/ScrapYard#81 WAS NOT!!

But I had reproduced the ScrapYard's FlowGraph LogSpam before on this very same KSP rig - but using the user's savegame. This savegame was created from scratch - what suggests that something on the user's machine is screwing their savegames.

The ReRoot feature is broken, no question about. But it's also only a trigger for the ScrapYard's LogSpam, there's something else royally screwing up things too on a collective bug org… uh… fest.

@Lisias
Copy link
Contributor Author

Lisias commented May 27, 2023

It was finally revealed that the ReRoot problem has not relation to the ScrapYard's LogSpam.

See #67 .

@Lisias
Copy link
Contributor Author

Lisias commented Sep 9, 2023

We have hard evidence that ReRoot is affecting also Stack Nodes:

#70 Rebalance (or not???) size1p5 to use Attachment Nodes with Size 1 instead of 2

I initially misdiagnosed the issue as being something related to the Attachment Node sizes, but apparently this is not a factor. The problem should be really the ReRoot feature, that it's completely screwed up. COMPLETELY. Since KSP 1.8.0.

Something similar is also affecting KSP2 at flight time, when docking and undocking. I suspect this may be affecting KSP¹ too - after all, last year after closing shop on KSP¹, Squad was hired to help on development of KSP2.

https://forum.kerbalspaceprogram.com/topic/218457-vessel-loses-its-tree-structure-on-reroot-to-clamp-o-tron-jr

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant