dkavolis / Ferram-Aerospace-Research

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

NRE spam when in flight, errrors related too FAR flight data tab (NAN values) #121

Open 321nick opened 3 years ago

321nick commented 3 years ago

putting an issue on the github, copied from my forum post:

im getting NRE spam and the flight data tab is all buggy- nans, infinites, and 0s on all the read outs. however, i think it only happens too some ships, not all.

see here: https://i.imgur.com/XMLdBSk.png

KSP.log: https://gist.github.com/28f1463e1b1fb07d3ac8f569b002330a

player.log: https://gist.github.com/07f4ac69f45a271446e8aa70082fc130

ship .csv data in ferram aerosapce log folder : https://www.dropbox.com/s/u2fxgtg81pcix0a/Stuka_2021_07_16_20_00_41.csv?dl=0

craft file(youd need mk2 aerospace, near future aeronautics, OPT, and b9 procedural wing fork modified: https://www.dropbox.com/s/voxnfmw6zn6pkqx/Stuka.craft?dl=0

if theres anything else i can send too help with this, please tell me. i have no clue why this is happening.

dkavolis commented 3 years ago

KSP fails to load some resources which then results in null returned from Part.Resources[]. I could add a null check but it won't fix the issue that the resources from CommunityResourcePack are not loaded. https://github.com/dkavolis/Ferram-Aerospace-Research/blob/24b2dbf3a3c5eb9f482dadd5694c30f082a7fc42/FerramAerospaceResearch/FARGUI/FARFlightGUI/PhysicsCalcs.cs#L269

[ERR 05:35:22.283] [ShipTemplate]: No Resource definition found for RESOURCE
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Debug:LogError(Object)
    ShipConstruction:GetPartCostsAndMass(ConfigNode, AvailablePart, Single&, Single&, Single&, Single&)
    ShipTemplate:LoadShip(ConfigNode)
    LaunchSiteFacility:launchChecks()
    LaunchSiteFacility:shipSelected(String, String, VesselCrewManifest)
    KSP.UI.Screens.VesselSpawnDialog:LaunchSelectedVessel()
    KSP.UI.Screens.VesselSpawnDialog:onPipelineFinished(ConfigNode, Callback)
    KSP.UI.Screens.VesselSpawnDialog:<ConfirmLaunch>b__132_0(ConfigNode)
    KSPUpgradePipeline:Process(ConfigNode, String, LoadContext, Callback`1, Callback`2)
    KSP.UI.Screens.VesselSpawnDialog:ConfirmLaunch()
    DialogGUIButton:OptionSelected()
    DialogGUIButton:<Create>b__23_1()
    UnityEngine.EventSystems.EventSystem:Update()