Project

General

Profile

Bug #5414

Decoupling creates empty ghost stage, Camera looses focus, Ship spins out of control

Added by Kosmognome over 8 years ago. Updated over 7 years ago.

Status:
Closed
Severity:
Low
Assignee:
-
Category:
Physics
Target version:
-
Start date:
09/15/2015
% Done:

100%

Version:
Platform:
Windows
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

When decoupling parts from a rocket, it can happen that empty "ghost" stages remain behind (See Picture 1 for original staging, Picture 2 for "ghost" stages, Picture 3 for another example of "ghost" stages).

These "ghost" stages apparently were ot correctly detached from the craft, and CoM calculations screw up, making the craft spin out of control. This can be seen very good in picture 3-5, where the rocket moves to the top of the screen (indicating that the COM, on which the camera focuses, moves below the rocket itself) and picture 7, where the rocket suddenly spins completely out of control. In another instance (no screen available), the prograde marker would start jumping uncontrollable over the 8-ball, indicating a severe bug in the calculation of the "forward" vector.

If the rocket is flown for a longer time after it spins out of control, the camera moves further and further away from it, making it almost impossible to see the vessel at all after some time.

If needed, I can record a video of the bug happening and upload it to YT.

KSP Version: 1.0.4 (No mods at all)
OS: Win 8.1, 64-Bit

I've also attached the .craft file of the vessel in question. I have not been able to extract a minimal test case, but this vessel can be used to repdouce the issue.

2015-09-15_00009.jpg (232 KB) 2015-09-15_00009.jpg 1: Original Staging Kosmognome, 09/15/2015 03:26 PM
2015-09-15_00011.jpg (194 KB) 2015-09-15_00011.jpg 2: Empty "ghost" stage, rocket moves to top of screen Kosmognome, 09/15/2015 03:26 PM
2015-09-15_00013.jpg (197 KB) 2015-09-15_00013.jpg 3: Another two "ghost" stages Kosmognome, 09/15/2015 03:27 PM
2015-09-15_00014.jpg (197 KB) 2015-09-15_00014.jpg 4: Camera looses focus, CoM shifts Kosmognome, 09/15/2015 03:27 PM
2015-09-15_00015.jpg (197 KB) 2015-09-15_00015.jpg 5: Camera looses focus, CoM shifts Kosmognome, 09/15/2015 03:27 PM
2015-09-15_00016.jpg (196 KB) 2015-09-15_00016.jpg 6: Rocket spins out of control Kosmognome, 09/15/2015 03:28 PM
Saturn VI CSM LM.craft (157 KB) Saturn VI CSM LM.craft Vessel to reproduce the issue Kosmognome, 09/15/2015 03:30 PM
ksp.log (63.6 KB) ksp.log Log file of a flight exhibiting the errorneous behavior Kosmognome, 09/15/2015 03:44 PM
2015-09-16_00001.jpg (163 KB) 2015-09-16_00001.jpg 1: Spinning out of control Kosmognome, 09/16/2015 09:40 AM
2015-09-16_00003.jpg (136 KB) 2015-09-16_00003.jpg 2: Chase cam (No ship visible) Kosmognome, 09/16/2015 09:40 AM
2015-09-16_00004.jpg (144 KB) 2015-09-16_00004.jpg 3. Locked cam (no ship visible either) Kosmognome, 09/16/2015 09:40 AM
Saturn VI CSM LM III.craft (136 KB) Saturn VI CSM LM III.craft Original vessel Kosmognome, 09/16/2015 09:41 AM
Saturn VI CSM LM III-Fixup.craft (136 KB) Saturn VI CSM LM III-Fixup.craft [email protected] Squelch, 09/18/2015 12:10 PM
7472
7473
7474
7475
7476
7477
7489
7490
7491

Related issues

Related to Kerbal Space Program - Bug #2355: KSP 0.23.5 exits when staging to TR-38-D couplerClosed04/05/2014

Related to Kerbal Space Program - Bug #2346: TR-38-D decoupler does not separate correctlyClosed04/04/2014

Related to Kerbal Space Program - Bug #5198: TR-38-D does not correctly decouple with struts involvedClosed07/01/2015

History

#1 Updated by Kosmognome over 8 years ago

Here is also the relevant part of the KSP.log file.

Notably around Line 176, when Stage 9 is activated, a stack overflow occurs:

[LOG 15:39:25.278] activating stage 9 - current stage: 10
[LOG 15:39:25.279] [Size3AdvancedEngine]: Activated
[EXC 15:39:25.313] StackOverflowException: The requested operation caused a stack overflow.
    Part.FindPartThroughNodes (.Part tgtPart, .Part src)

#2 Updated by RexKramer over 8 years ago

Not sure what is going on here. The attached craft file differs from the vessel in your screenshots slightly, it has additional boosters on the side. It causes KSP to crash to desktop when the first staging event is activated. Every time.

#3 Updated by rudi1291 over 8 years ago

Ok, so, i tested this. One ghost stage occurs, because the boosters are mounted on radial decouplers. Those decouplers are in their own stage, that never gets activated, and if you seperate the boosters together with the bottom core stage, they don´t show up anymore.
The other problems seem to be related to bug #2355, which leeds to a CTD on linux and mac os, but not on windows. However, it still creates a stackoverflow.

Kosmognome, can you test if the problem is solved by deleting "PhysicsSignificance = 1" from GameData/Squad/Parts/Structural/Size3Decoupler/part.cfg as suggested in bug #2355?

#4 Updated by Kosmognome over 8 years ago

7489
7490
7491

RexKramer wrote:

The attached craft file differs from the vessel in your screenshots slightly, it has additional boosters on the side.

Sorry, will upload the correct file ASAP. I tested around in order to debug the problem, and that vessel produces two ghost stages as seen in Image 3.

It causes KSP to crash to desktop when the first staging event is activated. Every time.

Not on my system. I'm on Win 8.1, 64-Bit (using the Steam version, if that's relevant), and the attached vessel only produces the stackoverflow error that can be found in the log. After separation, the rocket moves out of the screen to the top and then starts spinning out of control.

One ghost stage occurs, because the boosters are mounted on radial decouplers.

Still, that shouldn't make the game behave weird. Furthermore, see the attached vessel, it doesn't use radial decouplers at all and still produces this ghost staging and spinning out of control.

However, in my tests of that vessel today the spinning out of control did not happen when a ghost stage is present. See the first attached picture, you can see that the ship moves out of the screen when stage 7 is active and starts to spin out of control. Images 2 and 3 chase and locked camera mode, but the camera is already so far away from the vessel that it isn't even visible anymore. Navball shows the craft is completely out of control. Except of staging, I didn't issue any inputs, so the vessel should simply fly straight up.

#5 Updated by Kosmognome over 8 years ago

rudi1291 wrote:

Kosmognome, can you test if the problem is solved by deleting "PhysicsSignificance = 1" from GameData/Squad/Parts/Structural/Size3Decoupler/part.cfg as suggested in bug #2355?

Ok, so I've tested this. Editing the part.cfg that way removes the ghost stages from the last attached vessel. The problem with camera moving away and the spinning out of control is still present, thorugh. This seems to suggest that the ghost stages are not all responsible for the problem (albeit still annoying).

#6 Updated by RexKramer over 8 years ago

  • Related to Bug #2355: KSP 0.23.5 exits when staging to TR-38-D coupler added

#7 Updated by RexKramer over 8 years ago

  • Related to Bug #2346: TR-38-D decoupler does not separate correctly added

#8 Updated by RexKramer over 8 years ago

  • Related to Bug #5198: TR-38-D does not correctly decouple with struts involved added

#10 Updated by RexKramer over 8 years ago

The reports in #5198 and #5216 have very clear and simple reproduction steps.

#11 Updated by bv1 over 8 years ago

Are you sure that this issue should have "critical" priority? Are you really sure about that?

#12 Updated by Squelch over 8 years ago

  • Status changed from New to Need More Info
  • Severity changed from Critical to Low

#13 Updated by Squelch over 8 years ago

Due to how Unity joint strength works, a compromise had to be met with the TR-38D. This generally works, but we have found that adding struts can have an adverse effect as seen in #5198. It is hoped that joint strength will increase as a result of changes in how Unity works which would obviate the current situation. The TR-38D doesn't like being staged at the same time as an engine, and will be seen to stick. This stickiness, combined with struts leaves the staging in an indeterminate state (the engine and decoupler have detached, but the struts remain connected) which has the effect of shifting the CoM and consequential loss of control. This situation is also shown in the staging column where the bottom icon is empty.

The workaround for this situation, and probably all others that involve this decoupler, is to stage them separately. Simply move all TR-38D decouplers to a stage preceding the next stage engine. Staging then becomes a 3 phase affair.

  1. Current engine decouples from the decoupler.
  2. Decoupler detaches from next stage engine.
  3. New stage engine fires.

Any struts will then automatically attach to the nearest part (the part being jettisoned) and not the useful part of the craft.

I have tested your craft using the above, and can see no further issues. Please report back if you also have success.

#14 Updated by Kosmognome over 8 years ago

bv1 wrote:

Are you sure that this issue should have "critical" priority? Are you really sure about that?

It not for me to decide, but an issue that crashes the game on 2/3s of the plattform that can be triggered by normal gameplay easily by just using a stock part should imho be more then low priority (or am I the only one who uses 3.75m parts?!). There is at first the NullReferenceException in the editor that seems to be surpressed by the game which indicates a significant problem with how he game handles the data model, and may even be connected to the later stackoverflow error in flight (in fact, i think it is very likely connected).

I have tested your craft using the above, and can see no further issues. Please report back if you also have success.

Yes and no. Change the staging so that the decoupler directly above the Cargo bay and the rokomax decoupler above that are on separate stages. Fly straight up until fuel is burn out of the stages below the cargo hold. Use the decoupler. Normally, you would now use RCS to move a bit away from the cargo bay, turn the CSM around, and use the Rokomax decoupler to jettison the 3.75 to 2.5 adapter. However, after using the 3.75 decoupler above the cargo bay, the CoM again is completely wrong. activate RCS and press 'H' and the ship will move out of the camera focus and will leave the screen to the top again. In that case, the decoupler is on it's own stage, but still exhibits very strange behavior.

I'll upload some screenshots and craft files later on.

#15 Updated by Squelch over 8 years ago

Please try this fixed up version of your craft.

There is one caveat. When the S-IVB is decoupled (top 38D) the focus will be on the garaged LM, this is due to the top 38D decoupler being reversed. Simply switch to the CM, rotate, decouple the adapter and then dock to extract the LM. This was achieved in a vertical suborbital, and ~150km circularised parking orbit.

Tip: Open the lower bay doors, disable crossflow on the payload decoupler, and button up again before launch. This ensures the fuel isn't robbed during ascent.

#16 Updated by Kosmognome over 8 years ago

Hallo Squelch,
this seems to work, thank you very much.

However, it kind of unsatisfying to have to drop the decouplers that way. It doesn't look good, it creates a very excessive amount of stages and it is very inconvenient to work with. basically every craft that uses 3.75 decouplers has to be designed around their bugs, and has to be staged around their bugs. You can't just build a rocket and it works. And I'm still not sure if I understand how I would need to stage and build another vessel with 3.75m decouplers so that I don't run into the same problem again.

Tip: Open the lower bay doors, disable crossflow on the payload decoupler, and button up again before launch. This ensures the fuel isn't robbed during ascent.

I've replaced that with a rokomax decoupler, works much better and makes extracting the LM also a smoother process.

Anyways, thanks for your time and patience ;)

#17 Updated by Squelch over 8 years ago

  • Status changed from Need More Info to Investigating
  • % Done changed from 0 to 20

No problem, and I'm pleased it worked for you.

Yes, it is awkward needing to work around the issue, and this should not be seen as a permanent solution. Therefore I have set this issue to "Investigating" status while the problem is being worked on. It also remains visible should anyone else run into it.

#18 Updated by TriggerAu almost 8 years ago

  • Status changed from Investigating to Needs Clarification
  • % Done changed from 20 to 0

#19 Updated by bewing almost 8 years ago

  • Status changed from Needs Clarification to Resolved
  • % Done changed from 0 to 100

In ver 1.1.3, I launched the test ship with the side boosters. There were no ghost stages anymore. For some reason I had to decouple the decouplers by hand. But the rocket basically launched properly.
(The lights on the LM were too big to fit inside the cargo bay, so the LM was stuck inside and never got out.)
Marking the issue resolved.

#20 Updated by TriggerAu over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF