Project

General

Profile

Bug #23911

SaveUpgradePipeline.v180_ModuleControlSurface.ConvertControlAuthority() NullReferenceException when encountering part modules, derived from ModuleControlSurface.

Added by Boris-Barboris about 5 years ago. Updated about 5 years ago.

Status:
New
Severity:
Low
Assignee:
-
Category:
Plugins/Add-Ons
Target version:
-
Start date:
10/17/2019
% Done:

0%

Version:
Platform:
Linux
Expansion:
Core Game
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

This is the module I am replacing stock control surface modules with:
https://github.com/Boris-Barboris/AtmosphereAutopilot/blob/master/AtmosphereAutopilot/SyncModuleControlSurface.cs#L30

Currently the game throws nullrefs all over the place of the following form:

EXC 03:26:54.928] NullReferenceException: Object reference not set to an instance of an object
SaveUpgradePipeline.v180_ModuleControlSurface.ConvertControlAuthority (ConfigNode mNode, ModuleControlSurface module) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
SaveUpgradePipeline.v180_ModuleControlSurface.OnUpgrade (ConfigNode node, SaveUpgradePipeline.LoadContext loadContext, ConfigNode parentNode) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
SaveUpgradePipeline.UpgradeScript+<>c__DisplayClass17_0.<Upgrade>b__0 (ConfigNode node, ConfigNode parent) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
SaveUpgradePipeline.UpgradeScript.RecurseNodes (ConfigNode node, System.String[] urlNodes, System.Int32 level, Callback`2[T,U] cb, ConfigNode parent) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
SaveUpgradePipeline.UpgradeScript.RecurseNodes (ConfigNode node, System.String[] urlNodes, System.Int32 level, Callback`2[T,U] cb, ConfigNode parent) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
SaveUpgradePipeline.UpgradeScript.Upgrade (ConfigNode n, SaveUpgradePipeline.LoadContext loadContext) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
SaveUpgradePipeline.SaveUpgradePipeline.RunUpgrade (SaveUpgradePipeline.UpgradeScript uSc, ConfigNode node, SaveUpgradePipeline.LoadContext loadContext) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
SaveUpgradePipeline.SaveUpgradePipeline.RunIteration (ConfigNode srcNode, ConfigNode& node, SaveUpgradePipeline.LoadContext ctx, System.Collections.Generic.List`1[T] scripts, System.Collections.Generic.List`1[T] log)
(at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
SaveUpgradePipeline.SaveUpgradePipeline.Run (ConfigNode node, SaveUpgradePipeline.LoadContext ctx, System.Version AppVersion, System.Boolean& runSuccess, System.String& runInfo, System.Collections.Generic.List`1[Syste
m.Collections.Generic.Dictionary`2[SaveUpgradePipeline.UpgradeScript,SaveUpgradePipeline.LogEntry]]& log) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
SaveUpgradePipeline.SaveUpgradePipeline.Run (ConfigNode node, SaveUpgradePipeline.LoadContext ctx, System.Version AppVersion, System.Boolean& runSuccess, System.String& runInfo) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:
0)
KSPUpgradePipeline.Process (ConfigNode n, System.String saveName, SaveUpgradePipeline.LoadContext loadContext, Callback`1[T] onSucceed, Callback`2[T,U] onFail) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
KSP.UI.Screens.CraftBrowserDialog.pipeSelectedItem (KSP.UI.Screens.CraftEntry sItem, KSP.UI.Screens.CraftBrowserDialog+LoadType loadType) (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
KSP.UI.Screens.CraftBrowserDialog.ConfirmLoadCraft () (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
KSP.UI.Screens.CraftBrowserDialog.onButtonLoad () (at <2f09e2f5ae2d4c39b733b9f146e6c807>:0)
UnityEngine.Events.InvokableCall.Invoke () (at <7d9ec060e791409ab3eb85c61e312ed6>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <7d9ec060e791409ab3eb85c61e312ed6>:0)
UnityEngine.UI.Button.Press () (at <cf3d7c7e794947019dab4cf03528e6eb>:0)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <cf3d7c7e794947019dab4cf03528e6eb>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <cf3d7c7e794947019dab4cf03528e6eb>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <cf3d7c7e794947019dab4cf03528e6eb>:0)
UnityEngine.EventSystems.EventSystem:Update()

Looks like a failed downcast and dereference.
Can we do something about it?

KSP.log (335 KB) KSP.log Boris-Barboris, 10/17/2019 12:57 AM

History

#1 Updated by Boris-Barboris about 5 years ago

full KSP.log in attachment

Also available in: Atom PDF