dkavolis / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
81 stars 32 forks source link

Still a lot of log spamming when also using Trajectories #3

Closed Gordon-Dry closed 5 years ago

Gordon-Dry commented 5 years ago

Trajectories is still 2.2.1 for KSP 1.4.x

NullReferenceException: Object reference not set to an instance of an object
  at FerramAerospaceResearch.FARAeroComponents.FARVesselAero.SimulateAeroProperties (UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, Vector3 velocityWorldVector, Double altitude) [0x00000] in <filename unknown>:0 
  at FerramAerospaceResearch.FARAPI.InstanceCalcVesselAeroForces (.Vessel vessel, UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, Vector3 velocityWorldVector, Double altitude) [0x00000] in <filename unknown>:0 
  at FerramAerospaceResearch.FARAPI.CalculateVesselAeroForces (.Vessel vessel, UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, Vector3 velocityWorldVector, Double altitude) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at Trajectories.FARModel.ComputeForces_Model (Vector3d airVelocity, Double altitude) [0x00000] in <filename unknown>:0 
  at Trajectories.VesselAerodynamicModel.ComputeForces (Double altitude, Vector3d airVelocity, Vector3d vup, Double angleOfAttack) [0x00000] in <filename unknown>:0 
  at Trajectories.VesselAerodynamicModel.ComputeReferenceDrag () [0x00000] in <filename unknown>:0 
  at Trajectories.VesselAerodynamicModel.isValidFor (.Vessel vessel, .CelestialBody body) [0x00000] in <filename unknown>:0 
  at Trajectories.Trajectory+<ComputeTrajectoryIncrement>d__42.MoveNext () [0x00000] in <filename unknown>:0 
  at Trajectories.Trajectory.ComputeTrajectory (.Vessel vessel, Trajectories.DescentProfile profile) [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)
asdfCYBER commented 5 years ago

@BenChung had a fix for aerodynamic force projections in trajectories and was working on torque predictions, that would probably help

https://github.com/BenChung/Ferram-Aerospace-Research https://github.com/asdfCYBER/Ferram-Aerospace-Research/pull/1

dkavolis commented 5 years ago

@Gordon-Dry can you give steps to reproduce the problem (craft or save)? I've installed trajectories and did a return from orbit but didn't get any NREs, might be a specific part that's throwing it.

Gordon-Dry commented 5 years ago

Start with trying Procedural Fairings and Bluedog DB parts.

dkavolis commented 5 years ago

Can you share the craft file? And steps to reproduce the problem?

Gordon-Dry commented 5 years ago

Well, I loaded a station that was already in Kerbin orbit.

No launch or anything else in atmosphere during the session.

Then the weirdness began. As soon as the log spam (same as above) began, other mods started to strike.

I cannot share a craft, the station is composed of 3 launches.

Actually I cannot help with anything useful.

dkavolis commented 5 years ago

Turns out Trajectories was calling SimulateAeroProperties before FAR could complete aerodynamics calculations and initialize the required data.