UmbraSpaceIndustries / CommunityResourcePack

The KSP Community Resource Pack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Empty AsteroidScannerSetup.cfg brakes partools

skalou opened this issue · comments

hi,
the file AsteroidScannerSetup.cfg is empty and it brakes partools in Unity.
so it could be great to delete this file or maybe rename it "AsteroidScannerSetup.cfg.txt"

Can confirm.

Specifically, when KSP PartTools in Unity attempts to fetch a list of internal spaces and props, it comes across the empty AsteroidScannerSetup.cfg file, and gives the following error in Unity's console:

Error: Empty part config file
UnityEngine.Debug:LogError(Object)
ConfigNode:PreFormatConfig(String[])
ConfigNode:Load(String)
UrlConfig:CreateNodeList(UrlDir, UrlFile)
UrlFile:.ctor(UrlDir, FileInfo)
UrlDir:Create(UrlDir, DirectoryInfo)
UrlDir:.ctor(UrlDir, DirectoryInfo)
UrlDir:Create(UrlDir, DirectoryInfo)
UrlDir:.ctor(UrlDir, ConfigDirectory)
UrlDir:.ctor(ConfigDirectory[], ConfigFileType[])
KSPPartTools.GameDatabase:LoadDataDirectory()
KSPPartTools.GameDatabase:Refresh()
KSPPartTools.PartToolsWindow:DrawGameDatabaseSetup()
KSPPartTools.PartToolsWindow:OnGUI()
UnityEditor.DockArea:OnGUI()
NullReferenceException: Object reference not set to an instance of an object
ConfigNode.RecurseFormat (System.Collections.Generic.List`1 cfg, System.Int32& index, .ConfigNode node)
ConfigNode.RecurseFormat (System.Collections.Generic.List`1 cfg)
ConfigNode.Load (System.String fileFullName)
UrlDir+UrlConfig.CreateNodeList (.UrlDir parentDir, .UrlFile parent)
UrlDir+UrlFile..ctor (.UrlDir parent, System.IO.FileInfo info)
UrlDir.Create (.UrlDir parent, System.IO.DirectoryInfo info)
UrlDir..ctor (.UrlDir parent, System.IO.DirectoryInfo info)
UrlDir.Create (.UrlDir parent, System.IO.DirectoryInfo info)
UrlDir..ctor (.UrlDir root, .ConfigDirectory rootInfo)
UrlDir..ctor (.ConfigDirectory[] dirConfig, .ConfigFileType[] fileConfig)
KSPPartTools.GameDatabase.LoadDataDirectory ()
KSPPartTools.GameDatabase.Refresh ()
KSPPartTools.PartToolsWindow.DrawGameDatabaseSetup ()
KSPPartTools.PartToolsWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

Temporarily removing the CFG file allows KSP PartTools to reload all internals and props properly again.

Not sure why but I just encountered this exact same issue today however removing the file did not resolve the issue game still fails to load with the same error regarding the empty config file after the file had been deleted ?

Hi mikeloeven, maybe you have an other empty .cfg file somewhere, try to find it then remove it ;)