Jump to content

Something Broke PartTools


Recommended Posts

I honestly don't know if this was due to a Windows (10, home) update or something else on my system, but I'm keen to know if it happened to anyone else.  My Unity5.4.0p4, which hasn't been updated, suddenly gives me "NullReferenceException:" relating to KSP Part Tools, on all my projects.  It's across all the projects, so I haven't done something daft to the part tools files.  The KSP install referenced is still where it was.  But not having anything referenced wouldn't manage to do this.

Full error;

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..ctor ()
KSPPartTools.GameDatabase.get_Instance ()
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

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..ctor ()
KSPPartTools.GameDatabase.get_Instance ()
KSPPartTools.PartToolsInspector.OnInspectorGUI ()
PartToolsEditor.OnInspectorGUI () (at Assets/Editor/PartToolsEditor.cs:18)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235)
UnityEditor.DockArea:OnGUI()

 

Edited by TiktaalikDreaming
No windows updates in time period
Link to comment
Share on other sites

1 hour ago, TiktaalikDreaming said:

And it's just the one computer.  My Unity projects are all inside my dropbox sync file set, and I opened it on my laptop, and it's fine.

Rebooted PC, still an issue.  It may be Unity reinstall time.  Just to check dependencies etc.

If it's not too late, have you installed any mods that are likely to have empty example cfg in them?  Unlikely you have as a mod maker,but worth a mention, part tools hates empty and example cfg's  tweakscale has a couple that if left in will break part tools ( there are others but offhand I can't recall them) and usually end up with the part tools editor window stuck on screen constantly but inactive, removing the offending problem file usually fixes part tools after a unity restart

Link to comment
Share on other sites

29 minutes ago, SpannerMonkey(smce) said:

If it's not too late, have you installed any mods that are likely to have empty example cfg in them?  Unlikely you have as a mod maker,but worth a mention, part tools hates empty and example cfg's  tweakscale has a couple that if left in will break part tools ( there are others but offhand I can't recall them) and usually end up with the part tools editor window stuck on screen constantly but inactive, removing the offending problem file usually fixes part tools after a unity restart

That would be the sort of thing that might explain it.  :-/

Just uninstalled Unity.

I'll test the reinstall Unity in ~380MB time. Assuming that doesn't work, I'll go looking for pesky null configs.

Link to comment
Share on other sites

I've had this problem as well with Unity ... the cause was having my projects in Dropbox, at one point it locked a file for synching while Unity tried to write it. If you don't do already: always disable autosync while at work.

Link to comment
Share on other sites

12 hours ago, Azimech said:

I've had this problem as well with Unity ... the cause was having my projects in Dropbox, at one point it locked a file for synching while Unity tried to write it. If you don't do already: always disable autosync while at work.

Oh yeah.  Dropbox and Unity hate each other.  Not just the Unity project lock file, but the baulking when writing out parts due to file locks on temp files and so on.  So, yes, I disable the sync when actually using Unity.  Pretty sure I've come across all the variations of Unity and Dropbox fighting from all the times I've forgotten to disable syncing.  :-)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...