ScrapYard (SYD) by magico13

ScrapYard (SYD) by magico13

4.2k Downloads

[BUG ๐Ÿž] FlowGraph logspam

baldamundo opened this issue ยท 3 comments

commented

Describe the bug
Seem to get enormous spam of FlowGraph errors I think triggered every time there's a change to fuel flows (e.g. on launch, on staging, on engine failure). On a clean install it only seems to produce a few seconds of lag (not clear if there are any other effects), but if you've already got slower performance (e.g. running a lot of mods) it ends up dropping your FPS almost to the point of freezing up entirely.

To Reproduce
Load up a large, complex craft to the launchpad. Fire up the engines. Check the logs.
Iirc from my testing it doesn't happen e.g. on rovers with no engines or fuel flow

Errors are of the form:

[ERR 01:30:00.198] [FlowGraph]: Graph already contains item! Part parachuteRadial with id 4290575276

[ERR 01:30:00.208] [FlowGraph]: Graph already contains item! Part parachuteRadial with id 4290575276

[ERR 01:30:00.217] [FlowGraph]: Graph already contains item! Part parachuteRadial with id 4293735952

[ERR 01:30:00.225] [FlowGraph]: Graph already contains item! Part parachuteRadial with id 4293735952

and seem to be repeated for every single part on the craft.

I reported this on the forum a few months back and have since had someone else confirm the same issue, but not had a response otherwise https://forum.kerbalspaceprogram.com/index.php?/topic/192456-19x-scrapyard-the-common-part-inventory-2100kanford-and-sons-back-in-business-2020-mar-15/&do=findComment&comment=3837722

Really hope someone's still working on this and we can work out how to get it fixed - combined with OhScrap it's really a wonderful mod and KSP honestly isn't half as fun without it!

commented

@roxik0, @baldamundo and @jefferyharrell 0 thank you. ๐Ÿฅ‡

@baldamundo I missed this - should be working -= thank you =-

commented

Testing on the latest version of KSP + OhScrap, I am still getting the Flowgraph log errors - but it's a much smaller, momentary performance hit, rather than making it unplayable as it did previously.

commented

I'm also getting a bunch of errors like this:

[LOG 08:16:02.275] [ScrapYard] InventoryChangedEvent - part: 'launchClamp1' added? True
[ERR 08:16:02.281] Exception handling event OnSYInventoryChanged in class SolarPanelFailureModule:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Behaviour.get_enabled(UnityEngine.Behaviour)
  at TweakScale.TweakScale.get_IsScaled () [0x00000] in <c8a4ba9de07c4f43928c3b6b1d79e4c1>:0 
  at TweakScale.TweakScale.IPartCostModifier.GetModuleCost (System.Single defaultCost, ModifierStagingSituation situation) [0x00000] in <c8a4ba9de07c4f43928c3b6b1d79e4c1>:0 
  at Part.GetModuleCosts (System.Single defaultCost, ModifierStagingSituation sit) [0x00046] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 
  at ScrapYard.InventoryPart..ctor (Part originPart) [0x0005c] in <7574de55bed3481999a9b0d0d183c5f6>:0 
  at ScrapYard.PartTracker.GetBuildsForPart (Part part, ScrapYard.PartTracker+TrackType type) [0x0000a] in <7574de55bed3481999a9b0d0d183c5f6>:0 
  at ScrapYard.APIManager.GetBuildCount_Part (Part part, System.String type) [0x00012] in <7574de55bed3481999a9b0d0d183c5f6>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <9577ac7a62ef43179789031239ba8798>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at ScrapYard.ScrapYardWrapper.invokeMethod (System.String methodName, System.Object[] parameters) [0x00016] in <7574de55bed3481999a9b0d0d183c5f6>:0 
  at ScrapYard.ScrapYardWrapper.GetBuildCount (Part part, ScrapYard.ScrapYardWrapper+TrackType trackType) [0x00027] in <7574de55bed3481999a9b0d0d183c5f6>:0 
  at OhScrap.UPFMUtils.GetGeneration (System.UInt32 id, Part p) [0x00025] in <33d1171cdc59483c937a1b33fa63bc5e>:0 
  at OhScrap.BaseFailureModule.Initialise () [0x0007b] in <33d1171cdc59483c937a1b33fa63bc5e>:0 
  at OhScrap.BaseFailureModule.OnSYInventoryChanged (ScrapYard.InventoryPart data0, System.Boolean data1) [0x00013] in <33d1171cdc59483c937a1b33fa63bc5e>:0 
  at EventData`2[T,U].Fire (T data0, U data1) [0x000b0] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 

altho i've not had a chance yet to test on a clean install with no other mods, etc