Jump to content

Unity Part Tools throwing NullReferenceException: Object reference not set to an instance of an object


SpaceToad

Recommended Posts

NullReferenceException: Object reference not set to an instance of an object
UrlDir+<get_AllConfigs>d__1b.MoveNext ()
UrlDir+<GetConfigs>d__2a.MoveNext ()
System.Collections.Generic.List`1[UrlDir+UrlConfig].AddEnumerable (IEnumerable`1 enumerable) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:128)
System.Collections.Generic.List`1[UrlDir+UrlConfig]..ctor (IEnumerable`1 collection) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:65)
KSPPartTools.GameDatabase.GetConfigs (System.String typeName)
KSPPartTools.PartToolsWindow.DrawSpaces ()
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)

 

Link to comment
Share on other sites

any mods at all? I've had same problem before, NullRef spam in Unity, and eventually forces Unity to close. There's one or more invalid config files in Gamedata somewhere. only thing you can try is start with vanilla install, and add the mods one by one till you get the error again, then you can either try to find the problem config, or leave it out of the install that you link with Unity PartTools

Link to comment
Share on other sites

2 hours ago, nli2work said:

any mods at all? I've had same problem before, NullRef spam in Unity, and eventually forces Unity to close. There's one or more invalid config files in Gamedata somewhere. only thing you can try is start with vanilla install, and add the mods one by one till you get the error again, then you can either try to find the problem config, or leave it out of the install that you link with Unity PartTools

Yep. Quite a bit. I guess ill just have to add one at a time... ****.

Link to comment
Share on other sites

7 hours ago, SpaceToad said:

Yep. Quite a bit. I guess ill just have to add one at a time... ****.

I'd just link Unity to a vanilla install. You can copy/move the exports to your full modded install for testing if you want to.

Link to comment
Share on other sites

copy/paste the KSP folder from Steam install location I think. Not really sure since I don't have the steam version. I'm sure the answer is here on the forums somewhere.

Edited by nli2work
Link to comment
Share on other sites

On 3/24/2016 at 2:07 PM, nli2work said:

copy/paste the KSP folder from Steam install location I think. Not really sure since I don't have the steam version. I'm sure the answer is here on the forums somewhere.

So I figured that problem out, but now two more appear... ****. Unity says it cant find textures for both modded and stock parts! Also, I cannot spawn the Inline and Nosecone MK1 cockpits! Unity crashes with a "Too many heap sections" Error.

Link to comment
Share on other sites

8 hours ago, nli2work said:

Yeah I'd hold off on spawning stock IVAs, especially the newer ones. They crash PartTools/Unity. Just have to wait till Squad releases updated PartTools.

But what about the textures? Is it normal that it cant find them?

Link to comment
Share on other sites

that happens because all the textures in 1.0.5 are DDS format, PartTools can't process that format. everything you spawn will load black. Only way you can fix that is duplicate all the textures into a different format: PNG, Bitmap, MBM, or TGA.

Link to comment
Share on other sites

15 hours ago, nli2work said:

that happens because all the textures in 1.0.5 are DDS format, PartTools can't process that format. everything you spawn will load black. Only way you can fix that is duplicate all the textures into a different format: PNG, Bitmap, MBM, or TGA.

Oh god. Hopefully the 1.1 part tools get it right.

Link to comment
Share on other sites

The issue with this (I get it a lot) is having Module Manager configs in your GameData folder.  At least that's what has caused it for me.

Link to comment
Share on other sites

2 hours ago, CliftonM said:

The issue with this (I get it a lot) is having Module Manager configs in your GameData folder.  At least that's what has caused it for me.

Really? Where should I put those configs?

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...