Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty AsteroidScannerSetup.cfg brakes partools #186

Open
skalou opened this issue Jun 5, 2017 · 3 comments
Open

Empty AsteroidScannerSetup.cfg brakes partools #186

skalou opened this issue Jun 5, 2017 · 3 comments

Comments

@skalou
Copy link

skalou commented Jun 5, 2017

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"

@sumghai
Copy link

sumghai commented Jun 18, 2017

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.

@mikeloeven
Copy link

mikeloeven commented Mar 9, 2018

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 ?

@skalou
Copy link
Author

skalou commented Mar 9, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants