severedsolo

[1.7.x] ScrapYard - The Common Part Inventory 1.1.3 (16/06/2019)

Recommended Posts

ScrapYard: The Common Part Inventory

Preamble by severedsolo: So you may have heard that @magico13 is giving up modding KSP. I've got the honour of taking over support for ScrapYard, because it makes sense as I have my own mod that depends on it (Oh Scrap!). I want to take this opportunity to thank magico13 for all his hard work and contributions to the community over the years, as I know that my own KSP experience would be much poorer without his mods. Anyway, enough from me.

The bit you are actually interested in

ScrapYard is a mod that provides a part inventory that can be shared between multiple mods. Parts are added to the inventory when you recover a vessel and are removed from the inventory when you build a new vessel. If you have ever played with Kerbal Construction Time, it's a significantly improved version of the part inventory that KCT had, that is also able to be used by other mods.

As of writing, ScrapYard does the following:

  • Parts are added to the inventory automatically upon vessel recovery
  • Parts are applied in the editor (not automatically like with KCT)
  • Parts are then pulled from the inventory on build (mods can change when this happens)
  • Parts are stored individually in the inventory along with any modules that “define” the part (think TweakScale and Procedural Parts)
  • The number of times “like” parts are used is tracked and available for mods, both total uses and number of builds (KCT’s part tracker feature, expanded)
  • Parts are trackable from the moment they are placed in the editor until they are removed from the game via a unique ID that transcends recovery and new builds
  • The number of times an individual part is recovered is tracked, perfect for consumption by part failure mods
  • (WIP) Funds can be overridden so that using parts from the inventory do not contribute to the cost of the vessel. You do still need to have the full amount of funds (for now).
  • ContractConfigurator support for adding or removing parts from the inventory as part of contracts

 

Download: 1.1.3 (16/04/2019)

Magicore and Module Manager are required dependencies.

These are no longer bundled and must be obtained separately.

SpaceDock

GitHub

 

DVDdgU1.png

 

y0vd6WS.png

 

 

Source: GitHub

ScrapYard is licensed MIT

Support me on Patreon!

btn_donate_LG.gif

 

Special thanks to @SiriusSam for the original idea of creating a separate part inventory way back in 2014 and for the name, and to @enneract for discussion and design help.

As a player, why do I want this?

If you are using Kerbal Construction Time, all balance is assumed you have this mod. It will substantially reduce build times for both vessels that use parts from the inventory and new vessels that use frequently used parts due to the part tracker. As of writing, no other mods are using this framework, but when they do this mod may be required. And this mod can be used by itself with the override funds option to play with a very different play style.

As a mod developer, why do I want this?

Spoiler

There are numerous reasons you might want to integrate with ScrapYard (with a hard dependency or a soft dependency, both options are offered), here are just a few that I can think of off the top of my head:

  • ScrapYard provides a way to uniquely track a part during its entire life cycle, from the moment it is placed in the editor until the time it is removed from the game. That includes surviving through multiple recoveries and launches. I imagine part failure mods might get the most use out of this, but surprise me!
  • By using a developed, common system you don’t need to worry about implementing your own part inventory and automatically gain support with other mods. Spend more time writing new features instead of rewriting something that exists.
  • Fine control over the modules that are stored with a part. Once Module Manager support for module templates is added, you can create a new module and a module manager patch to automatically store your module and its data with a part through its entire lifecycle. Module templates use MagiCore’s MathParser to allow for logic processing within the config file (currently limited to just numbers, strings will likely be added soon). Until Module Manager is supported, you can just edit the ModuleTemplates.cfg file directly. 
  • Get information about how often parts are used on a total used and number of builds basis. This is referred to as either the Part Tracker or the "Like" Part Tracker since it just tracks parts that are like each other (same name).
  • Many more that I can’t think of off the top of my head

Mods using ScrapYard:

Kerbal Construction Time by @linuxgurugamer / @magico13

Oh Scrap! by @severedsolo

 

Edited by severedsolo

Share this post


Link to post
Share on other sites

Actually I recognized that always new parts are used ...

I found this

[PlanetariumCamera]: Focus: Earth
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

ScaleModList: listSize 533 maxListSize 1670
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

[SpaceAge] OnVesselRecovery('Sounding Rocket 2', False)
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

[ScrapYard] Recovered
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Exception handling event onVesselRecovered in class EventListeners:System.NullReferenceException: Object reference not set to an instance of an object
  at ScrapYard.InventoryPart..ctor (.ProtoPartSnapshot originPartSnapshot) [0x00000] in <filename unknown>:0 
  at ScrapYard.EventListeners.VesselRecovered (.ProtoVessel vessel, Boolean someBool) [0x00000] in <filename unknown>:0 
  at EventData`2[ProtoVessel,System.Boolean].Fire (.ProtoVessel data0, Boolean data1) [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

NullReferenceException: Object reference not set to an instance of an object
  at ScrapYard.InventoryPart..ctor (.ProtoPartSnapshot originPartSnapshot) [0x00000] in <filename unknown>:0 
  at ScrapYard.EventListeners.VesselRecovered (.ProtoVessel vessel, Boolean someBool) [0x00000] in <filename unknown>:0 
  at EventData`2[ProtoVessel,System.Boolean].Fire (.ProtoVessel data0, Boolean data1) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
EventData`2:Fire(ProtoVessel, Boolean)
KSP.UI.Screens.SpaceTracking:OnRecoverConfirm()
DialogGUIButton:OptionSelected()
DialogGUIButton:<Create>m__7()
UnityEngine.Events.InvokableCall:Invoke()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.UI.Button:Press()
UnityEngine.UI.Button:OnPointerClick(PointerEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(IPointerClickHandler, BaseEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
 
(Filename:  Line: -1)

[VesselRecovery]: Sounding Rocket 2 recovered 3343.4Km from KSC. Recovery Value: 83.3% 

As you can see, this is Earth - so RSS 14.0.0 (no RO, no RealFuels etc. pp.)

Dunno if this has to do with "not being Kerbin" ...

Share this post


Link to post
Share on other sites

It really seems to be FAR (the latest unofficial build) - after removing FAR the recovered parts were in stock without issues ...
This issue only occurs when using RSS - stock + FAR didn't throw this issue.

Share this post


Link to post
Share on other sites
5 hours ago, Gordon Dry said:

It really seems to be FAR (the latest unofficial build) - after removing FAR the recovered parts were in stock without issues ...
This issue only occurs when using RSS - stock + FAR didn't throw this issue.

Thanks, that's good data. I have a day to myself today (forgotten what one of those is!) so I shall take a look and see if I can reproduce/figure out what's going on.

Share this post


Link to post
Share on other sites

Perhaps™ it's not FAR "alone", it could™ be because I recently added PP into the game (although I didn't use them much, especially not for the particular craft in question from my posts above).

I will investigate, I just re-added FAR and will see if I can reproduce the issue, then I remove PP and check again (all without using any PP stuff on the craft!)

Share this post


Link to post
Share on other sites

Well, I'm im VAB now, and it works here, but I have to launch the vessel and recover the stuff (incl. stages recovered by SR) to see if the issue is magically gone now.

I have to admit that I'm not 100% sure if the problematic vessel from my earlier post really was 100%-PP-free or if it had at least one PP-part in it.
The actual craft I'm working on is 100%-PP-free.

I will report back ...

Share this post


Link to post
Share on other sites

So, probe reentered successfully and also 1st stage was SR-recovered. (2nd stage not, I set reentry speed limit to 5000 m/s for RSS).

In VAB everything is okay.

So I guess™ it was PP - I think I will remove it again.

Share this post


Link to post
Share on other sites

PP is pretty essential, for me at least,  hope it gets fixed to work with this.

Share this post


Link to post
Share on other sites

Now I had this issue again - after I used autostruts on a few parts (only the decouplers on top of huge tanks, set to grandparent).

Edit:

in flight mode before the issues were thrown these popped in the log a few times:

NullReferenceException: Object reference not set to an instance of an object
  at PartJoint.SetupJoint (Vector3 jointPos, Vector3 jointOrt, Vector3 jointOrt2, Int32 size) [0x00000] in <filename unknown>:0 
  at PartJoint.create (.Part child, .Part parent, UnityEngine.Transform nodeSpace, Vector3 nodePos, Vector3 nodeOrt, Vector3 nodeOrt2, Int32 nodeSize, AttachModes mode, Boolean rigid) [0x00000] in <filename unknown>:0 
  at PartJoint.Create (.Part owner, .Part parent, .AttachNode nodeToParent, .AttachNode nodeFromParent, AttachModes mode) [0x00000] in <filename unknown>:0 
  at Part.SecureAutoStrut (.Part anchor) [0x00000] in <filename unknown>:0 
  at Part+<SecureAutoStruts>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0 
  at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

 

Edited by Gordon Dry

Share this post


Link to post
Share on other sites
12 hours ago, Gordon Dry said:

Now I had this issue again - after I used autostruts on a few parts (only the decouplers on top of huge tanks, set to grandparent).

Edit:

in flight mode before the issues were thrown these popped in the log a few times: 


NullReferenceException: Object reference not set to an instance of an object
  at PartJoint.SetupJoint (Vector3 jointPos, Vector3 jointOrt, Vector3 jointOrt2, Int32 size) [0x00000] in <filename unknown>:0 
  at PartJoint.create (.Part child, .Part parent, UnityEngine.Transform nodeSpace, Vector3 nodePos, Vector3 nodeOrt, Vector3 nodeOrt2, Int32 nodeSize, AttachModes mode, Boolean rigid) [0x00000] in <filename unknown>:0 
  at PartJoint.Create (.Part owner, .Part parent, .AttachNode nodeToParent, .AttachNode nodeFromParent, AttachModes mode) [0x00000] in <filename unknown>:0 
  at Part.SecureAutoStrut (.Part anchor) [0x00000] in <filename unknown>:0 
  at Part+<SecureAutoStruts>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0 
  at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

 

I'm not saying it's not SY (yet) - but those errors are from KSP itself - something went wrong when creating the autostrut (it's talking about PartJoint.SetupJoint) - it seems more likely to me that SY fell over because the part wasn't created properly rather than the other way around -  the stack trace doesn't mention SY at all.

Edited by severedsolo

Share this post


Link to post
Share on other sites

Okay, now I had this issue again:

  • KSP 1.4.5
  • new career
  • no RSS, but OPM+ExtraSolar
  • no FAR
  • no ProceduralParts

A sounding rocket, first launch ever, upper part landed without being destroyed, was recovered, but

[ScrapYard] Recovered
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Exception handling event onVesselRecovered in class EventListeners:System.NullReferenceException: Object reference not set to an instance of an object
  at ScrapYard.InventoryPart..ctor (.ProtoPartSnapshot originPartSnapshot) [0x00000] in <filename unknown>:0 
  at ScrapYard.EventListeners.VesselRecovered (.ProtoVessel vessel, Boolean someBool) [0x00000] in <filename unknown>:0 
  at EventData`2[ProtoVessel,System.Boolean].Fire (.ProtoVessel data0, Boolean data1) [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

NullReferenceException: Object reference not set to an instance of an object
  at ScrapYard.InventoryPart..ctor (.ProtoPartSnapshot originPartSnapshot) [0x00000] in <filename unknown>:0 
  at ScrapYard.EventListeners.VesselRecovered (.ProtoVessel vessel, Boolean someBool) [0x00000] in <filename unknown>:0 
  at EventData`2[ProtoVessel,System.Boolean].Fire (.ProtoVessel data0, Boolean data1) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
EventData`2:Fire(ProtoVessel, Boolean)
KSP.UI.Screens.SpaceTracking:OnRecoverConfirm()
DialogGUIButton:OptionSelected()
DialogGUIButton:<Create>m__7()
UnityEngine.Events.InvokableCall:Invoke()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.UI.Button:Press()
UnityEngine.UI.Button:OnPointerClick(PointerEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(IPointerClickHandler, BaseEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
 
(Filename:  Line: -1)

[VesselRecovery]: Sounding Rocket 1 recovered At KSC. Recovery Value: 98.0% 

Back in VAB all parts are new.

Full log and stuff:
https://www.dropbox.com/s/lfydic56wnf151q/2018-10-19_1 KSP.log and stuff.7z?dl=1

Share this post


Link to post
Share on other sites

@Gordon Dry ca

21 minutes ago, Gordon Dry said:

Okay, now I had this issue again:

  • KSP 1.4.5
  • new career
  • no RSS, but OPM+ExtraSolar
  • no FAR
  • no ProceduralParts

A sounding rocket, first launch ever, upper part landed without being destroyed, was recovered, but


[ScrapYard] Recovered
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Exception handling event onVesselRecovered in class EventListeners:System.NullReferenceException: Object reference not set to an instance of an object
  at ScrapYard.InventoryPart..ctor (.ProtoPartSnapshot originPartSnapshot) [0x00000] in <filename unknown>:0 
  at ScrapYard.EventListeners.VesselRecovered (.ProtoVessel vessel, Boolean someBool) [0x00000] in <filename unknown>:0 
  at EventData`2[ProtoVessel,System.Boolean].Fire (.ProtoVessel data0, Boolean data1) [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

NullReferenceException: Object reference not set to an instance of an object
  at ScrapYard.InventoryPart..ctor (.ProtoPartSnapshot originPartSnapshot) [0x00000] in <filename unknown>:0 
  at ScrapYard.EventListeners.VesselRecovered (.ProtoVessel vessel, Boolean someBool) [0x00000] in <filename unknown>:0 
  at EventData`2[ProtoVessel,System.Boolean].Fire (.ProtoVessel data0, Boolean data1) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
EventData`2:Fire(ProtoVessel, Boolean)
KSP.UI.Screens.SpaceTracking:OnRecoverConfirm()
DialogGUIButton:OptionSelected()
DialogGUIButton:<Create>m__7()
UnityEngine.Events.InvokableCall:Invoke()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.UI.Button:Press()
UnityEngine.UI.Button:OnPointerClick(PointerEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(IPointerClickHandler, BaseEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
 
(Filename:  Line: -1)

[VesselRecovery]: Sounding Rocket 1 recovered At KSC. Recovery Value: 98.0% 

Back in VAB all parts are new.

Full log and stuff:
https://www.dropbox.com/s/lfydic56wnf151q/2018-10-19_1 KSP.log and stuff.7z?dl=1

I can see a couple of places that might be throwing an NRE in that code. I'll put null checks in, which should at least stop all the parts from falling over, but I have zero chance of narrowing down which part/mod is causing the problem, as you have around 200 mods installed.

I'll put the null checks in for the 1.5 update (which hopefully I'll get done this weekend) (Edit: actually I'll put some logging in too, which may help narrow it down more)

Edited by severedsolo

Share this post


Link to post
Share on other sites

After launching the 1-A and recovering, there was no  more issue.

It's like the first attempt ever fails.

Or the weird fact that the root part of a USI Sounding Rocket is the payload truss, which is predefined as debris?!

Share this post


Link to post
Share on other sites
1 minute ago, Gordon Dry said:

After launching the 1-A and recovering, there was no  more issue.

It's like the first attempt ever fails.

Or the weird fact that the root part of a USI Sounding Rocket is the payload truss, which is predefined as debris?!

I wondered that myself, but I don't see why, the mod doesn't care what the vessel is marked as.

This is the code that is falling over. My guess is that originPartSnapshot is returning null for one of your parts (I'm thinking it's likely the root part).

I'm going to try installing Sounding Rockets and see if I can reproduce (which is best case scenario for me, because my dev environment will tell me exactly what is null) - if not, I'll put some try/catch blocks in that will log enough for me to be able to track it down (and will stop the entire code from halting execution when it craps out)

Share this post


Link to post
Share on other sites

ScrapYard 1.1.1 Released

  • Recompiled for KSP 1.5
  • Gracefully handle exceptions when trying to add part to the inventory on vessel recovery

 

Share this post


Link to post
Share on other sites

As I cannot open an issue on your fork:

ScrapYard (1.1.0.1 for KSP 1.4.5) behaves weird in VAB.

  1. neither manually nor automatically quick-applying provides new parts
  2. but there are used parts in the inventory list
  3. when I choose a used part from the the inventory list manually some parameters in the part's PAW are altered:
    1. GPOSpeedFuelPump is toggled off
    2. BuoyancyControl slider is moved to left and value is set to 0 on first click on "apply" and to -1 on second click on "apply" (0 is the lowest possible value)
    3. Kerbalism Reliability is set back to "standard" - no matter if it was "high"
  4. Moving any slider makes the part set to "New part" immediately

Full log and stuff:
https://www.dropbox.com/s/f5iaxqnu58is6ll/2018-10-23_2 KSP.log and stuff.7z?dl=1

Edit:

This is written to the log after loading craft in VAB:

Exception handling event onEditorConstructionModeChange in class EditorLogic:System.NullReferenceException: Object reference not set to an instance of an object
  at KerbalFSM.RunEvent (.KFSMEvent evt) [0x00000] in <filename unknown>:0 
  at EditorLogic.onConstructionModeChanged (ConstructionMode mode) [0x00000] in <filename unknown>:0 
  at EventData`1[ConstructionMode].Fire (ConstructionMode data) [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

NullReferenceException: Object reference not set to an instance of an object
  at KerbalFSM.RunEvent (.KFSMEvent evt) [0x00000] in <filename unknown>:0 
  at EditorLogic.onConstructionModeChanged (ConstructionMode mode) [0x00000] in <filename unknown>:0 
  at EventData`1[ConstructionMode].Fire (ConstructionMode data) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
EventData`1:Fire(ConstructionMode)
EditorToolsUI:SetMode(ConstructionMode, Boolean)
EditorToolsUI:onEditorPartEvent(ConstructionEventType, Part)
EventData`2:Fire(ConstructionEventType, Part)
EditorLogic:<SetupFSM>m__1D()
KerbalFSM:RunEvent(KFSMEvent)
EditorLogic:SpawnPart(AvailablePart)
ScrapYard.UI.PartInstance:selectPart(Part)
ScrapYard.UI.PartInstance:Draw()
ScrapYard.UI.InstanceSelectorUI:Draw(Int32)
UnityEngine.LayoutedWindow:DoWindow(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)
 
(Filename:  Line: -1)

 

Edited by Gordon Dry

Share this post


Link to post
Share on other sites

^Update:

I found this in the log what tells me that again some bad mod (dunno which one) created a Module without name which is often the reason for issues:

[ScrapYard] Error while applying module ''. Error: 
 System.NullReferenceException: Object reference not set to an instance of an object
  at PartModule.Save (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at ScrapYard.InventoryPart.FullyApplyToPart (.Part part) [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

It's really difficult and time consuming to find the module without name in the persistant.sfs ...

But also modules with names are affected:

[ScrapYard] Error while applying module 'ModuleDecouplerShroud'. Error: 
 System.NullReferenceException: Object reference not set to an instance of an object
  at ScrapYard.InventoryPart.FullyApplyToPart (.Part part) [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

 

Share this post


Link to post
Share on other sites
1 hour ago, Gordon Dry said:

^Update:

I found this in the log what tells me that again some bad mod (dunno which one) created a Module without name which is often the reason for issues:


[ScrapYard] Error while applying module ''. Error: 
 System.NullReferenceException: Object reference not set to an instance of an object
  at PartModule.Save (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at ScrapYard.InventoryPart.FullyApplyToPart (.Part part) [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

It's really difficult and time consuming to find the module without name in the persistant.sfs ...

But also modules with names are affected:


[ScrapYard] Error while applying module 'ModuleDecouplerShroud'. Error: 
 System.NullReferenceException: Object reference not set to an instance of an object
  at ScrapYard.InventoryPart.FullyApplyToPart (.Part part) [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

 

Most likely explanation is that your bad mod is bringing the whole thing down with it - I know the stack trace mentions ScrapYard but in this case it seems to be incidental to the main error .

Also, I tried saying this nicely with your last report, but it seems it didn't go in.

You have over 200 mods installed. Stuff like this is going to happen. When reporting bugs, I need you to tell me the MINIMUM mods required to make this happen. Clearly this isn't happening with games that don't have every mod known to man installed, as a) there would be a hell of a lot more reports, and b) I'd have noticed in testing.

If I can't reproduce it, I can't fix it. And I am not installing 200 mods :)

Share this post


Link to post
Share on other sites

Many patch configs nowadays do something like

%MODULE[ModuleSPU] {}

which is "add or create" ...

But other devs then do it like this

%MODULE[ModuleSPU]
{
    %name = ModuleSPU
}

and I wonder if the first case could be wrong?

@blowfish What do you think?
Is it enough to use the first case to create a proper module when not existing with the "name = ModuleSPU" automatically inserted by Module Manager?

Then if not, this would be the reason for modules without names I guess.
Just an idea.

Share this post


Link to post
Share on other sites
2 hours ago, Gordon Dry said:

Many patch configs nowadays do something like


%MODULE[ModuleSPU] {}

which is "add or create" ...

But other devs then do it like this


%MODULE[ModuleSPU]
{
    %name = ModuleSPU
}

and I wonder if the first case could be wrong?

@blowfish What do you think?
Is it enough to use the first case to create a proper module when not existing with the "name = ModuleSPU" automatically inserted by Module Manager?

Then if not, this would be the reason for modules without names I guess.
Just an idea.

I believe it will create the name if it doesn't already exist

Config cache is always the best place to verify though.

Edited by blowfish

Share this post


Link to post
Share on other sites

It looks a bug keeping parts from being inventoried was fixed in the new build. Is the new build compatible with 1.4.5?

Or, is it normal for KCT, BARIS and Scrapyard to not work right?

Edited by dlrk

Share this post


Link to post
Share on other sites

@dlrk I really would like to test in my environment - but as long as Kopernicus is not KSP 1.5.2+ ready - and KSP itself is not 1.5.2+ ready as well :D - I can't ...

Share this post


Link to post
Share on other sites
2 hours ago, dlrk said:

It looks a bug keeping parts from being inventoried was fixed in the new build. Is the new build compatible with 1.4.5?

Or, is it normal for KCT, BARIS and Scrapyard to not work right?

It's probably 1.4.5 compatible, I just haven't tested it (the last 1.4.5 version worked fine on 1.5, and the only thing I changed was to add a try/catch block to a method, so I expect that it will be backwards compatible).

If you provide a log I can take a look for you.

Edited by severedsolo

Share this post


Link to post
Share on other sites

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.