Project

General

Profile

Bug #2367

Nonphysical timewarp causes phantom torque on ships in physics range

Added by Kerano over 10 years ago. Updated over 8 years ago.

Status:
Closed
Severity:
Normal
Assignee:
-
Category:
Physics
Target version:
-
Start date:
04/07/2014
% Done:

100%

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

Description

Version: 0.23.5.464 (fresh install, no mods)

Summary: When within physics range of a clawed asteroid (ship #1) with a second spacecraft (ship #2), switching in and out of nonphysical timewarp on ship #2 results in ship #1 experiencing a wild torque when the two craft come within 200 m. This bug seems to occur with no appearance of a NullReferenceException in the debug log.

Quicksave file where this bug can be repeatedly reproduced:

https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/Save%201/quicksave.sfs

Steps to reproduce:

1. Load quicksave
2. Rotate camera (approaching asteroid is behind you, about 12 seconds away)
3. Briefly nonphysical timewarp (flick 5x then back) while still at >200 m distance
4. Observe the second craft behaving normally until 200 m distance
5. Observe a wild phantom torque acting on the second craft at <200 m distance

The 200 m distance coincides exactly with an “unpacking” message for the asteroid ship in the debug menu.

Unlike with the NullReferenceException bugs reported earlier, nonphysical timewarp remains usable after encountering this phantom torque, and neither ship has a locked velocity. Note that reloading this quicksave multiple times without exiting/restarting will eventually result in a NullReferenceException though, and reloading beyond that point will eventually trigger a rapid disassembly of the spacecraft you’re focussed on whenever nonphysical timewarp is used (due to an apparently separate “locked velocity” bug detailed here: http://bugs.kerbalspaceprogram.com/issues/2349).

If you leave out step 3 (no nonphysical timewarp while approaching the asteroid), both ships behave normally and never experience the phantom torque. If you nonphysical timewarp at <200 m instead of >200 m, sometimes both ships behave normally and other times there’s a phantom torque or explosion. If you nonphysical timewarp after passing by the asteroid at >200 m, no ill effects seem to occur.

Entering nonphysical timewarp a second time after step 5 will stop the clawed asteroid from torqueing and leave it travelling in a somewhat different orbit than it had previously. Depending on the orientation of the asteroid-spacecraft system when nonphysical timewarping a second time, the attached craft may survive or it may explode.

Screenshots before and after the phantom torque is triggered on the asteroid ship (note the sudden change in the target retrograde position on the navball):

https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/screenshot561.jpg
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/screenshot563.jpg

Output log files from repeated tests:

https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/Output%201/output_log.txt
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/Output%202/output_log.txt
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/Output%203/output_log.txt


Related issues

Related to Kerbal Space Program - Bug #3988: Advanced Grabbing Unit Loss of reference to parent shipClosed01/25/2015

History

#1 Updated by Kerano over 10 years ago

After further testing, I've found there's an even simpler method to trigger the "phantom torque" which involves no use of nonphysical timewarp.

1. Load quicksave
2. Switch to the asteroid while still at >200 m distance (using "[" or "]" or the map view)
3. Observe immediate phantom torqueing on the asteroid craft

Note if you switch crafts at <200 m distance (after the "unpacking" message in the debug log), no phantom torque occurs. The phantom torque also doesn't occur if you wait until passing the asteroid then switch at >200 m on the other side. Nor does it occur if you go back to the space centre and switch to the asteroid while the other craft is approaching (whether using nonphysical timewarp or switching crafts at >200 m or <200 m).

So it looks like the issue is confined to approaching a clawed asteroid with a second craft within physics range. Using nonphysical timewarp or switching crafts when the separation is >200 m results in the phantom torque.

I'm curious to test what happens when two clawed asteroids are approaching each other - my suspicion is the one you're not controlling will always experience the phantom torque. When I get a chance to test it I'll report my findings.

#2 Updated by Kerano over 10 years ago

Hmm, this bug seems harder to trace than I expected. I got two clawed asteroids within physics range of one another, tried all sorts of variations with nonphysical timewarp and switching vessels, but never managed to trigger the specific bug where the other spacecraft develops a phantom torque. I got the NullReferenceException bug frequently through all the reloading, which tore apart the vessel I was controlling a number of times, but never got a phantom torque to appear on the other craft.

Screenshot of the situation:
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/Two%20asteroids/screenshot601.jpg

Quicksave with the two asteroids in physics range:
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/Two%20asteroids/quicksave.sfs

The bug described above still occurs every time when I use the quicksave from the first post.

#3 Updated by Kerano over 10 years ago

Okay, I just got the “torqueing another craft” bug to reliably happen with two asteroid ships. Again this seems to present with no NullReferenceException in the debug log.

Persistence file:
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/Save%202/persistent.sfs

Steps to reproduce:
1. Go to space centre
2. Load asteroid ship “Daring Dave” (in physics range of asteroid cluster “Hairy Harry”, distance ~900 m)
3. Switch from “Daring Dave” to “Hairy Harry” (using “[“ or “]” or the map view)
4. Observe phantom torqueing

Screenshot at step 1:
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/screenshot640.jpg

Debug menu at step 2:
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/screenshot645.jpg

Debug menu at step 4 (after trying to switch back a couple of times):
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/screenshot648.jpg

Note that if you load “Hairy Harry” from the space centre there is no phantom torqueing on the craft. There is also no phantom torqueing if you switch (via “[“ or “]” or the map view) to “Daring Dave” after loading “Hairy Harry”.

Note also that quicksaving and reloading to “Daring Dave” or “Hairy Harry” in this situation almost always produces a NullReferenceException on the first try (possibly due to the number of claws in physics range). Trying to switch crafts after the NullReferenceException appears usually fails and instead results in phantom forces being applied to the craft you’re controlling (see http://bugs.kerbalspaceprogram.com/issues/2349).

Output logs from repeated tests:
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/Output%2021/output_log.txt
https://dl.dropboxusercontent.com/u/87213001/KSP/Torquing%20another%20craft/Output%2022/output_log.txt

#4 Updated by Ted over 10 years ago

  • Category changed from Bug Tracker to Physics
  • Status changed from New to Confirmed
  • Severity changed from High to Normal
  • % Done changed from 0 to 10

Just lowering the priority as having a number of asteroids strung together is quite the edge case.
I can confirm this here though. Excellent documentation btw, made for a very easy reproduction of the issue.
Thanks.

#5 Updated by Kerano over 10 years ago

No worries, happy to help.

Did the original save file from the first post also produce the issue for you? That was just a single ship approaching a single clawed asteroid - quite a typical occurrence - hence why I originally thought the issue might be higher priority. :) (Note in the original save file the bug is also triggered for me by using "[" or "]" or the map view to switch to the other ship at >200 m.)

#6 Updated by TriggerAu over 8 years ago

  • Status changed from Confirmed to Needs Clarification
  • % Done changed from 10 to 0

#7 Updated by TriggerAu over 8 years ago

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

Closing this report out for now. If you find it is still occuring in the latest version of KSP please open a new report (and this one can be linked to it.) For best results, the wiki contains really useful info for when creating a report http://bugs.kerbalspaceprogram.com/projects/ksp/wiki.

You can also ask questions about the bug cleanup in the forum here: http://forum.kerbalspaceprogram.com/index.php?/topic/143980-time-to-clean-up-the-bug-tracker/ and tag @TriggerAu to get my attention

Also available in: Atom PDF