Project

General

Profile

Bug #14391

Takeoff from the Mun causes ArgumentNullException

Added by rudi1291 11 days ago. Updated 10 days ago.

Status:
Updated
Priority:
Low
Assignee:
-
Category:
Gameplay
Target version:
-
Start date:
03/19/2017
% Done:

10%

Version:
Platform:
Windows

Description

Taking off from the Mun causes a ArgumentNullException and subsequent NullRefExceptions. The ArgumentNullException seems to be caused by the localization subsystem.

ArgumentNullException: Argument cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[System.String,System.String].TryGetValue (System.String key, System.String& value) [0x00000] in <filename unknown>:0 
  at KSP.Localization.Localization.ReplaceSingleTagIfFound (System.String tag) [0x00000] in <filename unknown>:0 
  at KSP.Localization.Localization._Format (System.String template, System.String[] parameterList) [0x00000] in <filename unknown>:0 
  at KSP.Localization.Localization.Format (System.String template) [0x00000] in <filename unknown>:0 
  at Vessel.SetLandedAt (System.String landedAt, UnityEngine.GameObject gO, System.String inputdisplaylandedAt) [0x00000] in <filename unknown>:0 
  at Part.OnCollisionStay (UnityEngine.Collision c) [0x00000] in <filename unknown>:0 

I´ve tested the same situation in 1.2, and the exception(s) do not occur. The exception only occurs if staging and takeoff happen at the same time.

Steps to Replicate:
0) (Optional) Activate the debug option to show exceptions on the screen
1) Load the attached quicksave (mun_takeoff.sfs)
2) Make sure the terrier engine is off and the stages are arranged like they are on the first screenshot.
3) Set throttle to 100% and stage. The decoupler should fire and the puffs activate, leaving the landing leg assembly behind.
4) Fly out of physics range (>2.3km away)
5) Try to quicksave or return to the space center.

Observed: Two Exceptions are generated at takeoff (or rather the staging event): the ArgumentNullException from above and a NullRefException. Each subsequent try to quicksave, leave to space center or tracking station, exit to main menu or switch vessels results in a NullRef and isn´t working. Quickloading is possible and seems to "reset" the exceptions.
It also works fine (without exceptions) in 1.2. A modified quicksave is attached.

Workarounds:
Takeoff using the terrier engine and stage then.

mun_takeoff.sfs (825 KB) rudi1291, 03/19/2017 10:49 AM

output_log.txt View (587 KB) rudi1291, 03/19/2017 10:49 AM

mun_takeoff_modified_120.sfs (825 KB) rudi1291, 03/19/2017 10:50 AM

screenshot707.png View (1.46 MB) rudi1291, 03/19/2017 10:52 AM

screenshot708.png View (1.32 MB) rudi1291, 03/19/2017 11:05 AM

Mun Apollo Style Mission Rocket.craft - Full mission kit (133 KB) rudi1291, 03/20/2017 05:36 PM

Mun Apollo Style Mission Rocket Lander.craft - Just the lander (33 KB) rudi1291, 03/20/2017 05:42 PM

28527
28528

History

#1 Updated by sal_vager 10 days ago

  • Status changed from New to Need More Info

Hi rudi1291, it appears to be caused by your craft when it is staged, not the Mun or the act of taking off.

Can you provide the craft file, thank you.

#2 Updated by rudi1291 10 days ago

Heres the craft file, both the original craft file for the full mission and the lander just on itself. 'Launching' the lander from the launchpad should be enough to trigger the exceptions on the first staging event.

#3 Updated by rudi1291 10 days ago

  • Status changed from Need More Info to Updated
  • % Done changed from 0 to 10

Sorry, almost forgot to say that this craft was updated from 1.0.5, the original craft file from 1.0.5 can be downloaded from KerbalX if needed: https://kerbalx.com/rudi1291/Mun-Apollo-Style-Mission-Rocket

Also available in: Atom PDF