Jump to content

[1.12.4] ScrapYard (SYD) The Common Part Inventory - v2.2.99.0-prerelease `<Project Zelda II>` edition [08 Jan 2023]


zer0Kerbal

Recommended Posts

On 12/13/2022 at 7:33 AM, Lan_Morehell said:

Good evening!

 

Having the same issue with "quick aply" on latest version. Its quite challenging to apply manually a whole lot of parts :)

 

Also a small suggestion to mod - to be able to discard automatically all parts with certain use count or safety rating....

 

Thanks!

I second both the error and the suggestion.

I do have a few (60) mods installed in parallel, but even after a fresh install with only deps for mods, the issue persists.

Thanks for the mod

Link to comment
Share on other sites

  • 2 weeks later...

Yeah doesn't really work for me either. Sometimes with auto apply it'll use parts, other times it won't. And I am getting the flowgraph log spam as well. I really like the mod but I may have to remove it till it gets fixed up sadly.

Link to comment
Share on other sites

11 hours ago, eagleswing12 said:

You seriously need to fix the FlowGraph Errors. It makes the mod unplayable, and you seriously need to fix it.

As stated numerous times - the FlowGraph issue is NOT ScrapYard - and that has been proven beyond all doubt. Issue lies in KSP 1.8.1 ReRoot and other mods mucking about inside KSP. 

To restate (and add - probably violates copyright laws)

 

On 3/20/2023 at 9:42 PM, zer0Kerbal said:

Eureka, I believe @TruePikachu has found the probable culprit.

 KSPCF mucks around inside KSP through Harmony and, well that statement is self explanatory; KSPCF fixes are well intentioned, but the laws of unintended consequences have bit them in the rear of their space suits.

I will state this in plain English - KSPCF is probably incompatible with most addons that don't use Harmony, and even some of those. Too many monkey patches affecting too many things. 

I would do another test like I livestreamed above, but installing Harmony runs afoul of the EULA/TOS (or so my legal advisor says) so I won't; however would be fun to see a plain jane install with KSPCF+SY installed and a live log open...

I stand by this statement because there is no hard evidence proving me wrong - there isn't enough transparency.

Edited by zer0Kerbal
update links and lasso the birds
Link to comment
Share on other sites

  • 2 weeks later...
On 5/15/2023 at 5:30 AM, zer0Kerbal said:

As stated numerous times - the FlowGraph issue is NOT ScrapYard - and that has been proven beyond all doubt. Issue lies in KSP 1.8.1 ReRoot and other mods mucking about inside KSP. 

To restate (and add - probably violates copyright laws)

 

I stand by this statement because there is no hard evidence proving me wrong - there isn't enough transparency.

as much as I love Scrapyard, due to this stalemate in the situation, and KSPcommunityfixes being integral part of many other mods

i sure do hope a scrapyard alternative will be made somewhere someday, maybe even a rework.
if tracing the decayed root that causes interference between the two isn't too deep for its worth

Link to comment
Share on other sites

On 5/15/2023 at 4:30 AM, zer0Kerbal said:

the FlowGraph issue is NOT ScrapYard

How could it not be ?
All you have to do to reproduce it is get a clean stock install, add Scrapyard, new game (sandbox/career doesn't matter), add a mk1 pod, a fuel tank and an engine, launch, and get immediately a bunch of flowgraph errors...

Edit : and actually, I can even tell you why this is happening.
This is due to ScrapYard reassigning the parts persistentId, which is a very sketchy behavior (what did you say about mods mucking about inside KSP ?), and not the only one BTW, it also alter the part prefabs, which is arguably even more questionable.
This happen from the ModuleSYPartTracker.ID setter, which is called from a bunch of code paths, but notably from ModuleSYPartTracker.MakeFresh() which generate a new id from every call, and from there, there are just a whole tree of call sites.
Reassigning persistentId is something that should be done with great care and can't be done at random points in the execution flow, it implies at the very least firing the onPartPersistentIdChanged gameevent, but even that isn't enough, as persistentIds are internally used by variety of subsystems, including but not limited to the resource flow graph, and also by many mods whose bheavior will also be affected by what ScrapYard is doing.

Said otherwise, the flow graph errors are just the tip of the iceberg for a much more fundamental and widespread issue in ScrapYard, and has actually been around since a long time.
I believe @severedsolo was actually aware of it, see

Edited by Gotmachine
Link to comment
Share on other sites

On 5/26/2023 at 9:41 AM, Gotmachine said:

How could it not be ?

By not being! Or perhaps it does, but it's not that simple as you are thinking! ;)

 

On 5/26/2023 at 9:41 AM, Gotmachine said:

All you have to do to reproduce it is get a clean stock install, add Scrapyard, new game (sandbox/career doesn't matter), add a mk1 pod, a fuel tank and an engine, launch, and get immediately a bunch of flowgraph errors...

All YOU had to do to reproduce it, other's people mileage may vary and, indeed, it does vary. Do you really think that if this would be just so plain simple as you says, @zer0Kerbalwould not had acknowledged the problem already? On every single time I reached him with something he could reproduce, he acknowledged the problem on the spot and no rarely published a fix in the next day.

 

On 5/26/2023 at 9:41 AM, Gotmachine said:

Edit : and actually, I can even tell you why this is happening.

Last time I heard you saying this, you was attributing to TweakScale what was in reality a bug on KSP's AutoStruts since 1.2.2, the first release to had it :) - this feature never worked correctly all these years, as it appears. :/ 

You are still having some hard time on telling Cause from Effect, but on your behalf, this one is really tricky and it still may be something on SYD - it only happens that, if it's on SYD, it appears to be unrelated to persistentId. You know, Add'On's Authors can be tricked into believing that a problem on KSP is on their shoulders, right? @severedsolocould be wrong on believing it's something on his shoulders (not saying it was not, I'm saying that we have evidences that suggests it might not, so his post is not proof of the problem, just another evidence pinpointing a problem involving SID).

 

On 5/26/2023 at 9:41 AM, Gotmachine said:

Reassigning persistentId is something that should be done with great care and can't be done at random points in the execution flow, it implies at the very least firing the onPartPersistentIdChanged gameevent, but even that isn't enough, as persistentIds are internally used by variety of subsystems, including but not limited to the resource flow graph, and also by many mods whose bheavior will also be affected by what ScrapYard is doing.

This is the point in which you could be right (about SYD, the statement itself is true), but since you failed to thoughtfully check your hypothesis, you got unlucky on the claim, as there's a chain of events in which SYD works PERFECTLY.

Really, @zer0Kerbalwould had already acknowledged the problem otherwise, early this month to be more specific. Because I was trying to diagnose this problem at that time, and I am 100% sure about the date because it was while doing my white and black box testings on SYD that I caught and diagnosed the ReRoot problem. And this is the point in which you ended up being useful (even if by accident), because since I was trapped on a configuration in which I just could not reproduce the problem easily, I was prone to conclude that the ReRoot problem could be the trigger for the SYD's mishap. You just proved that the ReRoot is just not a factor on this one, and this helped to shrink the targets.

Now, let's go to the (real) problem at hands: SYD is working perfectly once something still to be diagnosed happens (or start to misbehave once a mysterious event happens!).

Once this mysterious event happens, SYD just works without any flaws and, right now, I'm trying to figure out what I had did on my rig today that suddenly made it start to behave.

What I know for sure right now:

  1. I have a sandbox savegame where the problem is happening deterministically.
  2. I have a career savegame where the problem just doesn't happens, but happened once.
  3. I remember clearly that on the last time I worked on this, there was a day in which the problem didn't happened at all no matter what.

The items 1 and 2 appears to suggest a race condition while initialising SYD on career mode (and a faulty initialisation on sandbox), and so SYD may be involved or even at fault here. However, the item 3 strongly suggests otherwise, that SYD may not be at fault at all because otherwise I would not had spent 2 or 3 days bashing my sorry SAS relentlessly trying to reproduce the problem without success early this month.

Anyway, this time I documented things: https://github.com/net-lisias-ksp/KSP-Recall/issues/67

I will update that issue as I learn more.

 

 

Edited by Lisias
Tyops, waht esle?
Link to comment
Share on other sites

39 minutes ago, Lisias said:

SYD is working perfectly once something still to be diagnosed happens

I don't care about if this mod is working or not, I do however care about the repeated and unfounded claim that KSPCF is the cause of the issue.
The point is that SYD alters the unique identifier of parts, and that is the cause of the flowgraph errors.
It shouldn't be doing this, no mod ever should, and this has far more consequences than the flow graph errors, which are actually relatively benign since they only affect the delta-v calcs and the error is actually handled gracefully by KSP.
You're free to doubt or disagree, I wouldn't expect less.

Link to comment
Share on other sites

[snip]

19 hours ago, Gotmachine said:

I do however care about the repeated and unfounded claim that KSPCF is the cause of the issue.

Differential diagnosis. KSPCF is one of the few constants we had to work with.

And since KSPCF royally mangles with KSP internals in ways in which most authors can't audit if they want to respect the Forum Guidelines, I'm afraid that you have no other choice but to carry the burden you had put in your own shoulders.

YOU are the one bringing up unfounded claims about other people's works, this is not the first time - and you had been proved wrong twice already. How in hell we are supposed to trust you now about KSPCF?

No one can double check what you are doing without infringing the EULA and the Forum Guidelines, damnit! All we have is your word about, and right now it's not worthing too much.

 

19 hours ago, Gotmachine said:

The point is that SYD alters the unique identifier of parts, and that is the cause of the flowgraph errors.

And TweakScale changes half the World, from mesh sizes to PartModule's internal attributes, and nevertheless the damned thing is working and essentially the worst bugs I ever handled on it had their root cause on a KSP's internal bug in a way or another

The safest place for a ship is the harbour, but this is not what ships are built for.

 

19 hours ago, Gotmachine said:

It shouldn't be doing this, no mod ever should

By you logic, no Mod should be mangling anything inside KSP at all, but yet this is not what mods are built for.

Including yours.

 

19 hours ago, Gotmachine said:

and this has far more consequences than the flow graph errors, which are actually relatively benign since they only affect the delta-v calcs and the error is actually handled gracefully by KSP.

What leads to the conclusion that once the FlowGraph logspam does not happen, there's no more problem at all as KSP handles the situation?

 

19 hours ago, Gotmachine said:

You're free to doubt or disagree, I wouldn't expect less.

We are on the same page on this one. :) 

Edited by Snark
Redacted by moderator
Link to comment
Share on other sites

@Lisias [snip] what was said is 100% right. All that is needed to replicate the bug is:

1 - get clean stock ksp

2- install ScrapYard, MM, Contract Configurator

3- enter VAB, load a craft (I loaded the stock AeroEquus)

4- press launch, get FlowGraph error spam on launchpad (no staging/ignition necessary)

Install Details: Steam install, no DLCs, launched from the KSP_x64.exe file, scrapyard installed through ckan (pulled MM as well), contract configurator manually.

 

I have just did this myself, see attached ksp.log. Nothing installed except the above, see the log. I have made an account specifically for this after years of lurking because I have noticed this spam problem in another, heavily modded install, and stumbled upon this "discussion" between you, machine and zer0kerbal. [snip]

Anyway, @zer0Kerbal above you have the steps to replicate, and below the log file if you want to check it out. [snip]

Player.log file here for both scrapyard-only and kspcf-only installs

Edited by 1nsert_brain
updated download link and included KSPCF player.log as well
Link to comment
Share on other sites

On 5/27/2023 at 1:25 PM, 1nsert_brain said:

@Lisias, as what was said is 100% right. All that is needed to replicate the bug is:

1 - get clean stock ksp

2- install ScrapYard, MM, Contract Configurator

3- enter VAB, load a craft (I loaded the stock AeroEquus)

4- press launch, get FlowGraph error spam on launchpad (no staging/ignition necessary)

No, it was not. I have right now a setup where the problem is not happening. #67.

[snip]

Again, I want to refer to KSP-Recall's #27 and #66: what is now known as bugs on the AutoStrut (since 1.2.2) and on the ReRoot (since 1.8.0) were being attributed to TweakScale for years merely because only TweakScale was being used on the machine when the user got screwed by these bugs.

It could be TS? Of course it could, and that's the reason I spent so many man/months trying to find something on TS. But in the end, it was not.

Exactly why do you are so sure this is not happening again right now?

[snip] if it would be so easy to reproduce the problem as it's happening now, @zer0Kerbalwould had already acknowledged the problem since the first occurrence, not to mention I would had reproduced it from late last month and early this one when I caught and diagnosed #66.

And I want to say it again: for a whole week, from April 26 to May 6 (more or less), I was using all my free time (about 4 to 5 hours per day) pursuing this problem without success, where the only situation in which I reproduced the problem was by loading a savegame from the one of the users that was kindly enough to not only report the problem, but provided us with all the material we had asked.

And that rig had KSPCF installed where my rig did not.

Yesterday, May 26 Friday, was the first time a savegame created on my rig manifested the problem.

[snip]

 

On 5/27/2023 at 7:04 PM, linuxgurugamer said:
  1. If not the stock MM, which one was it?

I ruled out an influence of MM, because on my rig changing between Forum and my own Fork didn't affected the results. (yeah, it crossed my mind too)

[edit] Unless MM (or ScrapYard) would be running more than once in memory, as it had happened before with MM (Forum) under special circumstances. Long shot, but it worths checking. Thanks for the insight!

[edit2] Nope, I just ruled out again MM (no matter which one), and the "double threading" hypothesis, besides still possible, appears to do not be causing the LogSpam neither (besides, hypothetically, being a possible explanation for some double logging I found).

 

On 5/27/2023 at 1:25 PM, 1nsert_brain said:

2- install ScrapYard, MM, Contract Configurator

Contract Configurator is not needed, the rig I used yesterday (where the problem was finally consistently reproduced by the first time) doesn't had it installed.

Remove ScrapYard_ContractConfigurator.dll from the Plugins folder and you are good to go - the less things installed you have, more easier is to zero in into the target.

Edited by Lisias
Redacted by moderator
Link to comment
Share on other sites

Once again, some content has been redacted and/or removed.

To repeat, since apparently the last time wasn't clear enough, please refrain from personal remarks and insults

The topic of this thread is this mod.  If you have a comment, feedback, bug report, or what-have-you about this mod, then this is the right place to post that.

The topic of this thread is not:

  • your opinion of other people's behavior
  • your opinion of other people's motivations
  • ...your opinion about other people, period.

If you have a personal problem with someone, that's your prerogative, but keep it to yourself, please-- it's not your place to critique others here in the forum.  If you think someone's behavior is sufficiently egregious that they are violating forum rules, then by all means file a report about it and the moderators will have a look.  Beyond that, though, other people's behavior is not your concern, so please stop with the personal sniping.  It accomplishes nothing and makes the forum less pleasant for everyone present.

Thank you for your understanding.

Link to comment
Share on other sites

13 hours ago, linuxgurugamer said:

Given what's been going on, would be good to know the following:

  1. How did you install the mods
  2. What version of each?
  3. If not the stock MM, which one was it?

This info is in the post above: Install Details: Steam install, no DLCs, launched from the KSP_x64.exe file, scrapyard installed through ckan (pulled MM as well), contract configurator manually.

MM is the stock one, not the fork by Lisias

Regardless, how scrapyard is installed does not change the outcome in this case. Testing with the curseforge download and manual installation produces the same result, see log file attached here.

I re-uploaded the player.log file below for both kspcf and scrapyard as well, which has all the info about versions and system setup. Everything is the latest version, anyway.

 

11 hours ago, Lisias said:

No, it was not. I have right now a setup where the problem is not happening. #67.

[snip]

Again, I want to refer to KSP-Recall's #27 and #66: what is now known as bugs on the AutoStrut (since 1.2.2) and on the ReRoot (since 1.8.0) were being attributed to TweakScale for years merely because only TweakScale was being used on the machine when the user got screwed by these bugs.

It could be TS? Of course it could, and that's the reason I spent so many month/hours trying to find something on TS. But in the end, it was not.

Exactly why do you are so sure this is not happening again right now?

I have never stated it is ScrapYard fault, merely that what was stated before is 100% correct: you can replicate the bug on a clean install with only the latest ScrapYard and MM. Moreover,  it does not have anything to do with KSPCF, contrary to what was stated above.

 

11 hours ago, Lisias said:

[snip] if it would be so easy to reproduce the problem as it's happening now, @zer0Kerbalwould had already acknowledged the problem since the first occurrence, not to mention I would had reproduced it from late last month and early this one when I caught and diagnosed #66.

And I want to say it again: for a whole week, from April 26 to May 6 (more or less), I was using all my free time (about 4 to 5 hours per day) pursuing this problem without success, where the only situation in which I reproduced the problem was by loading a savegame from the one of the users that was kindly enough to not only report the problem, but provided us with all the material we had asked.

And that rig had KSPCF installed where my rig did not.

Yesterday, May 26 Friday, was the first time a savegame created on my rig manifested the problem.

[snip]

 The player.log was attached, as asked in the OP for bug reports. No save was provided by me because it was not requested and there is nothing in the game: I re-downloaded it from steam from scratch, installed the mod, and put a single stock vessel on the pad. No KSPCF, only ScrapYard + MM (not your fork).

 

11 hours ago, Lisias said:

I ruled out an influence of MM, because on my rig changing between Forum and my own Fork didn't affected the results. (yeah, it crossed my mind too)

[edit] Unless MM (or ScrapYard) would be running more than once in memory, as it had happened before with MM (Forum) under special circumstances. Long shot, but it worths checking. Thanks for the insight!

[edit2] Nope, I just ruled out again MM (no matter which one), and the "double threading" hypothesis, besides still possible, appears to do not be causing the LogSpam neither (besides, hypothetically, being a possible explanation for some double logging I found).

 

Contract Configurator is not needed, the rig I used yesterday (where the problem was finally consistently reproduced by the first time) doesn't had it installed.

Remove ScrapYard_ContractConfigurator.dll from the Plugins folder and you are good to go - the less things installed you have, more easier is to zero in into the target.

Contract Configurator was installed since it is a requirement of Scrap Yard, so the install would be exactly as specified in the OP. The behavior happens regardless of Contract Configurator and has nothing to do with it, as I replicated both with and without it.

Anyway, you can see proof of all the above in the player.log files below.

 

KSPCF Player.log and ScrapYard Player.log

Link to comment
Share on other sites

2 hours ago, 1nsert_brain said:

Contract Configurator was installed since it is a requirement of Scrap Yard, so the install would be exactly as specified in the OP.

Is it?  If it is, then CKAN needs to be updated, it doesn't install CC as a dependency of Scrap Yard.  It also isn't listed as a dependency in the forum page.

Also, according to the forum page for Scrapyard, Magicore is a dependency

 

So, as a test, I tried to replicate this, using the following steps (short answer, the errors did happen):

  1. Clean install via zip (I use the downloaded zip from the IG site, not Steam)
  2. Added to CKAN
  3. Installed ONLY the following:
    1. Scrapyard
    2. ModuleManager (added as a dependency)
  4. Started the game

 

Got the following errors:

Spoiler
15661 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15664 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15667 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15670 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15673 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15676 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15679 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15682 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15685 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
15688 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
15691 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
15694 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
15697 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
15700 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
15703 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
15706 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
15709 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
15712 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
15715 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
15718 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
15721 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
15724 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
15727 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
15730 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
15733 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4294556130 
15736 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4294556130 
15739 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292299246 
15742 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292299246 
15745 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294842 
15748 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294842 
15751 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293274 
15754 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293274 
15757 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296410 
15760 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296410 
15763 [FlowGraph]: Graph already contains item! Part noseCone with id 4293293136 
15766 [FlowGraph]: Graph already contains item! Part noseCone with id 4293293136 
15769 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293068 
15772 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293068 
15775 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296256 
15778 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296256 
15781 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294930 
15784 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294930 
15787 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293292862 
15790 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293292862 
15793 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296102 
15796 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296102 
15799 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294886 
15802 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294886 
15805 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
15808 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
15811 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15814 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15817 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15820 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15823 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15826 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15829 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15832 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15835 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15838 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15841 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15844 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15847 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15850 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15853 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15856 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15859 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
15862 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
15865 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
15868 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
15871 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
15874 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
15877 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
15880 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
15883 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
15886 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
15889 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
15892 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
15895 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
15898 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
15901 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
15904 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
15907 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
15910 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
15913 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15916 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15919 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15922 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15925 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15928 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15931 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15934 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15937 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15940 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15943 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15946 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15949 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15952 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15955 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15958 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15961 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15964 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15967 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15970 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15973 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15976 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15979 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15982 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15985 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15988 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15991 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15994 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15997 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16000 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16003 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16006 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16009 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
16012 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
16015 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
16018 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
16021 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
16024 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
16027 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
16030 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
16033 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
16036 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
16039 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
16042 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
16045 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
16048 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
16051 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
16054 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
16057 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4294556130 
16060 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4294556130 
16063 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292299246 
16066 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292299246 
16069 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294842 
16072 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294842 
16075 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293274 
16078 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293274 
16081 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296410 
16084 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296410 
16087 [FlowGraph]: Graph already contains item! Part noseCone with id 4293293136 
16090 [FlowGraph]: Graph already contains item! Part noseCone with id 4293293136 
16093 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293068 
16096 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293068 
16099 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296256 
16102 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296256 
16105 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294930 
16108 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294930 
16111 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293292862 
16114 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293292862 
16117 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296102 
16120 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296102 
16123 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294886 
16126 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294886 
16129 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
16132 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
16135 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16138 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16141 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16144 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16147 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16150 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16153 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16156 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16159 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
16162 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
16165 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
16168 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
16171 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16174 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16177 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16180 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16183 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
16186 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
16189 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
16192 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
16195 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
16198 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
16201 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
16204 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
16207 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
16210 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
16213 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
16216 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
16219 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
16222 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
16225 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
16228 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
16231 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
16234 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
16237 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16240 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16243 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16246 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16249 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16252 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16255 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16258 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16261 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
16264 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
16267 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
16270 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
16273 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16276 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16279 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16282 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16285 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16288 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16291 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16294 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16297 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16300 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16303 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16306 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 

 

Here is a zip containing the listed files:  https://www.dropbox.com/s/zl2cv4agki39ld4/Scrapyard-errors.zip?dl=0

  • ModuleManager logs
  • Player.log
  • KSP.log
  • ModuleManager generated files in GameData:
    • ModuleManager.ConfigCache
    • ModuleManager.ConfigSHA
    • ModuleManger.Physics
    • ModuleManager.TechTree

 

So, it seems that whatever is going on with KSPCF, it has nothing to do with what's going on here.  These results duplicate those of @1nsert_brain .

 So can that part of the discussion just be dropped and concentrate on what's going on here?

FYI:  I was planning on doing a bit more testing, but since the errors happened on my very first, minimalist test, I'm not planning on doing anything more here.  I would be willing, if requested, to perform specific tests, as long as it doesn't take too much time.

Link to comment
Share on other sites

Here is a detailed explanation of the issue :

  • When a vessel is created, KSP creates a resource graph cache that is used for delta-v calcs. Specifically, a dictionary of <persistentId, DeltaVPartInfo>, which you can access from vessel.VesselDeltaV.OperatingStageInfo[x].partInfoDictionary
  • Specifically on vessel launch (but there are other execution paths where this happen), ScrapYard reassign all parts persistentId to new ones. The execution path in the ScrapYard codebase for this is the  GameEvents.OnVesselRollout handler : EventListeners.VesselRolloutEvent() -> Utilities.InventoryManagement.RemovePartsFromInventory() -> ModuleSYPartTracker.MakeFresh() -> ModuleSYPartTracker.ID setter
  • KSP then tries to run the deltaV calcs. It check the vessel parts against the partInfoDictionary cache, but because of what ScrapYard did, all parts persistentId have changed, so the partInfoDictionary keys don't match the part.persistentId anymore, leading to KSP re-adding the same parts but with the new key

This can easily be verified by doing a bit of logging on the ModuleSYPartTracker.ID setter and the partInfoDictionary objects state.

Again, altering the parts persistentId is a very bad idea. The whole point of those ids is that they can be relied on to uniquely identify a part game-wide, and they are used by a variety of KSP subsystems, from docking ports to ground science or robotic parts, and are commonly used by a variety of mods.
And while KSP has a mechanism to handle persistentId changes (which ScrapYard doesn't leverage), this is an internal mechanism designed to handle potential duplicate persistentIds when instantiatiating a craft, which is a very specific and limited scenario.
There might be ways to mitigate that specific issue with the delta-v calcs/flow graph error, but again, this is only the tip of the iceberg.
ScrapYard is messing with a fundamental mechanism of KSP and altering it's behavior in a way that is breaking the API contract.

Now, to be clear, I don't mean this as an attack against anyone.
This mistake was made a long time ago, see https://github.com/magico13/ScrapYard/blame/57f02047cadd56c139d2bddf74b0dd7a8b8229b0/ScrapYard/Modules/ModuleSYPartTracker.cs#L30

I would suggest looking at how things were handled in ScrapYard prior to that commit, and look into re-introducing it, or some variant of it.
From a high level functional PoV, I don't see why ScrapYard would ever need to alter the parts persistentId in the first place.
I'm not familiar with ScrapYard in detail and I don't intend to provide such a fix, but hopefully you can leverage the information I gave to fix the whole issue.

Edited by Gotmachine
Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

Is it?  If it is, then CKAN needs to be updated, it doesn't install CC as a dependency of Scrap Yard.  It also isn't listed as a dependency in the forum page.

Also, according to the forum page for Scrapyard, Magicore is a dependency

I'm a bit confused, the first post in the first page of this thread states: 

Dependencies

The same is in the github/curseforge/spacedock pages of the mod linked in the OP. Also the following exception, as well as some more errors later, are generated in the player.log file if contract configurator is not present.

Spoiler

Load(Assembly): ScrapYard/Plugins/ScrapYard_ContractConfigurator 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

AssemblyLoader: Loading assembly at C:\ksp_clean\GameData\ScrapYard\Plugins\ScrapYard_ContractConfigurator.dll 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

AssemblyLoader: KSPAssembly 'ScrapYard' V2.2.99 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Load(Assembly): Squad/Plugins/KSPSteamCtrlr 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

AssemblyLoader: Loading assembly at C:\ksp_clean\GameData\Squad\Plugins\KSPSteamCtrlr.dll 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

AssemblyLoader: Loading assemblies 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

ADDON BINDER: Cannot resolve assembly: ContractConfigurator, Culture=neutral, PublicKeyToken=null 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

ADDON BINDER: Cannot resolve assembly: ContractConfigurator, Culture=neutral, PublicKeyToken=null 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

AssemblyLoader: Exception loading 'ScrapYard': System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at AssemblyLoader.LoadAssemblies () [0x000e6] in <4b449f2841f84227adfaad3149c8fdba>:0 

Additional information about this exception:

 System.IO.FileNotFoundException: Could not load file or assembly 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

 System.IO.FileNotFoundException: Could not load file or assembly 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

I assumed CKAN was not pulling CC because ScrapYard doesn't support it explicitly, so the dependency got dropped somewhere in the chain.

I don't see mention of magicore. I think I'm missing something.

 

3 hours ago, linuxgurugamer said:

So, as a test, I tried to replicate this, using the following steps (short answer, the errors did happen):

  1. Clean install via zip (I use the downloaded zip from the IG site, not Steam)
  2. Added to CKAN
  3. Installed ONLY the following:
    1. Scrapyard
    2. ModuleManager (added as a dependency)
  4. Started the game

 

Got the following errors:

  Reveal hidden contents
15661 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15664 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15667 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15670 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15673 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15676 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15679 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15682 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15685 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
15688 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
15691 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
15694 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
15697 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
15700 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
15703 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
15706 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
15709 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
15712 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
15715 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
15718 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
15721 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
15724 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
15727 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
15730 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
15733 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4294556130 
15736 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4294556130 
15739 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292299246 
15742 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292299246 
15745 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294842 
15748 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294842 
15751 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293274 
15754 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293274 
15757 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296410 
15760 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296410 
15763 [FlowGraph]: Graph already contains item! Part noseCone with id 4293293136 
15766 [FlowGraph]: Graph already contains item! Part noseCone with id 4293293136 
15769 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293068 
15772 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293068 
15775 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296256 
15778 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296256 
15781 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294930 
15784 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294930 
15787 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293292862 
15790 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293292862 
15793 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296102 
15796 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296102 
15799 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294886 
15802 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294886 
15805 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
15808 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
15811 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15814 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15817 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15820 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15823 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15826 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15829 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15832 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15835 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15838 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15841 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15844 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15847 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15850 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15853 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15856 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15859 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
15862 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
15865 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
15868 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
15871 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
15874 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
15877 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
15880 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
15883 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
15886 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
15889 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
15892 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
15895 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
15898 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
15901 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
15904 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
15907 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
15910 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
15913 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15916 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15919 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15922 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15925 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15928 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15931 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15934 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15937 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15940 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15943 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15946 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15949 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15952 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
15955 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15958 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
15961 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15964 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
15967 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15970 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
15973 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15976 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
15979 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15982 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
15985 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15988 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
15991 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15994 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
15997 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16000 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16003 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16006 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16009 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
16012 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
16015 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
16018 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
16021 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
16024 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
16027 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
16030 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
16033 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
16036 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
16039 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
16042 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
16045 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
16048 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
16051 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
16054 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
16057 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4294556130 
16060 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4294556130 
16063 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292299246 
16066 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292299246 
16069 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294842 
16072 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294842 
16075 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293274 
16078 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293274 
16081 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296410 
16084 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296410 
16087 [FlowGraph]: Graph already contains item! Part noseCone with id 4293293136 
16090 [FlowGraph]: Graph already contains item! Part noseCone with id 4293293136 
16093 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293068 
16096 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293293068 
16099 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296256 
16102 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296256 
16105 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294930 
16108 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294930 
16111 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293292862 
16114 [FlowGraph]: Graph already contains item! Part radialDecoupler with id 4293292862 
16117 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296102 
16120 [FlowGraph]: Graph already contains item! Part solidBooster.v2 with id 4292296102 
16123 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294886 
16126 [FlowGraph]: Graph already contains item! Part noseCone with id 4292294886 
16129 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
16132 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
16135 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16138 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16141 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16144 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16147 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16150 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16153 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16156 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16159 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
16162 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
16165 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
16168 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
16171 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16174 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16177 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16180 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16183 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
16186 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292482670 
16189 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
16192 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294599110 
16195 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
16198 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294598432 
16201 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
16204 [FlowGraph]: Graph already contains item! Part fuelTank with id 4294597690 
16207 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
16210 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293295646 
16213 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
16216 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293442 
16219 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
16222 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293396 
16225 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
16228 [FlowGraph]: Graph already contains item! Part R8winglet with id 4293293350 
16231 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
16234 [FlowGraph]: Graph already contains item! Part liquidEngine2 with id 4294569520 
16237 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16240 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16243 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16246 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16249 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16252 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16255 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16258 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16261 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
16264 [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4292451412 
16267 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
16270 [FlowGraph]: Graph already contains item! Part Decoupler.1 with id 4292468564 
16273 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16276 [FlowGraph]: Graph already contains item! Part fuelTank with id 4288402330 
16279 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16282 [FlowGraph]: Graph already contains item! Part liquidEngine3.v2 with id 4292493982 
16285 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16288 [FlowGraph]: Graph already contains item! Part parachuteSingle with id 4294655242 
16291 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16294 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4294265902 
16297 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16300 [FlowGraph]: Graph already contains item! Part GooExperiment with id 4292423116 
16303 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 
16306 [FlowGraph]: Graph already contains item! Part longAntenna with id 4294368390 

 

Here is a zip containing the listed files:  https://www.dropbox.com/s/zl2cv4agki39ld4/Scrapyard-errors.zip?dl=0

  • ModuleManager logs
  • Player.log
  • KSP.log
  • ModuleManager generated files in GameData:
    • ModuleManager.ConfigCache
    • ModuleManager.ConfigSHA
    • ModuleManger.Physics
    • ModuleManager.TechTree

 

So, it seems that whatever is going on with KSPCF, it has nothing to do with what's going on here.  These results duplicate those of @1nsert_brain .

 So can that part of the discussion just be dropped and concentrate on what's going on here?

FYI:  I was planning on doing a bit more testing, but since the errors happened on my very first, minimalist test, I'm not planning on doing anything more here.  I would be willing, if requested, to perform specific tests, as long as it doesn't take too much time.

Thanks for replicating it. My limited knowledge of ksp doesn't really allow me to go beyond that, so gl to whoever decides to look into this 

Link to comment
Share on other sites

Without digging too much, I'd suggest a simple part module to keep track of any unique ID which may be needed by Scrapyard.  If it only saves an Id, it won't even take any additional cpu.

 

Edited by linuxgurugamer
Link to comment
Share on other sites

3 hours ago, 1nsert_brain said:

I'm a bit confused, the first post in the first page of this thread states: 

Dependencies

The same is in the github/curseforge/spacedock pages of the mod linked in the OP. Also the following exception, as well as some more errors later, are generated in the player.log file if contract configurator is not present.

My guess is that it may have needed Magicore a long time ago, but doesn't anymore.

And the same with CC.

@zer0Kerbal should update the OP

Edited by linuxgurugamer
Link to comment
Share on other sites

TL;DR: People are shooting the messenger.

ScrapYard got bitten by a(nother) KSP's Editor [not only, see below] bug in 2018 when KSP 1.4.x happened (I reproduced it on 1.4.1 at least).

The ScrapYard's workaround worked at the time, but aged badly. On this, there's no doubt.

But the problem that affected ScrapYard is still happening on KSP 1.12.5, so the underlining problem will persist.

3 hours ago, linuxgurugamer said:

Without digging too much, I'd suggest a simple part module to keep track of any unique ID which may be needed by Scrapyard.  If it only saves an Id, it won't even take any additional cpu.

It's a viable workaround for ScrapYard, but it will not fix the underlining problem.

There's a bug on KSP's Editor. Yeah, another one. Confirmed to be happening since KSP 1.4.1, and it's, obviously, plaguing KSP 1.12.5 too - so I'm assuming everything between is also affected. [KRAP! Just found another situation where it happened, Editor is one of the triggers of the problem, but not the only one!!!!]

The sad true is that the persistentId is not persistent at all. Editor is changing this value now and then under conditions still to be determined, but that at least today were happening regularly (but not every time) on a minimalistic Test Rig without ScrapYard installed, completely ruling it out of the ordeal.

The previous Maintainer had detected the misbehaviour for sure, but didn't figured out exactly what's happening and tried a work around that worked fine at that moment, bug aged badly as KSP was further developed.

I would recommend to anyone willing to put themselves on the position of having the whole scene relying in your work to please consider that Authors don't do things just because, even that it may look stupid years later (for the sake of honesty, this includes me). KSP has a history, a long history, and trying to diagnosing anything related to KSP without taking such a history in consideration is by itself a stupid move at best, and an insult to people that are around here for ages at worst.

We should be aware at this time that we are all on the same damned boat, and there's no place for a Author that it's putting itself on the Critical Path of the whole scene to just "don't care about anything but its own work".

 

7 hours ago, linuxgurugamer said:

FYI:  I was planning on doing a bit more testing, but since the errors happened on my very first, minimalist test, I'm not planning on doing anything more here.  I would be willing, if requested, to perform specific tests, as long as it doesn't take too much time.

It was exactly the mistake I had made early this month, but by <insert your favorite non forum compliant expletive here> "luck", I got stuck on the opposite result.

This is not a simple bug on a code. It's a complex and unhappy interaction between codes superficially correct, but that are in a bad relationship between them.

I'm documenting the findings on https://github.com/net-lisias-ksp/KSP-Recall/issues/67

 

Edited by Lisias
TL;DR + Krap.
Link to comment
Share on other sites

1 hour ago, Lisias said:

The sad true is that the persistentId is not persistent at all. Editor is changing this value now and then under conditions still to be determined

As I mentioned, persistentId does indeed change. It needs to since it is well, persisted into a craft file, but at the same time must be guaranteed to be unique for every instantiated part. So when KSP loads a craft, the id that are persisted can already be in use (and often will be, since a craft tend to be loaded multiple times, for example by launching it as vessel, then loading it again in the editor, or simply launching multiple vessels out of the same craft file).

That's why KSP has GameEvents.onPartPersistentIdChanged, which you can subscribe to to get notified of such persistentId re-assignements (this will be fired potentially anytime a part is being instantiated).
There is second (added more recently, around KSP 1.7 I think) mechanism to get notified of such persistentId changes, the IShipConstructIDChanges interface, which one can implement on a PartModule. The interface is more limited in scope, as it will exclusively be triggered when loading a shipConstruct, and is mostly there for convenience as it will be fired a bit latter than the GameEvent in the part initialization flow.

Said otherwise, there is no bug and no "misbehaviour". persistentId changing is by design, and always has been. It's even documented on the official API : https://www.kerbalspaceprogram.com/ksp/api/class_game_events.html#a87bb044eae00585d041c7f2babf47c72

Edited by Gotmachine
Link to comment
Share on other sites

I'm just stopping by to mention how weird it is for something I did over 5 years ago to have butterfly effected like this. I don't remember exactly the reasoning for swapping to persistent id off of the guid that I was using, except perhaps a somewhat ironic desire to use more stock functionality and less custom code. At the time it didn't seem to cause any issues but I'll admit I wasn't always the most careful developer.

Link to comment
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.

×
×
  • Create New...