Jump to content

NullRef Bug in the contract system


Recommended Posts

This was found with a modded client (when deleting modded parts) but I'm pretty sure it's a bug in the stock contract system.

Steps to reproduce:
Check the contracts offered list for a part test.
Remove that parts files from GameData.
Restart the game and you get a bunch of null reference errors and cannot click anything.

[code](Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

NullReferenceException: Object reference not set to an instance of an object
at Contracts.Templates.PartTest.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0

at Contracts.Contract.Save (.ConfigNode node) [0x00000] in <filename unknown>:0

at Contracts.ContractSystem.OnSave (.ConfigNode gameNode) [0x00000] in <filename unknown>:0

at ScenarioModule.Save (.ConfigNode node) [0x00000] in <filename unknown>:0

at ProtoScenarioModule..ctor (.ScenarioModule module) [0x00000] in <filename unknown>:0

at ScenarioRunner.GetUpdatedProtoModules () [0x00000] in <filename unknown>:0

at Game.Updated () [0x00000] in <filename unknown>:0

at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) [0x00000] in <filename unknown>:0

at RDSceneSpawner.onRDDespawn () [0x00000] in <filename unknown>:0

at EventVoid.Fire () [0x00000] in <filename unknown>:0

at RDController.CloseButton (.POINTER_INFO& ptr) [0x00000] in <filename unknown>:0

at (wrapper delegate-invoke) EZInputDelegate:invoke_void__this___POINTER_INFO& (POINTER_INFO&)

at UIButton.OnInput (.POINTER_INFO& ptr) [0x00000] in <filename unknown>:0

at AutoSpriteControlBase.OnInput (POINTER_INFO ptr) [0x00000] in <filename unknown>:0

at UIManager.DispatchHelper (.POINTER_INFO& curPtr, Int32 camIndex) [0x00000] in <filename unknown>:0

at UIManager.DispatchInput () [0x00000] in <filename unknown>:0

at UIManager.Update () [0x00000] in <filename unknown>:0

at UIManager.DidAnyPointerHitUI () [0x00000] in <filename unknown>:0

at SpaceCenterCamera2.InputCamera () [0x00000] in <filename unknown>:0

at SpaceCenterCamera2.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)[/code]
Link to comment
Share on other sites

Yep, I restored the parts, declined the contracts and removed them again and everything was fine. But most of the rest of the game knows how to cope (more or less, even if it means deleting craft) with missing parts without breaking all functionality.

Thanks for taking the time.
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...