Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

SSPX Centrifuges causing explosions in combination with EPL due to drag cube errors. #119

Closed
StormCircuit opened this issue Feb 2, 2023 · 4 comments
Labels
bug Something isn't working mod-compat Compatibity issue with another mod

Comments

@StormCircuit
Copy link

StormCircuit commented Feb 2, 2023

I am getting drag cube errors from fastloader with the SSPX centrifuges. I tried version 1.24.5 and 1.24.2 but had the same issue in both. It causes kraken explosions when built with Extraplanetary Launchpads but otherwise seems benign. Furthermore it only affects certain centrifuges, almost only the giant ones, specifically the Mercury, Pilgrim, and Cronus. Attached is logs from a session with the minimum to reproduce wherein I fly a vehicle on the launchpad already built and tell it to finalize a vehicle that is literally just two Cronus centrifuges stacked. I tried a bunch of combinations of the order and all exploded.

KSP version:
1.12.5

mods:
Harmony
B9PartSwitch
ExtraplanetaryLaunchpads
Kerbaltek (Hyperedit)
KSPCommunityFixes
NearFutureProps
SimpleConstruction
SSPX (station parts redux)
SSPX IVA
ModuleManager 4.2.2

(if you want to test with Simple Construction/Extraplanetary Launchpads I suggest cranking up the productivity rating in the mod's sciencelab MM config file. Setting it to 100 will make things build instantly).

KSP.log

@StormCircuit StormCircuit changed the title SSPX Centrifuges still have drag cube error from fastloader SSPX Centrifuges causing explosions in combination with EPL due to drag cube errors. Feb 2, 2023
@StormCircuit
Copy link
Author

Admittedly I did not check the logs before I uploaded them. In past logs I was seeing the drag cube error but this time it appears they are not there. I am unsure why but I do know this is somehow related to CommunityFixes. It certainly does not occur without it.

@gotmachine
Copy link
Contributor

As a preamble, you can fix this by disabling the PartStartStability KSPCF patch, open the KSPCommunityFixes\Extras\KSPCF_UserSettings.cfg.extra file in a text editor an follow instructions there to do that.

Also, in any case, EPL/SimpleConstruction currently are incompatible with KSPCF due to #98

For reference, exact steps to reproduce :

  • KSP 1.12.5, KSPCF 1.24.5 (also reproducible with 1.23.0), SSPX 2.0.10, B9PS 2.20.0, SimpleConstruction 4.0.99.33 (repackaging EPL 6.99.3)
  • New sandbox game
  • Grab 2 SSPX "SDV-X Cronus" centrifuges (also reproducible with the "Pilgrim" and "Mercury", but not with the "Coriolis"), stack one on top of another (this doesn't reproduce with a single part, only if 2 of them are stacked on top of another), save the craft as ToBuild
  • New craft, grab a stock lab, radially put a few big ore tanks around it, B9PS-switch them to hold "RocketParts", fill them
  • Add a big docking port on the lab, add a command module somewhere
  • Save the ship as "builder", launch it
    image
  • Open the EPL window, and try to build the ToBuild craft
  • If the KSPCF PartStartStability is enabled, a Kraken event occurs with the following log entries :
[EL] CraftParts root sspx-expandable-centrifuge-375-1 (Part)
Unpacking builder
[F: 19693]: [sspx-expandable-centrifuge-375-1] Collision Enhancer Punch Through - vel: 706.9093
sspx-expandable-centrifuge-375-1 Exploded!! - blast awesomeness: 0.5

So, I don't know what the exact root cause is, but this is somehow a triple interaction between B9PS, the PartStartStability patch and EPL. The common factor between all the SSPX parts where this is reproducible is that they produce the following error on flight part load :
[ERROR] [Part sspx-expandable-centrifuge-5-1] [ModuleB9PartSwitch 'endcapSwitch2'] Cannot reassign cube weights: had 2 cubes before but now have 4.

Further findings :

  • The kraken event is only reproducible when those parts are instantiated by EPL while the PartStartStability patch is enabled, and doesn't reproduce if the patch is disabled
  • The B9PS error does happen in a stock + SSPX + B9PS install, it has nothing to do with KSPCF or EPL.
  • The B9PS error also doesn't produce anything wrong in stock + SSPX + B9PS + KSPCF install (with PartStartStability enabled) if you try to make a vessel with two of those parts stacked together.
  • The B9PS error doesn't show up in the kraken-inducing setup, when EPL-building the craft while PartStartStability is enabled, but it does show up when EPL-building the craft while PartStartStability is disabled (or if KSPCF isn't installed).
  • The kraken event isn't reproducible if the B9PS module mentioned in the error message (endcapSwitch2) is commented out from the incriminated SSPX part configs.

So... I'm tempted to say that KSPCF, EPL and SCON are merely victim of an issue whose root cause lies in a SSPX/B9PS interaction. I suspect the root cause is in the ModuleDeployableCentrifuge from SSPX implementing the multiple drag cube interface with discrete drag cubes while B9PS is configured to use procedural drag cubes.

@gotmachine
Copy link
Contributor

So, actually, I was quite close.
The issue lies in the SSPX configs missing affectDragCubes = false entries on some B9PS modules.
Basically, any part that has a ModuleDeployableCentrifuge or ModuleDeployableHabitat, and also one or more ModuleB9PartSwitch where some transform are switched must define affectDragCubes = false in those B9PS modules.
That entry is missing in a few cases.

See post-kerbin-mining-corporation/StationPartsExpansionRedux#315

All this being said, while it's unfortunate that the PartStartStability patch is causing kraken events due to that third-party issue, it shall be noted that the point of this patch is to make the behavior of part initialization deterministic and it's probable that this issue could be reproduced in (rare) circumstances in a stock install when fixed dt per frame is set high enough and when update cycles are dropped in extreme lag situation.

@StormCircuit
Copy link
Author

Thanks for the help and the write up! Makes sense. I will see what I can do. It sounds like a simple MM patch to change the dragcube setting on all the centrifuges should about fix it. I will work on that, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mod-compat Compatibity issue with another mod
Development

No branches or pull requests

2 participants