Biotronic / TweakScale

Forked from Gaius Goodspeed's Goodspeed Aerospace Part & TweakScale plugin
30 stars 58 forks source link

NRE + No More ContextMenu with (at least) ProceduralTanks and/or RealFuels in version 1.50 #27

Closed ghost closed 9 years ago

ghost commented 9 years ago
NullReferenceException: Object reference not set to an instance of an object
  at UIPartActionResourceItem.SetSymCounterpartsAmount (Double amount) [0x00000] in <filename unknown>:0 
  at UIPartActionResourceEditor.OnSliderChanged (IUIObject obj) [0x00000] in <filename unknown>:0 
  at UIPartActionResourceEditor.Setup (.UIPartActionWindow window, .Part part, UI_Scene scene, .UI_Control control, .PartResource resource) [0x00000] in <filename unknown>:0 
  at KSPAPIExtensions.UIPartActionResourceEditorImproved.Setup (.UIPartActionWindow window, .Part part, UI_Scene scene, .UI_Control control, .PartResource resource) [0x00000] in <filename unknown>:0 
  at UIPartActionWindow.SetupResourceEditorControl (.PartResource r, Int32 row) [0x00000] in <filename unknown>:0 
  at UIPartActionWindow.SetupResourceControl (.PartResource r, Int32 row) [0x00000] in <filename unknown>:0 
  at UIPartActionWindow.SetupResourceControls (.PartResource r, System.Int32& row) [0x00000] in <filename unknown>:0 
  at UIPartActionWindow.CreatePartList () [0x00000] in <filename unknown>:0 
  at UIPartActionWindow.Setup (.Part part, DisplayType type, UI_Scene scene) [0x00000] in <filename unknown>:0 
  at UIPartActionController.CreatePartUI (.Part part, DisplayType type, UI_Scene scene) [0x00000] in <filename unknown>:0 
  at UIPartActionController.SelectPart (.Part part, Boolean allowMultiple) [0x00000] in <filename unknown>:0 
  at UIPartActionController.HandleMouseClick (UnityEngine.Camera cam, Boolean allowMultiple) [0x00000] in <filename unknown>:0 
  at UIPartActionController+
.MoveNext () [0x00000] in <filename unknown>:0

Happens after setting up a few tanks with fuel, and cloning them. Also present in TweakScale 1.49. Other KSPAPIExtension mods do not produce this error.

ghost commented 9 years ago

This bug is nasty to track down, you know?

Does TweakScale leave traces of itself and/or its messages on saved ships Either .craft or game state? If so, I ran into the latter wrecking cloned parts with TweakScale removed (could be a bug in KSPAPIExtensions, then).

ETA: Seems more a ProceduralParts/RealFuels problem, or KSPAPIExtensions has trouble with messages sent by someone, somewhere. Tentatively ready to close this issue. While TweakScale does make it worse, I guess that's a side effect of a deeper issue more than anything.