ferram4 / Ferram-Aerospace-Research

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

Exception in FAR editor display after adding "'Drill-O-Matic' Mining Excavator" to craft #180

Closed Virindi-AC closed 7 years ago

Virindi-AC commented 7 years ago

Using the latest KSP_update FAR, the large drill seems to break FAR (see screenshot). Pretty much everything else works.

Screenshot: http://www.virindi.net/junk/far_drill.png Full KSP log: http://www.virindi.net/junk/KSP_drill.log

Repro steps: -Fresh install, KSP 1.2.2 win64. ModuleManager 2.7.5, ModularFlightIntegrator 1.2.4, FAR from commit f38f1f36784a43a471ac583ab12ad15112de4eb7 in KSP_update (2017/4/6). -New game, open SPH, load aeris 4a -Open FAR window, "Data+Stability Derivatives", "Calculate Stability Derivatives". Works. -Attach a stock "'Drill-O-Matic' Mining Excavator" to the cockpit. -Click "Calculate Stability Derivatives" again. Exception.

ArithmeticException: NAN System.Math.Sign (Single value) FerramAerospaceResearch.FARGUI.FAREditorGUI.EditorAeroCenter.UpdateAerodynamicCenter () FerramAerospaceResearch.FARGUI.FAREditorGUI.EditorAeroCenter.UpdateAeroData (System.Collections.Generic.List1 aeroModules, System.Collections.Generic.List1 aeroSections) FerramAerospaceResearch.FARGUI.FAREditorGUI.Simulation.EditorSimManager.UpdateAeroData (FerramAerospaceResearch.FARAeroComponents.VehicleAerodynamics vehicleAero, System.Collections.Generic.List`1 wingAerodynamicModel) FerramAerospaceResearch.FARGUI.FAREditorGUI.EditorGUI.FixedUpdate ()

ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint Aborting UnityEngine.GUILayoutGroup.GetNext () UnityEngine.GUILayoutUtility.DoGetRect (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) UnityEngine.GUILayoutUtility.GetRect (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) UnityEngine.GUILayout.DoLabel (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) UnityEngine.GUILayout.Label (System.String text, UnityEngine.GUILayoutOption[] options) FerramAerospaceResearch.FARGUI.FAREditorGUI.StabilityDerivGUI.Display () FerramAerospaceResearch.FARGUI.FAREditorGUI.EditorGUI.OverallSelectionGUI (Int32 windowId) UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)

ferram4 commented 7 years ago

I can confirm the issue happens with FAR 1.2.2 dev and that it doesn't happen with the latest versions of FAR for 1.1.3, so I don't know if the change is due to a change in KSP itself or if it's due to something changed in FAR. What I do know is that everything points to FAR attempting to voxelize some dummy part of the model that is far off from the rest of the model, breaking all voxelization, so that particular section of the model needs to be ignored for everything to work.

ferram4 commented 7 years ago

Seems to be fixed with the latest update, everything voxelizes fine.