Jump to content

In Editor, clicking New button after removing kerbal from capsule gets a NullRef


Recommended Posts

KSP Version: 1.2.2

What Happens:  Nullref

No mods or addons, this is a totally new install

Steps to replicate:

  1. 1. Go into Editor
  2. 2. Select a pod
  3. 3. Remove all kerbals from the pod
  4. 4. Click the New button, and don't bother to save

Result:

This is the fragment from the log file:

[GenericAppFrame] Reposition 0.09140638 51524

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

[UIMasterController]: ShowUI

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component:get_transform ()
at ShipConstruction.CalculateCraftSize (.ShipConstruct ship) [0x00000] in <filename unknown>:0 
at KSP.UI.Screens.EngineersReport.UpdateCratStats (.ShipConstruct ship) [0x00000] in <filename unknown>:0 
at KSP.UI.Screens.EngineersReport+<UpdateCraftStatsRoutine>c__Iterator11C.MoveNext () [0x00000] in <filename unknown>:0 
at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0

(Filename: Line: -1)

[MessageSystem] Save Messages

There is no workaround.  This is not critical, but annoying.

Link to comment
Share on other sites

2 hours ago, sal_vager said:

Hi @linuxgurugamer, try switching back to build mode before clicking "New", that should prevent the null ref from appearing.

Sal, I know that :D

and it's more of an annoyance than a real issue, 

It was driving me crazy while doing some debugging, until I realized it was KSP and not the mod I'm updating.  There were some unusual coding stuff in it, and I have been jumping on every null ref, because, up until this one, it was the mod.

So, I added it to the bug tracker.  I put it as normal, but I assume you can make it a low priority.  I just don't like seeing those messages when they are meaningless, I work very hard to get them out of my code.

 

 

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