allista / ThrottleControlledAvionics

A mod for KerbalSaceProgram
Other
52 stars 22 forks source link

REN hits some infinite loop when target vessel loads on approach. Since KSP 1.7.2 #72

Closed allista closed 5 years ago

allista commented 5 years ago

If I start a rendezvous maneuver from the ground (Lander on Mun -> mothership in orbit around Mun), KSP freezes immediately and I can only kill the task hard. As a test I flew with the same spaceship via ToOrbit from the Mun first into an orbit close to the target mothership. That worked. After that I started a Renezvous again, which worked in the beginning. But after some manoeuvres, which were apparently not "perfect" enough for TCA and which repeated it over and over again, KSP froze again and was only killed hard.

Unfortunately I can't serve with logs, because after the freeze of KSP nothing is written into the log...last messages are normal status messages from TCA like:

[LOG 14:18:51.710] getObtAtUT infinite UT on elliptical orbit UT: Infinity, returning NaN
   at System.Environment.get_StackTrace()
   at Orbit.getObtAtUT(Double UT)
   at Orbit.getRelativePositionAtUT(Double UT)
   at CelestialBody.getTruePositionAtUT(Double UT)
   at Orbit.getTruePositionAtUT(Double UT)
   at ThrottleControlledAvionics.TrajectoryCalculator.SqrDistAtUT(.Orbit a, .Orbit b, Double UT)
   at ThrottleControlledAvionics.TrajectoryCalculator.NearestApproach(.Orbit a, .Orbit t, Double startUT, Double fromUT, Double toUT, Double minDist, Double ByRef ApproachUT)
   at ThrottleControlledAvionics.TrajectoryCalculator.ClosestApproach(.Orbit a, .Orbit t, Double fromUT, Double minDist, Double ByRef ApproachUT)
   at ThrottleControlledAvionics.RendezvousTrajectory.update()
   at ThrottleControlledAvionics.RendezvousTrajectory.UpdateOrbit(.Orbit current)
   at ThrottleControlledAvionics.TrajectoryCalculator`1.update_trajectory(Boolean reset)
   at ThrottleControlledAvionics.RendezvousAutopilot.update_trajectory(Boolean reset)
   at ThrottleControlledAvionics.RendezvousAutopilot.Update()
   at ThrottleControlledAvionics.TCAModule._Update(System.Action update_action)
   at ThrottleControlledAvionics.TCAModule.OnFixedUpdate()
   at ThrottleControlledAvionics.ModuleTCA+<>c.<OnPreAutopilotUpdate>b__91_0(ThrottleControlledAvionics.TCAModule m)
   at System.Collections.Generic.List`1[[ThrottleControlledAvionics.TCAModule, ThrottleControlledAvionics, Version=3.5.7.0, Culture=neutral, PublicKeyToken=null]].ForEach(System.Action`1 action)
   at ThrottleControlledAvionics.ModuleTCA.OnPreAutopilotUpdate(.FlightCtrlState s)
   at Vessel.FeedInputFeed()
   at FlightInputHandler.FixedUpdate()
[LOG 14:18:51.710] getObtAtUT infinite UT on elliptical orbit UT: Infinity, returning NaN
   at System.Environment.get_StackTrace()
   at Orbit.getObtAtUT(Double UT)
   at Orbit.getRelativePositionAtUT(Double UT)
   at Orbit.getTruePositionAtUT(Double UT)
   at ThrottleControlledAvionics.TrajectoryCalculator.SqrDistAtUT(.Orbit a, .Orbit b, Double UT)
   at ThrottleControlledAvionics.TrajectoryCalculator.NearestApproach(.Orbit a, .Orbit t, Double startUT, Double fromUT, Double toUT, Double minDist, Double ByRef ApproachUT)
   at ThrottleControlledAvionics.TrajectoryCalculator.ClosestApproach(.Orbit a, .Orbit t, Double fromUT, Double minDist, Double ByRef ApproachUT)
   at ThrottleControlledAvionics.RendezvousTrajectory.update()
   at ThrottleControlledAvionics.RendezvousTrajectory.UpdateOrbit(.Orbit current)
   at ThrottleControlledAvionics.TrajectoryCalculator`1.update_trajectory(Boolean reset)
   at ThrottleControlledAvionics.RendezvousAutopilot.update_trajectory(Boolean reset)
   at ThrottleControlledAvionics.RendezvousAutopilot.Update()
   at ThrottleControlledAvionics.TCAModule._Update(System.Action update_action)
   at ThrottleControlledAvionics.TCAModule.OnFixedUpdate()
   at ThrottleControlledAvionics.ModuleTCA+<>c.<OnPreAutopilotUpdate>b__91_0(ThrottleControlledAvionics.TCAModule m)
   at System.Collections.Generic.List`1[[ThrottleControlledAvionics.TCAModule, ThrottleControlledAvionics, Version=3.5.7.0, Culture=neutral, PublicKeyToken=null]].ForEach(System.Action`1 action)
   at ThrottleControlledAvionics.ModuleTCA.OnPreAutopilotUpdate(.FlightCtrlState s)
   at Vessel.FeedInputFeed()
   at FlightInputHandler.FixedUpdate()
(END)
allista commented 5 years ago

The on-target-loaded thing was a problem with the old DEBUG code that tried to send me an email each time a proximity alert triggered. Aside from that no problems detected, so I'm closing this issue for now.