Kerbal Aircraft Expansion (KAX)

Kerbal Aircraft Expansion (KAX)

523k Downloads

JumpJet engine failing to initialise

Lisias opened this issue · 2 comments

commented

As described by BrettRyland on this comment from another issue.

[ERR 22:12:02.486] Module ModuleEngines threw during OnStart: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at ModuleEngines.SetupFXGroups () [0x00757] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at ModuleEngines.InitializeFX () [0x00000] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at ModuleEngines.OnStart (PartModule+StartState state) [0x00063] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  at Part.ModulesOnStart () [0x00120] in <4a4632fe4eb0471fa0f9f87bb7432bc2>:0 
  UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
  ModuleManager.UnityLogHandle.InterceptLogHandler:LogFormat(LogType, Object, String, Object[])
  UnityEngine.Debug:LogError(Object)
  Part:ModulesOnStart()
  <Start>d__323:MoveNext()
  UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Followed by a stream of

[EXC 22:12:04.578] NullReferenceException: Object reference not set to an instance of an object
  ModuleEngines.ThrustUpdate () (at <4a4632fe4eb0471fa0f9f87bb7432bc2>:0)
  ModuleEngines.FixedUpdate () (at <4a4632fe4eb0471fa0f9f87bb7432bc2>:0)
  UnityEngine.DebugLogHandler:LogException(Exception, Object)
  ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
  UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

and

[EXC 22:12:20.046] NullReferenceException: Object reference not set to an instance of an object
  ModuleEngines.Activate () (at <4a4632fe4eb0471fa0f9f87bb7432bc2>:0)
  BDArmory.Control.VesselSpawner+<SpawnAllVesselsOnceCoroutine>d__26.MoveNext () (at /home/brett/github/BDArmory/BDArmory/Control/VesselSpawner.cs:735)
  UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <2425394cf09642369e2109953e31f62b>:0)
  UnityEngine.DebugLogHandler:LogException(Exception, Object)
  ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
  UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

The report was originally meant for the JumpJet, but since I coded the config files for all the engines near the same, I'm pretty confident this is happening on every engine (the report also implies that).

commented

Nah… The engine is working fine. The problem is a missing FX Group - besides this engine is still using the olde ModuleEngine, KSP is ignoring the the old parameters and trying to use it as a ModuleEngineFX as it appears.

I opened this issue for nothing, in essense it's a duplicated of #12.

commented

There was a confusion on the original problem description, where the reporter misworded 'craft' by 'engine', and I ended up assuming the problem was happening on every engine.

Only JumpJet engine is blowing up the Exception, and it's not related to BDArmory at all - vanilla KSP also triggers the Exception.