DBooots / KerbalWindTunnel

A mod for Kerbal Space Program to provide atmospheric performance data for spaceplanes and aircraft.
Other
11 stars 3 forks source link

Crash while calculating wind enveloppe #7

Closed Fr33maan closed 2 years ago

Fr33maan commented 4 years ago

[EXC 16:53:19.757] IndexOutOfRangeException: Index was outside the bounds of the array.
    KerbalWindTunnel.DataGenerators.EnvelopeSurf.UpdateGraphs () (at <c79c2577fc6c47ad8b3f39475acfaf61>:0)
    KerbalWindTunnel.DataGenerators.EnvelopeSurf+<Processing>d__20.MoveNext () (at <c79c2577fc6c47ad8b3f39475acfaf61>:0)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[LOG 16:53:42.309] System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at KerbalWindTunnel.Extensions.Linq2+<GetTaxicabNeighbors>d__9`1[T].MoveNext () [0x00181] in <c79c2577fc6c47ad8b3f39475acfaf61>:0 
  at KerbalWindTunnel.DataGenerators.EnvelopeSurf.GetOptimalPath (KerbalWindTunnel.AeroPredictor vessel, KerbalWindTunnel.DataGenerators.EnvelopeSurf+Conditions conditions, System.Single exitSpeed, System.Single exitAlt, System.Single initialSpeed, System.Single initialAlt, KerbalWindTunnel.DataGenerators.EnvelopeSurf+CostIncreaseFunction costIncreaseFunc, System.Predicate`1[T] neighborPredicate, System.Single[,] predicateData, KerbalWindTunnel.DataGenerators.EnvelopeSurf+CostIncreaseFunction timeFunc) [0x0012e] in <c79c2577fc6c47ad8b3f39475acfaf61>:0 
  at KerbalWindTunnel.DataGenerators.EnvelopeSurf.OptimalLineTask (System.Object obj) [0x00007] in <c79c2577fc6c47ad8b3f39475acfaf61>:0 
  at KerbalWindTunnel.Threading.ThreadPool.ThreadTask (System.Object idObj) [0x00029] in <c79c2577fc6c47ad8b3f39475acfaf61>:0 
[LOG 16:53:42.343] System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at KerbalWindTunnel.Extensions.Linq2+<GetTaxicabNeighbors>d__9`1[T].MoveNext () [0x00181] in <c79c2577fc6c47ad8b3f39475acfaf61>:0 
  at KerbalWindTunnel.DataGenerators.EnvelopeSurf.GetOptimalPath (KerbalWindTunnel.AeroPredictor vessel, KerbalWindTunnel.DataGenerators.EnvelopeSurf+Conditions conditions, System.Single exitSpeed, System.Single exitAlt, System.Single initialSpeed, System.Single initialAlt, KerbalWindTunnel.DataGenerators.EnvelopeSurf+CostIncreaseFunction costIncreaseFunc, System.Predicate`1[T] neighborPredicate, System.Single[,] predicateData, KerbalWindTunnel.DataGenerators.EnvelopeSurf+CostIncreaseFunction timeFunc) [0x0012e] in <c79c2577fc6c47ad8b3f39475acfaf61>:0 
  at KerbalWindTunnel.DataGenerators.EnvelopeSurf.OptimalLineTask (System.Object obj) [0x00007] in <c79c2577fc6c47ad8b3f39475acfaf61>:0 
  at KerbalWindTunnel.Threading.ThreadPool.ThreadTask (System.Object idObj) [0x00029] in <c79c2577fc6c47ad8b3f39475acfaf61>:0 
[EXC 16:53:43.437] IndexOutOfRangeException: Index was outside the bounds of the array.
    KerbalWindTunnel.DataGenerators.EnvelopeSurf.UpdateGraphs () (at <c79c2577fc6c47ad8b3f39475acfaf61>:0)
    KerbalWindTunnel.DataGenerators.EnvelopeSurf+<Processing>d__20.MoveNext () (at <c79c2577fc6c47ad8b3f39475acfaf61>:0)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)```
DBooots commented 3 years ago

It looks like it's crashing while trying to calculate the optimal ascent profiles. This can happen if your craft can't actually sustain flight at the selected ascent exit altitude/speed. In the upcoming release, this won't crash the mod and will only result in those lines not showing up. Will this behaviour meet your needs?

DBooots commented 2 years ago

Crashes seem to be resolved in 1.3.0. Please comment if the ascent profiles continue to not work in your use case.