pellinor0 / TweakScale

Forked from Gaius Goodspeed's Goodspeed Aerospace Part & TweakScale plugin
29 stars 23 forks source link

MemoryLeak ? #50

Closed No3371 closed 7 years ago

No3371 commented 7 years ago

I've encountered memory leak 2 times in 1.2 which took 13 and 16 GB ram, and the common characteristic of the two vehicle is that they are big truck consist of big up-scaled parts.

After checking my output.log, I found that these logs keep appearing, maybe it's related to TweakScale and the 1*6 deployable solar panel installed on the truck?

[TweakScale Warning] No valid member found for panelMass in ModuleDeployableSolarPanel TweakScale.Tools:LogWf(String, Object[]) TweakScale.MemberUpdater:Create(Object, String) TweakScale.ScaleExponents:UpdateFields(Object, Object, ScalingFactor, Part) TweakScale.ScaleExponents:UpdateObject(Part, Part, Dictionary`2, ScalingFactor) TweakScale.TSGenericUpdater:OnRescale(ScalingFactor) TweakScale.TweakScale:CallUpdaters() TweakScale.TweakScale:Setup() TweakScale.TweakScale:OnLoad(ConfigNode) PartModule:Load(ConfigNode) Part:LoadModule(ConfigNode, Int32&) ShipConstruct:LoadShip(ConfigNode) AtHangar.PackedConstruct:LoadConstruct() AtHangar.c__Iterator0:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

No3371 commented 7 years ago

And after a crash which just happened:

[TweakScale Warning] No valid member found for panelMass in ModuleDeployableSolarPanel TweakScale.Tools:LogWf(String, Object[]) TweakScale.MemberUpdater:Create(Object, String) TweakScale.ScaleExponents:UpdateFields(Object, Object, ScalingFactor, Part) TweakScale.ScaleExponents:UpdateObject(Part, Part, Dictionary2, ScalingFactor) TweakScale.TSGenericUpdater:OnRescale(ScalingFactor) TweakScale.TweakScale:CallUpdaters() TweakScale.TweakScale:Setup() TweakScale.TweakScale:OnLoad(ConfigNode) PartModule:Load(ConfigNode) Part:LoadModule(ConfigNode, Int32&) ShipConstruct:LoadShip(ConfigNode) AtHangar.PackedConstruct:LoadConstruct() AtHangar.PackedConstruct:.ctor(String, String) AtHangar.HangarMachinery:vessel_selected(String, LoadType) KSP.UI.Screens.CraftBrowserDialog:onPipelineFinished(ConfigNode, CraftEntry, LoadType) KSP.UI.Screens.<pipeSelectedItem>c__AnonStorey1AF:<>m__88D(ConfigNode) KSPUpgradePipeline:Process(ConfigNode, String, LoadContext, Callback1, Callback2) KSP.UI.Screens.CraftBrowserDialog:pipeSelectedItem(CraftEntry, LoadType) KSP.UI.Screens.CraftBrowserDialog:OnEntrySelected(CraftEntry) KSP.UI.Screens.CraftEntry:onValueChanged(Boolean) UnityEngine.Events.InvokableCall1:Invoke(Object[]) UnityEngine.Events.InvokableCallList:Invoke(Object[]) UnityEngine.Events.UnityEventBase:Invoke(Object[]) UnityEngine.Events.UnityEvent1:Invoke(Boolean) UnityEngine.UI.Toggle:Set(Boolean, Boolean) UnityEngine.UI.Toggle:Set(Boolean) UnityEngine.UI.Toggle:set_isOn(Boolean) UnityEngine.UI.Toggle:InternalToggle() UnityEngine.UI.Toggle:OnPointerClick(PointerEventData) UnityEngine.EventSystems.ExecuteEvents:Execute(IPointerClickHandler, BaseEventData) UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction1) UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData) UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32) UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent() UnityEngine.EventSystems.StandaloneInputModule:Process() UnityEngine.EventSystems.EventSystem:Update()

The crash happens when I try to select the craft into the Hangar mod part, with or with out solar panel. Compatibility issue with Hangar mod maybe?

pellinor0 commented 7 years ago

The warning is a nice find (means it tries to scale a value that no longer exists). However I do not see any connection to a crash or memory leak.

If this is from the same install as your other issue then you have quite a large mod list and I do not see how the error points to TweakScale.

No3371 commented 7 years ago

Yeah... I apologize for the rash :/ ! I couldn't confirm the leak was caused by TweakScale, and post it just because that both leaking happened on very up-scaled rovers...