Sushutt / Infinite-Discoveries

Infinite Discoveries is a procedural star system generator for Kerbal Space Program
MIT License
15 stars 2 forks source link

Kopernicus Null Reference Error when loading Infinite Discovery Planets #6

Open RagnarTheRagnar opened 6 hours ago

RagnarTheRagnar commented 6 hours ago

I was testing out this mod with a few others OPM, OPX and Kerbol System Expansion. I found that all these worked just fine with themselves BUT Kopernicus generates an error when loading the Type field in the ScaledVersion part of the config file.

It seems to load all the internal planets just fine its when we get to the Infinite Discovery planets issues occur.

Kopernicus.log BH-86161-1-C-1.Body.log BH-86161-1-C-1-1.cfg.txt Modlist.txt KSP.log

[Kopernicus]: Configuration.Loader: Failed to load Body: BH-86161-1-C-1: Value cannot be null.
Parameter name: type

[LOG 17:39:55]: Parsing Target order in (Kopernicus.Configuration.ModLoader.LandControl) as (Kopernicus.ConfigParser.BuiltinTypeParsers.NumericParser`1[System.Int32])
[LOG 17:39:55]: Parsing Target enabled in (Kopernicus.Configuration.ModLoader.LandControl) as (Kopernicus.ConfigParser.BuiltinTypeParsers.NumericParser`1[System.Boolean])
[LOG 17:39:55]: Parsing Target name in (Kopernicus.Configuration.ModLoader.LandControl) as (System.String)
[LOG 17:39:55]: Exception Was Recorded: Value cannot be null.
Parameter name: type
  at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00003] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at Kopernicus.ConfigParser.Parser.LoadCollectionMemberFromConfigurationNode (Kopernicus.ConfigParser.Parser+ParsedCollectionMemberInfo parsedMember, System.Object o, ConfigNode node, System.String configName, System.Boolean getChildren) [0x00756] in <b81c7e09ce34479e9d3831f2ed50b754>:0 
  at Kopernicus.ConfigParser.Parser.LoadObjectFromConfigurationNode (System.Object o, ConfigNode node, System.String configName, System.Boolean getChildren) [0x000b0] in <b81c7e09ce34479e9d3831f2ed50b754>:0 
  at Kopernicus.ConfigParser.Parser.LoadObjectMemberFromConfigurationNode (Kopernicus.ConfigParser.Parser+ParsedMemberInfo parsedMember, System.Object o, ConfigNode node, System.String configName, System.Boolean getChildren) [0x00328] in <b81c7e09ce34479e9d3831f2ed50b754>:0 
  at Kopernicus.ConfigParser.Parser.LoadObjectFromConfigurationNode (System.Object o, ConfigNode node, System.String configName, System.Boolean getChildren) [0x000bd] in <b81c7e09ce34479e9d3831f2ed50b754>:0 
  at Kopernicus.Configuration.Loader.Kopernicus.ConfigParser.Interfaces.IParserEventSubscriber.PostApply (ConfigNode node) [0x000d7] in <7c264aa3e1ae4de8b755f729560384a8>:0 

If I do launch the game I get some B9 partswitch errors on both Near Future Solar (I've removed this mod already) and on Sterling Systems Solar panels. Its possible one or both of these mods are the cause.

Sushutt commented 4 hours ago

Kopernicus is often misleading with error messages. The error is somewhere in the LandControl node (near the bottom) but there doesn't seem to be any obvious issues in the config. Have you checked to see if all the planet's textures are there? Has it loaded any other infinite discoveries planets or did it stop at the first one?

RagnarTheRagnar commented 1 hour ago

Have you checked to see if all the planet's textures are there? They appear to be, I could upload a Get-childitem of the directory if you want it. I never touched it after it generated.

Has it loaded any other infinite discoveries planets or did it stop at the first one? Nope. That one it failed on is the first one it loaded.

RagnarTheRagnar commented 15 minutes ago

Added Kcalbeloh as a basic interstellar system addon while troubleshooting this save. This loaded perfectly fine no issues with Infinite Discoveries removed. So I'm fairly certain its something within Infinite Discoveries. I generated a new system and included the action log during that generation.

Kopernicus.log modlist2.txt AX-72781-D.Body.log Interesting it failed on AX-72781-D but it loaded AX-72781-B and AX-72781-C just fine. AX-72781-B.Body.log AX-72781-C.Body.log ActionLog.txt

Here is the main KSP.log for the instance. KSP.log

I think this is the main error, I did sanity check that the textures exist and they do.

[LOG 23:09:43.395] [OD] Adding for body AX-72781-D map named  of path = InfiniteDiscoveries/Textures/PluginData/AX-72781-D_HGT.dds
[LOG 23:09:43.395] [OD] Adding for body AX-72781-D map named  of path = InfiniteDiscoveries/Textures/PluginData/AX-72781-D_CLR.dds
[EXC 23:09:43.403] Exception: Failed to load Body: AX-72781-D
    Kopernicus.Configuration.Loader.Kopernicus.ConfigParser.Interfaces.IParserEventSubscriber.PostApply (ConfigNode node) (at <7c264aa3e1ae4de8b755f729560384a8>:0)
    Kopernicus.ConfigParser.Parser.LoadObjectFromConfigurationNode (System.Object o, ConfigNode node, System.String configName, System.Boolean getChildren) (at <b81c7e09ce34479e9d3831f2ed50b754>:0)
    Kopernicus.ConfigParser.Parser.CreateObjectFromConfigNode[T] (ConfigNode node, System.String configName, System.Boolean getChildren) (at <b81c7e09ce34479e9d3831f2ed50b754>:0)
    Kopernicus.Injector.Awake () (at <7c264aa3e1ae4de8b755f729560384a8>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception)
    Kopernicus.Injector:Awake()
    UnityEngine.GameObject:AddComponent(Type)
    AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
    AddonLoader:StartAddons(Startup)
    AddonLoader:OnLevelLoaded(GameScenes)
    AddonLoader:OnSceneLoaded(Scene, LoadSceneMode)
    UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)

And here are the planet configs: AX-72781.cfg.txt AX-72781-B.cfg.txt AX-72781-C.cfg.txt AX-72781-D.cfg.txt

There does appear to be some Scatterer errors but I think that's because Kopernicus is exploding.