ferram4 / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
239 stars 131 forks source link

NullReferenceException with SXT Gridfins and FAR #122

Closed RealKolago closed 8 years ago

RealKolago commented 8 years ago

The NullReferenceException shows up when I put the SXT gridfins on any rocket in the VAB and make a FAR Data + Stability Derivatives Analysis.

NullReferenceException: Object reference not set to an instance of an object at ferram4.FARControllableSurface.get_MovableSection () [0x00000] in :0

at ferram4.FARControllableSurface.DeflectionAnimation () [0x00000] in :0

at ferram4.FARControllableSurface.SetControlStateEditor (Vector3 CoM, Vector3 velocityVec, Single pitch, Single yaw, Single roll, Int32 flap, Boolean brake) [0x00000] in :0

at FerramAerospaceResearch.FARGUI.FAREditorGUI.Simulation.InstantConditionSim.GetClCdCmSteady (FerramAerospaceResearch.FARGUI.FAREditorGUI.Simulation.InstantConditionSimInput input, FerramAerospaceResearch.FARGUI.FAREditorGUI.Simulation.InstantConditionSimOutput& output, Boolean clear, Boolean reset_stall) [0x00000] in :0

at FerramAerospaceResearch.FARGUI.FAREditorGUI.Simulation.StabilityDerivCalculator.CalculateStabilityDerivs (Double u0, Double q, Double machNumber, Double alpha, Double beta, Double phi, Int32 flapSetting, Boolean spoilers, .CelestialBody body, Double alt) [0x00000] in :0

at FerramAerospaceResearch.FARGUI.FAREditorGUI.StabilityDerivGUI.Display () [0x00000] in :0

at FerramAerospaceResearch.FARGUI.FAREditorGUI.EditorGUI.OverallSelectionGUI (Int32 windowId) [0x00000] in :0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in :0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in :0

(Filename: Line: -1)

part SXTn1GridFin

Full Log: https://www.dropbox.com/s/ulx6hx9rrqtq47x/SXT_FAR_Exp.zip?dl=0

ferram4 commented 8 years ago

This indicates that the config for the gridfins is not set up correctly and is not an issue on FAR's end, but on SXT's end.

In the FARControllableSurface config, transformName must be set to the name of the transform that is supposed to animate, same as it is for the stock control surface transforms.

As this is a config error in SXT, not an error in FAR, I'm closing this.