Project

General

Profile

Bug #5287

Crash to black screen on collision with launchpad

Added by Kasuha almost 9 years ago. Updated over 7 years ago.

Status:
Closed
Severity:
Normal
Assignee:
-
Category:
Gameplay
Target version:
-
Start date:
07/30/2015
% Done:

100%

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

Description

I discovered this accidentally when trying to replicate the bug with Kerbals stuck after collisions in command seats. It may, or may not be related to the problem. A kerbal in the seat is necessary condition, when I keep him in the pod the game does not crash.
These reproduction steps work consistently on my PC and ended with black screen in 100% of attempts (I made somewhere between 10 and 20, both in existing and new saves). The scenario however may be sensitive to design of the ship as its previous (higher) version did not crash this way. I assume it may be also sensitive to framerate or other settings.

Reproduction steps:

  • start a new Sandbox save
  • load the attached ship and put the Kerbal into command seat, or load the attached quicksave
  • stage to launch
Observed behavior:
Expected part:
  • the SRB with command seat decouples from the pod and speeds towards launchpad
  • the SRB collides with launchpad and explodes
    Anomaly:
  • black screen (attached) follows shortly after the explosion happens. No values on altimeter, navball is hidden. Resources display shows EVA propellant only.
  • It is possible to revert the flight but the game does not work normally - the whole solar system is gone, both normal and map view are empty

There is a whole lot of unusual messages in output_log.txt, almost 20,000 lines of them. Here are some examples in chronological order:

Invalid parameter because it was infinity or nan.
(Filename: Line: 251)
dest.radius>=0.0f
(Filename: ..\..\Core\Common\src\CapsuleShape.cpp Line: 133)
Actor::setAngularDamping: The angular damping must be nonnegative!
recalculating orbit for kerbalEVA: Kerbin
rPos: [NaN, NaN, NaN] rVel: [NaN, NaN, NaN] |NaN|
[FLIGHT GLOBALS]: Switching To Vessel Jebediah Kerman ----------------------
setting new dominant body: the Sun
FlightGlobals.mainBody: the Sun
Vessel kerbalEVA velocity resumed. Reference body: Sun vel: [NaN, NaN, NaN]
Look rotation viewing vector is zero
(Filename: Line: 70)

And ending with some exceptions:

NullReferenceException
at (wrapper managed-to-native) UnityEngine.MonoBehaviour:StartCoroutine_Auto (System.Collections.IEnumerator)
at UnityEngine.MonoBehaviour.StartCoroutine (IEnumerator routine) [0x00000] in <filename unknown>:0
at ProgressTracking.postProgressData (UnityEngine.MonoBehaviour host) [0x00000] in <filename unknown>:0
at ProgressTracking.OnDestroy () [0x00000] in <filename unknown>:0

NullReferenceException: Object reference not set to an instance of an object
at ProtoCrewMember.UnregisterExperienceTraits (.Part part) [0x00000] in <filename unknown>:0
at Part.UnregisterCrew () [0x00000] in <filename unknown>:0
at Part.OnDestroy () [0x00000] in <filename unknown>:0

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component:InternalGetGameObject ()
at UnityEngine.Component.get_gameObject () [0x00000] in <filename unknown>:0
at MapView.OnDestroy () [0x00000] in <filename unknown>:0

NullReferenceException
at (wrapper managed-to-native) UnityEngine.MeshFilter:set_sharedMesh (UnityEngine.Mesh)
at SpriteMesh.CreateMesh () [0x00000] in <filename unknown>:0
at SpriteMesh.get_mesh () [0x00000] in <filename unknown>:0
at SpriteRoot.Delete () [0x00000] in <filename unknown>:0
at SpriteBase.Delete () [0x00000] in <filename unknown>:0
at UIListItemContainer.Delete () [0x00000] in <filename unknown>:0
at UIScrollList.RemoveItem (Int32 index, Boolean destroy, Boolean doEasing) [0x00000] in <filename unknown>:0
at UIScrollList.RemoveItem (IUIListObject item, Boolean destroy, Boolean doEasing) [0x00000] in <filename unknown>:0
at UIScrollList.RemoveItem (IUIListObject item, Boolean destroy) [0x00000] in <filename unknown>:0
at ApplicationLauncher.RemoveApplication (.ApplicationLauncherButton button) [0x00000] in <filename unknown>:0
at ResourceDisplay.OnDestroy () [0x00000] in <filename unknown>:0

Crasher.craft (17.2 KB) Crasher.craft Testing vehicle Kasuha, 07/30/2015 07:23 PM
quicksave.sfs (40.2 KB) quicksave.sfs Qucksave with the ship deployed on launchpad and Kerbal already in command seat Kasuha, 07/30/2015 07:23 PM
screenshot79.png (55 KB) screenshot79.png Black screen right after the crash with resources display open Kasuha, 07/30/2015 07:24 PM
screenshot78.png (446 KB) screenshot78.png Screen after revert to launch Kasuha, 07/30/2015 07:24 PM
output_log.txt (908 KB) output_log.txt Kasuha, 07/30/2015 07:25 PM
settings.cfg (24.6 KB) settings.cfg My settings, if needed to reproduce the issue Kasuha, 07/30/2015 07:28 PM
Crasher2.craft (17.8 KB) Crasher2.craft Improved test rig, added platform for Kerbal to stand on Kasuha, 08/03/2015 01:57 PM
output_log_ladder.txt (824 KB) output_log_ladder.txt Output log when the Kerbal holds on the ladder before boarding the seat; game crashes Kasuha, 08/03/2015 01:57 PM
output_log_platform.txt (467 KB) output_log_platform.txt Output log when the Kerbal stands on the platform before boarding the seat; no crash Kasuha, 08/03/2015 01:57 PM
7202
7203

History

#1 Updated by Squelch almost 9 years ago

  • Status changed from New to Investigating
  • % Done changed from 0 to 20

I beleive there are a number of issues here that are caused by a single event.

[KerbalSeat]: Boarded by Crasher

It looks like there is an incorrect vessel reference (Crasher being the name of the original craft and not the Kerbal). This seems to cause a chain of subsequent log entries that may also be at the root of other Command Seat issues.

An assembly that includes an occupied command seat and that hits the pad ~>65m/s will create the same log entries and dead end condition. This may be as a result of the above observation, so needs further investigation.

#2 Updated by Kasuha almost 9 years ago

I added a small platform to my test rig and the result of my testing is:

When I seat the Kerbal while holding on the ladder, the game crashes
When I seat the Kerbal while standing on the platform, the game produces an exception in log, but does not crash

I produced two output logs. I made effort to use exactly the same steps when starting up the game and setting up the scenario, so making a diff of them is possible. Messages

[KerbalSeat]: Being Boarded by Jebediah Kerman
[KerbalSeat]: Boarded by Crasher2

appear in both of them. These seem to be ok. The difference really starts with "Invalid parameter because it was infinity or nan." message in case of crash. In case of no crash (seated from platform) there is the following exception instead:

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component:InternalGetTransform ()
at UnityEngine.Component.get_transform () [0x00000] in <filename unknown>:0
at PQSCity.OnSphereReset () [0x00000] in <filename unknown>:0
at PQS.Mod_OnSphereReset () [0x00000] in <filename unknown>:0
at PQS.ResetSphere () [0x00000] in <filename unknown>:0
at PQS.OnDestroy () [0x00000] in <filename unknown>:0
(Filename: Line: -1)

#3 Updated by Kasuha almost 9 years ago

I made two quicksaves - one after seating the Kerbal from a ladder, another after seating the Kerbal from the platform. Loading either quicksave leads to the crash, regardless how the Kerbal got into the seat. Also there is no significant difference between the contents of the two quicksaves. This means that restoring the game state with a Kerbal in seat is also done the "wrong" way, similar to seating the Kerbal from a ladder.

#4 Updated by Squelch almost 9 years ago

Great work, and thanks for looking into this.

Kasuha wrote:

I produced two output logs. I made effort to use exactly the same steps when starting up the game and setting up the scenario, so making a diff of them is possible. Messages

[KerbalSeat]: Being Boarded by Jebediah Kerman
[KerbalSeat]: Boarded by Crasher2

appear in both of them. These seem to be ok. The difference really starts with "Invalid parameter because it was infinity or nan." message in case of crash. In case of no crash (seated from platform) there is the following exception instead:

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component:InternalGetTransform ()
at UnityEngine.Component.get_transform () [0x00000] in <filename unknown>:0
at PQSCity.OnSphereReset () [0x00000] in <filename unknown>:0
at PQS.Mod_OnSphereReset () [0x00000] in <filename unknown>:0
at PQS.ResetSphere () [0x00000] in <filename unknown>:0
at PQS.OnDestroy () [0x00000] in <filename unknown>:0
(Filename: Line: -1)

The "[KerbalSeat]: Boarded by Crasher2" is unusual as it only happens when a Kerbal boards a command seat. Boarding all other pods results in the Kerbal being correctly identified, and not the vessel boarding itself. I also see the NRE, but have another entry that looks suspicious, and has been attributed to other bad behaviour once triggered.

[LOG 16:02:02.360] [KerbalSeat]: Being Boarded by Jebediah Kerman
[WRN 16:02:02.361] [PartJoint]: None of the provided nodes was valid!
[LOG 16:02:02.363] [FLIGHT GLOBALS]: Switching To Vessel Untitled Space Craft ----------------------

Are you able to confirm this?

The vessel is nothing more than a Mk1 pod with a command seat on the side.

#5 Updated by Kasuha almost 9 years ago

The "[KerbalSeat]: Boarded by Crasher2" is unusual as it only happens when a Kerbal boards a command seat. Boarding all other pods results in the Kerbal being correctly identified, and not the vessel boarding itself.

Pods and command seats are very different.

When boarding a command pod, the Kerbal becomes part of the pod's inventory. No physical force can get a Kerbal out of the pod, it either survives or dies in explosion. It does not even affect mass of the pod (or at least never did).

When boarding a command seat, the Kerbal becomes a new part of the ship, kind of like if it docked with it - a separate part with a joint between the Kerbal and the seat and this joint can be broken by physical forces.

The two processes are very different.

The sequence

[KerbalSeat]: Being Boarded by Jebediah Kerman
[PartJoint]: None of the provided nodes was valid!
[FLIGHT GLOBALS]: Switching To Vessel Crasher2 ----------------------
Camera Mode: AUTO
stage manager resuming...
[KerbalSeat]: Boarded by Crasher2

appears in both my two logs from my update 2 and the result (black screen crash when boarded from ladder, exception and normal continuing when boarded from platform) does not seem to depend on its presence.

#6 Updated by Squelch almost 9 years ago

Kasuha wrote:

The "[KerbalSeat]: Boarded by Crasher2" is unusual as it only happens when a Kerbal boards a command seat. Boarding all other pods results in the Kerbal being correctly identified, and not the vessel boarding itself.

Pods and command seats are very different.

When boarding a command pod, the Kerbal becomes part of the pod's inventory. No physical force can get a Kerbal out of the pod, it either survives or dies in explosion. It does not even affect mass of the pod (or at least never did).

When boarding a command seat, the Kerbal becomes a new part of the ship, kind of like if it docked with it - a separate part with a joint between the Kerbal and the seat and this joint can be broken by physical forces.

The two processes are very different.

The sequence

[KerbalSeat]: Being Boarded by Jebediah Kerman
[PartJoint]: None of the provided nodes was valid!
[FLIGHT GLOBALS]: Switching To Vessel Crasher2 ----------------------
Camera Mode: AUTO
stage manager resuming...
[KerbalSeat]: Boarded by Crasher2

appears in both my two logs from my update 2 and the result (black screen crash when boarded from ladder, exception and normal continuing when boarded from platform) does not seem to depend on its presence.

You are of course correct in your observation of the Kerbal becoming a part of the vessel via the kerbalEVA placeholder part. However, I was exploring the possibility of an incorrect root part being the cause of the later black screen lockup caused by NaNs. It may well be that the vessel boarding the vessel is just an artefact of the reporting text system that is coincidental to the problem. The invalid nodes are also unique to the seat, and I can't help speculate that these both play a factor during the rapid series of events during the explosion. By using different impact velocities in my tests, the black screen occurs around the time that the seat and the Kerbal would be destroyed. I have managed to destroy the whole craft - including seat - to be left with the Kerbal alone and no lock up ( I think this needs exploring further)

This does look like there may be a race condition during the explosion that is leaving the vessel state, and therefore its orbital state indeterminate which are causing the NaNs. From observation of the behaviour in previous reports that included NaN (not a number) events, the subsequent behaviour of the game and it requiring a restart, follows the same pattern. This is of course not desirable, even in edge cases like this.

I've made a note to use this as a test case for the upcoming testing. It's certainly noteworthy.

#7 Updated by TriggerAu almost 8 years ago

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

#8 Updated by TriggerAu over 7 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