Kerbalism icon indicating copy to clipboard operation
Kerbalism copied to clipboard

ArgumentNullException in Lib.ModulePrefab

Open tailriver opened this issue 4 years ago • 1 comments

The following message appears very often in KSP.log (approximately every 20ms):

[EXC 03:30:04.978] ArgumentNullException: Value cannot be null.
Parameter name: key
	System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
	System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
	KERBALISM.Lib.ModulePrefab (System.Collections.Generic.List`1[T] module_prefabs, System.String module_name, System.Collections.Generic.Dictionary`2[TKey,TValue] PD) (at <44d2b28eb09144efbf56dab50bc4321b>:0)
	KERBALISM.Background.Background_PMs (Vessel v) (at <44d2b28eb09144efbf56dab50bc4321b>:0)
	KERBALISM.Background.Update (Vessel v, KERBALISM.VesselData vd, KERBALISM.VesselResources resources, System.Double elapsed_s) (at <44d2b28eb09144efbf56dab50bc4321b>:0)
	KERBALISM.Kerbalism.FixedUpdate () (at <44d2b28eb09144efbf56dab50bc4321b>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

I found it while investigating #674, but I'm not sure if it's relevant.

  • KSP 1.10.1.2939
  • Kerbalism 3.11 (via CKAN)
  • SCANsat v20.4 (via CKAN)
  • quicksave.zip

tailriver avatar Nov 20 '20 19:11 tailriver

That error is likely to be the source of a lot of weirdness, since it will basically crash the whole simulation and left it in an invalid state.

No real way to know what causes this. SCANsat would be a prime suspect. I haven't done much testing but I heard multiple reports that there are major issues with our support code for it since the v20 release.

gotmachine avatar Jan 22 '21 00:01 gotmachine