Jump to content

[1.8.x-1.12.x] Module Manager 4.2.3 (July 03th 2023) - Fireworks season


sarbian

Recommended Posts

On 2/20/2023 at 9:48 PM, sarbian said:

It seems that people forgot about the advanced MM options. Add  "-nyan-nyan -ncats" to your KSP launch options. It will change your loading experience drastically.

I can't unsee this.

Link to comment
Share on other sites

On 2/20/2023 at 12:48 PM, sarbian said:

It seems that people forgot about the advanced MM options. Add  "-nyan-nyan -ncats" to your KSP launch options. It will change your loading experience drastically.

W00T! On Demand - That's awesome!

Anyone else finding Alt-F11 not doing anything? Tried in main menu and spacecenter view, is there a trick to it I'm missing?

Edited by tg626
This forum software continues to be hot garbage - multipost
Link to comment
Share on other sites

FWIW for whoever sees this, the following are command line args for Module Manager

  • -nyan-nyan
  • -ncats
  • -mm-dump (dumps post patching database to a folder in KSP folder)
  • -mm-dont-copy-logs
Link to comment
Share on other sites

  • 4 weeks later...

A question for the experts regarding using MM to apply patches to many parts, using MechJeb as the example:

Which would most help minimize loading times to add MechJeb to command capable parts in a HIGHLY modded game? 

1) A single patch file that changes all files that need changing, using @PART[*].  (I.E. @PART[*]:HAS[@MODULE[ModuleCommand]|!@MODULE[MechJebCore]]:NEEDS[MechJeb2])
2) A patch file for each mod, specifying each command  capable part in that mod?  (I.E. @PART[xxxx|yyyy|zzzz]:HAS[!MODULE[MechJebCore}]:NEEDS[Squad&MechJeb2])
3) A single CFG file for each part calling out the part? (I.E. @PART[xxxx]:HAS[!MODULE[MechJebCore}]:NEEDS[Squad&MechJeb2]

Or some other permutation?

Background, I'm writing a system that takes apart the ModuleManager.ConfigCache and parses out / stores data about the parts.  Part of the system contains a file with all the desired changes I want to patch.  (I.E. a line in the file will say to change the title to something, and to change the required tech.  Another line might change a category on another part)  This system can then generate patch files that never forget any change once noted in the system, and never have a 'fat-fingers' moment.

Edited by Padrone
Somehow double posted in one post.
Link to comment
Share on other sites

On 3/28/2023 at 11:30 PM, Padrone said:

Which would most help minimize loading times to add MechJeb to command capable parts in a HIGHLY modded game? 

:NEEDS is the way to go.

@PART[xxxx]:HAS[!MODULE[MechJebCore]]:NEEDS[Squad&MechJeb2]

Any non satisfied :NEEDS clausule automatically removes the patch before the patching itself begins, saving time.

About how the patch are stored on files, is doesn't matter. Everything is loaded into the GameDatabase before Module Manager is even loaded into memory. Module Manager works from the GameDatabase after every .CFG file is already loaded.

— POST EDIT — 

Additionally, please pay special attention on the use of "[" and "]". You inadvertently mistyped one ] (right bracket) by } (right brace), and this is pretty harsh to detect by eye balling later! :)  

Edited by Lisias
post edit
Link to comment
Share on other sites

Congrats to the true gentlemen who introduced the rainbow-sh*ting cat to the loading screen, I was going insane thinking I had somehow made some mistaking while installing mods, when I looked at today's date. Well played.

Edited by mateusviccari
The forums does not allow me to write the word that begins with "sh" and ends with "it"
Link to comment
Share on other sites

11 hours ago, mateusviccari said:

Congrats to the true gentlemen who introduced the rainbow-sh*ting cat to the loading screen, I was going insane thinking I had somehow made some mistaking while installing mods, when I looked at today's date. Well played.

I picked the wrong day to  start a new instance of the game.

Link to comment
Share on other sites

@sarbian or anyone who can clarify..

 

I'm writing a patch to add KIS modules to a bunch of parts (that dont have KIS modules)

Whats the proper edit to add a module to a part that doesnt have the module originally?  to be clear i want to **ADD a module, not edit a module... since the module isnt in the part config

Do I use something like this:

 

@PART[SomePart]
{
	%MODULE

	{

	name = ModuleKISInventory

	xxx = xxxx

	xxxx = xxx

	}
}

 

 

basically im asking If all I do is just add a % before MODULE to add a module?  Since its an addition and not an edit. Or do i use the same as if its just efiting the module and it will be recognized as a new module and add it?

 

Just want to make sure im doing it correctly

 

 

Link to comment
Share on other sites

4 hours ago, Astra Infinitum said:

Whats the proper edit to add a module to a part that doesnt have the module originally?  to be clear i want to **ADD a module, not edit a module... since the module isnt in the part config

If you want to add the module to a part that doesn't have the module originally (either through Stock+KIS implementation or via a patch for a modded part included within the mod), you might then want to consider doing the following.

@PART[SomePart]:HAS[!MODULE[ModuleKISInventory]]:FINAL
{
	MODULE
	{
		name = ModuleKISInventory
		xxx = xxxx
		xxxx = xxx
	}
}

It would mean that your patch would get overruled by a patch that was included by a mod at a later date, only applying your patch if the part didn't get the module applied during the normal MM pass.

Edited by Poodmund
Link to comment
Share on other sites

  • 4 weeks later...

Hi there! I found an issue today. 

In some Kopernicus configs, some array elements are separated by space or tab, e.g.:

key = 0 292 0.00000E+00 -6.04157E-03


However, if I need to edit the values with module manager, e.g:

@key,*[0, ] *= 1.61

It can only identify the elements separate with space, but not with tab. An error will be reported and here is what the log looks like:

Error - Failed to do a maths replacement: @temperatureCurve : original value="0	292	0.00000E+00	-6.04157E-03" operator=Multiply mod value="1.61"

It can be a problem since both space and tab works in KSP.
Is it possible to fix the issue?

Link to comment
Share on other sites

Question #01

Does the dash/hyphen count as an alphanumeric character with respect to module manager * filters? Asking because the documentation states that

Quote

" * for any number of alphanumeric chars.."

 

and technically the dash/hyphen isnt an "alphanumeric"


Example: I want to create a patch that edits a resource module on every NearFuture spacecraft command pod. The command pos part names are:

command-25-1
command-25-1_shiny
command-25-landing-1
command-125-1
command-125-1_shiny
command-125-landing-1
command-125-orbit-1
command-375-biconic-1

 

Would the following patch work to cover all these parts?

Quote

@PART[command*]:FOR[NearFutureSpacecraft]

or another example, in case other mods have parts that start with command...:

Quote

@PART[command-25*,command-125*,command-375*]:FOR[NearFutureSpacecraft]

In short, can I put "command*] and would that be recognized by module manager and apply to all parts that begin with ? 

 

 

Question #02

 

With another NF spacecraft command pod as my example, since thats what I'm wanting to make it for, I would like to first, add a crazy amount of electric charge resource to a pod, and secondly I would like to remove the monopropellant from the command pods and replace it with small amount if liquid fuel and oxidizer instead. 

Which way is the correct way to go about this, and if neither of these are correct, how do i go about removing one resource and replacing it with 2 resources?

(The main differences between Option A and Option B are in bold Red text)

Option A

Quote

@PART[command-25*]:FOR[NearFutureSpacecraft]
{
    @RESOURCE[ElectricCharge]
    {
        @amount = 800
        @maxAmount = 800
    }
    @RESOURCE[MonoPropellant]
    {
        @name = LiquidFuel
        @amount = 450
        @maxAmount = 450
    }
    %RESOURCE
    {
        %name = Oxidizer
        %amount = 550
        %maxAmount = 550
    }

}    

or

Option B

Quote

 

@PART[command-25*]:FOR[NearFutureSpacecraft]
{

    @RESOURCE[ElectricCharge]
    {
        @amount = 800
        @maxAmount = 800
    }
    @RESOURCE[MonoPropellant]
    {
        @name = LiquidFuel
        @amount = 450
        @maxAmount = 450
    }
    %RESOURCE[Oxidizer]
    {
        %amount = 550
        %maxAmount = 550
    }

}    

 

 

 

 

Edited by Astra Infinitum
Link to comment
Share on other sites

22 hours ago, Astra Infinitum said:

Question #01

Does the dash/hyphen count as an alphanumeric character with respect to module manager * filters? Asking because the documentation states that

<….>

and technically the dash/hyphen isnt an "alphanumeric"

Yes, on this context, dashes but also dots and spaces are considered "alphanumeric" for the filters. With Unity aggravating  the situation by replacing a lot of non alphanumeric characters (as braces) into a dot - so what you type is not what you get.

Since we are here, spaces are also allowed on Unity's names, but MM doesn't handle that. If you have something named using a space, in order to patch it you will need to use a '?' in the place of the space and then pray to have nothing else similarly named with something else in the place of the space. :)

 

22 hours ago, Astra Infinitum said:

Question #01

Example: I want to create a patch that edits a resource module on every NearFuture spacecraft command pod. The command pos part names are:

command-25-1
command-25-1_shiny
command-25-landing-1
command-125-1
command-125-1_shiny
command-125-landing-1
command-125-orbit-1
command-375-biconic-1

 

Would the following patch work to cover all these parts?

@PART[command*]:FOR[NearFutureSpacecraft]

or another example, in case other mods have parts that start with command...:

@PART[command-25*,command-125*,command-375*]:FOR[NearFutureSpacecraft]

In short, can I put "command*] and would that be recognized by module manager and apply to all parts that begin with ? 

Both will work, but both are dangerous because they will patch everything starting with the given string, not only the NFS parts. You see, "command" is a pretty common name to be used on parts, it's not NFS's prerogative to use them.

Some add'ons are making our lifes easier by adding a prefix to their part names, as "nfs-<something>". This make things easier are by prefixing the parts you don't risk patching 3rd parties by accident.

On my patches, I choose to address the parts by name without filters. You will not see any of my patching causing trouble to anyone else - unfortunately, the reciprocate is not true.

If you really think that using wildcards is the way to go, consider using :HAS[] checking for something that only the parts your target addon uses, as the name of the author (but even this got me headaches once, as one author allowed a part to be used on another add'on, and then I got double patching the same on a user's rig).

 

22 hours ago, Astra Infinitum said:

Question #02

Which way is the correct way to go about this, and if neither of these are correct, how do i go about removing one resource and replacing it with 2 resources?

(The main differences between Option A and Option B are in bold Red text)

Option A

 %RESOURCE
    {
        %name = Oxidizer
        %amount = 550
        %maxAmount = 550
    }

or

Option B

 %RESOURCE[Oxidizer]
    {
        %amount = 550
        %maxAmount = 550
    }

 

Option A will add or edit a node called RESOURCE (any one), rename it to `Oxidixer` no matter what  it was its name before, and then add or edit the `amount` and `maxAmount` values. This is rarely what you want.

Option B will add or edit a node called RESOURCE with name `Oxidizer` - i.e., if theres no RESOURCE node with a `Oxidizer` in the `name` value, one is created. If it exists, the first one is edited with the new values.

Since we are here, there's also a Option C:

 %RESOURCE[Oxidizer]
    {
        %name = something-else
    }

This will create a new node called `something-else`, or will edit the first `Oxidizer` node it finds to be named `something-else`. This is what you appears to want (as long the remaining values are the same)

However, I would do things differently:

-RESOURCE[Oxidizer] { }, *
&RESOURCE[Resource1]
{
	yada yada yada
}
&RESOURCE[Resource2]
{
	yada yada yada
}

The first patch will remove all nodes named `Oxidizer`, and the following two will add new RESOURCE nodes with the respective name and content. These patches will silently "fail" if the resources `Resource1` and `Resource2` already exists. If you want to be sure to have your definitions overwritting the existent ones, I suggest to use:

-RESOURCE[Oxidizer,Resource1,Resource2] { }, *

This will guarantee that what you end up having is really what you wanted - some other patch may had added things you don't expect (as flow constraints) on the RESOURCE, and this creates very harsh to debug problems later.

Edited by Lisias
Hit "Save" too soon.
Link to comment
Share on other sites

  • 2 weeks later...

Ok, got an issue with a computer that too fast.

Getting the following error while starting up:

Spoiler
23052 [EXC 08:45:04.378] Exception while generating SHA for assembly ModuleManager: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\ModuleManager.4.2.2.dll
23059 [EXC 08:45:04.380] Exception while generating SHA for assembly 000_AT_Utils: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\000_AT_Utils.dll
23066 [EXC 08:45:04.381] Exception while generating SHA for assembly 001_AnisotropicPartResizer: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\001_AnisotropicPartResizer.dll
23073 [EXC 08:45:04.382] Exception while generating SHA for assembly 002_MultiAnimators: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\002_MultiAnimators.dll
23080 [EXC 08:45:04.383] Exception while generating SHA for assembly 0_00_AT_Utils_UI: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\0_00_AT_Utils_UI.dll
23087 [EXC 08:45:04.385] Exception while generating SHA for assembly CC.UI: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\CC.UI.dll
23094 [EXC 08:45:04.387] Exception while generating SHA for assembly ConfigurableContainers: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\ConfigurableContainers.dll
23101 [EXC 08:45:04.388] Exception while generating SHA for assembly SubmodelResizer: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\SubmodelResizer.dll
23108 [EXC 08:45:04.389] Exception while generating SHA for assembly ClickThroughBlocker: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_ClickThroughBlocker\Plugins\ClickThroughBlocker.dll
23115 [EXC 08:45:04.390] Exception while generating SHA for assembly FilterExtensions: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_FilterExtensions\Plugins\FilterExtensions.dll
23122 [EXC 08:45:04.392] Exception while generating SHA for assembly 0Harmony: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_Harmony\0Harmony.dll
23129 [EXC 08:45:04.393] Exception while generating SHA for assembly HarmonyInstallChecker: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_Harmony\HarmonyInstallChecker.dll
23136 [EXC 08:45:04.394] Exception while generating SHA for assembly ToolbarControl: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\001_ToolbarControl\Plugins\ToolbarControl.dll
23143 [EXC 08:45:04.397] Exception while generating SHA for assembly B9PartSwitch: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\B9PartSwitch\Plugins\B9PartSwitch.dll
23150 [EXC 08:45:04.399] Exception while generating SHA for assembly B9-PWings-Fork: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\B9_Aerospace_ProceduralWings\Plugins\B9-PWings-Fork.dll
23157 [EXC 08:45:04.402] Exception while generating SHA for assembly DTV2: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\DraftTwitchViewers\Plugins\DTV2.dll
23164 [EXC 08:45:04.407] Exception while generating SHA for assembly Newtonsoft.Json: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\DraftTwitchViewers\Plugins\Newtonsoft.Json.dll
23171 [EXC 08:45:04.410] Exception while generating SHA for assembly System.Xml.Linq: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\DraftTwitchViewers\Plugins\System.Xml.Linq.dll
23178 [EXC 08:45:04.413] Exception while generating SHA for assembly EditorExtensionsRedux: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\EditorExtensionsRedux\Plugins\EditorExtensionsRedux.dll
23185 [EXC 08:45:04.414] Exception while generating SHA for assembly Firespitter: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\Firespitter\Plugins\Firespitter.dll
23192 [EXC 08:45:04.415] Exception while generating SHA for assembly GravityTurnContinued: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\GravityTurn\Plugins\GravityTurnContinued.dll
23199 [EXC 08:45:04.417] Exception while generating SHA for assembly JanitorsCloset: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\JanitorsCloset\Plugins\JanitorsCloset.dll
23206 [EXC 08:45:04.419] Exception while generating SHA for assembly KerbalJointReinforcementNext: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\KerbalJointReinforcement\Plugins\KerbalJointReinforcementNext.dll
23213 [EXC 08:45:04.421] Exception while generating SHA for assembly 0_MultipleModuleInPartAPI: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\KSPCommunityFixes\Plugins\0_MultipleModuleInPartAPI.dll
23220 [EXC 08:45:04.422] Exception while generating SHA for assembly KSPCommunityFixes: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\KSPCommunityFixes\Plugins\KSPCommunityFixes.dll
23227 [EXC 08:45:04.423] Exception while generating SHA for assembly KSPWheel: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\KSPWheel\Plugin\KSPWheel.dll
23234 [EXC 08:45:04.425] Exception while generating SHA for assembly NASA-CountDown: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\NASA_CountDown\Plugins\NASA-CountDown.dll
23241 [EXC 08:45:04.426] Exception while generating SHA for assembly PartInfo: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\PartInfo\Plugins\PartInfo.dll
23248 [EXC 08:45:04.427] Exception while generating SHA for assembly PartInfoInPAW: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\PartInfoInPAW\Plugins\PartInfoInPAW.dll
23255 [EXC 08:45:04.429] Exception while generating SHA for assembly QuickHide: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\QuickMods\QuickHide\Plugins\QuickHide.dll
23262 [EXC 08:45:04.431] Exception while generating SHA for assembly QuickSearch: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\QuickMods\QuickSearch\Plugins\QuickSearch.dll
23269 [EXC 08:45:04.432] Exception while generating SHA for assembly QuickStart: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\QuickMods\QuickStart\Plugins\QuickStart.dll
23276 [EXC 08:45:04.434] Exception while generating SHA for assembly KSP_Log: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\KSP_Log.dll
23283 [EXC 08:45:04.435] Exception while generating SHA for assembly ButtonManager: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\ButtonManager.dll
23290 [EXC 08:45:04.436] Exception while generating SHA for assembly KSP_ColorPicker: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\KSP_ColorPicker.dll
23297 [EXC 08:45:04.438] Exception while generating SHA for assembly KSP_PartHighlighter: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\KSP_PartHighlighter.dll
23304 [EXC 08:45:04.439] Exception while generating SHA for assembly SpaceTuxUtility: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\SpaceTuxUtility.dll
23311 [EXC 08:45:04.440] Exception while generating SHA for assembly VesselModuleSave: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\VesselModuleSave.dll
23318 [EXC 08:45:04.441] Exception while generating SHA for assembly TacFuelBalancer: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\TacFuelBalancer\Plugins\TacFuelBalancer.dll
23325 [EXC 08:45:04.442] Exception while generating SHA for assembly TCA.UI: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\ThrottleControlledAvionics\Plugins\TCA.UI.dll
23332 [EXC 08:45:04.443] Exception while generating SHA for assembly ThrottleControlledAvionics: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\ThrottleControlledAvionics\Plugins\ThrottleControlledAvionics.dll
23339 [EXC 08:45:04.444] Exception while generating SHA for assembly WasdEditorCameraContinued: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\WasdEditorCamera\Plugins\WasdEditorCameraContinued.dll
23346 [EXC 08:45:04.445] Exception while generating SHA for assembly ZeroMiniAVC: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\ZeroMiniAVC\Plugins\ZeroMiniAVC.dll

 

Game runs ok, it's just that because of these exceptions, it doesn't generate the ModuleManager.configcache file

This is a complete game directory which was copied over from my old computer, where it works without any issue

I'm not sure how to resolve this, anybody have any ideas?

Link to complete log:   https://www.dropbox.com/s/9ds5vzdt6w1eos4/ModuleManagerTooFastBoot.zip?dl=0

Edited by linuxgurugamer
Link to comment
Share on other sites

On 5/10/2023 at 9:01 AM, linuxgurugamer said:

Ok, got an issue with a computer that too fast.

Getting the following error while starting up:

  Reveal hidden contents
23052 [EXC 08:45:04.378] Exception while generating SHA for assembly ModuleManager: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\ModuleManager.4.2.2.dll
23059 [EXC 08:45:04.380] Exception while generating SHA for assembly 000_AT_Utils: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\000_AT_Utils.dll
23066 [EXC 08:45:04.381] Exception while generating SHA for assembly 001_AnisotropicPartResizer: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\001_AnisotropicPartResizer.dll
23073 [EXC 08:45:04.382] Exception while generating SHA for assembly 002_MultiAnimators: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\002_MultiAnimators.dll
23080 [EXC 08:45:04.383] Exception while generating SHA for assembly 0_00_AT_Utils_UI: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\0_00_AT_Utils_UI.dll
23087 [EXC 08:45:04.385] Exception while generating SHA for assembly CC.UI: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\CC.UI.dll
23094 [EXC 08:45:04.387] Exception while generating SHA for assembly ConfigurableContainers: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\ConfigurableContainers.dll
23101 [EXC 08:45:04.388] Exception while generating SHA for assembly SubmodelResizer: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_AT_Utils\Plugins\SubmodelResizer.dll
23108 [EXC 08:45:04.389] Exception while generating SHA for assembly ClickThroughBlocker: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_ClickThroughBlocker\Plugins\ClickThroughBlocker.dll
23115 [EXC 08:45:04.390] Exception while generating SHA for assembly FilterExtensions: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_FilterExtensions\Plugins\FilterExtensions.dll
23122 [EXC 08:45:04.392] Exception while generating SHA for assembly 0Harmony: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_Harmony\0Harmony.dll
23129 [EXC 08:45:04.393] Exception while generating SHA for assembly HarmonyInstallChecker: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\000_Harmony\HarmonyInstallChecker.dll
23136 [EXC 08:45:04.394] Exception while generating SHA for assembly ToolbarControl: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\001_ToolbarControl\Plugins\ToolbarControl.dll
23143 [EXC 08:45:04.397] Exception while generating SHA for assembly B9PartSwitch: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\B9PartSwitch\Plugins\B9PartSwitch.dll
23150 [EXC 08:45:04.399] Exception while generating SHA for assembly B9-PWings-Fork: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\B9_Aerospace_ProceduralWings\Plugins\B9-PWings-Fork.dll
23157 [EXC 08:45:04.402] Exception while generating SHA for assembly DTV2: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\DraftTwitchViewers\Plugins\DTV2.dll
23164 [EXC 08:45:04.407] Exception while generating SHA for assembly Newtonsoft.Json: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\DraftTwitchViewers\Plugins\Newtonsoft.Json.dll
23171 [EXC 08:45:04.410] Exception while generating SHA for assembly System.Xml.Linq: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\DraftTwitchViewers\Plugins\System.Xml.Linq.dll
23178 [EXC 08:45:04.413] Exception while generating SHA for assembly EditorExtensionsRedux: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\EditorExtensionsRedux\Plugins\EditorExtensionsRedux.dll
23185 [EXC 08:45:04.414] Exception while generating SHA for assembly Firespitter: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\Firespitter\Plugins\Firespitter.dll
23192 [EXC 08:45:04.415] Exception while generating SHA for assembly GravityTurnContinued: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\GravityTurn\Plugins\GravityTurnContinued.dll
23199 [EXC 08:45:04.417] Exception while generating SHA for assembly JanitorsCloset: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\JanitorsCloset\Plugins\JanitorsCloset.dll
23206 [EXC 08:45:04.419] Exception while generating SHA for assembly KerbalJointReinforcementNext: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\KerbalJointReinforcement\Plugins\KerbalJointReinforcementNext.dll
23213 [EXC 08:45:04.421] Exception while generating SHA for assembly 0_MultipleModuleInPartAPI: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\KSPCommunityFixes\Plugins\0_MultipleModuleInPartAPI.dll
23220 [EXC 08:45:04.422] Exception while generating SHA for assembly KSPCommunityFixes: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\KSPCommunityFixes\Plugins\KSPCommunityFixes.dll
23227 [EXC 08:45:04.423] Exception while generating SHA for assembly KSPWheel: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\KSPWheel\Plugin\KSPWheel.dll
23234 [EXC 08:45:04.425] Exception while generating SHA for assembly NASA-CountDown: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\NASA_CountDown\Plugins\NASA-CountDown.dll
23241 [EXC 08:45:04.426] Exception while generating SHA for assembly PartInfo: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\PartInfo\Plugins\PartInfo.dll
23248 [EXC 08:45:04.427] Exception while generating SHA for assembly PartInfoInPAW: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\PartInfoInPAW\Plugins\PartInfoInPAW.dll
23255 [EXC 08:45:04.429] Exception while generating SHA for assembly QuickHide: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\QuickMods\QuickHide\Plugins\QuickHide.dll
23262 [EXC 08:45:04.431] Exception while generating SHA for assembly QuickSearch: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\QuickMods\QuickSearch\Plugins\QuickSearch.dll
23269 [EXC 08:45:04.432] Exception while generating SHA for assembly QuickStart: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\QuickMods\QuickStart\Plugins\QuickStart.dll
23276 [EXC 08:45:04.434] Exception while generating SHA for assembly KSP_Log: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\KSP_Log.dll
23283 [EXC 08:45:04.435] Exception while generating SHA for assembly ButtonManager: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\ButtonManager.dll
23290 [EXC 08:45:04.436] Exception while generating SHA for assembly KSP_ColorPicker: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\KSP_ColorPicker.dll
23297 [EXC 08:45:04.438] Exception while generating SHA for assembly KSP_PartHighlighter: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\KSP_PartHighlighter.dll
23304 [EXC 08:45:04.439] Exception while generating SHA for assembly SpaceTuxUtility: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\SpaceTuxUtility.dll
23311 [EXC 08:45:04.440] Exception while generating SHA for assembly VesselModuleSave: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\SpaceTuxLibrary\Plugins\VesselModuleSave.dll
23318 [EXC 08:45:04.441] Exception while generating SHA for assembly TacFuelBalancer: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\TacFuelBalancer\Plugins\TacFuelBalancer.dll
23325 [EXC 08:45:04.442] Exception while generating SHA for assembly TCA.UI: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\ThrottleControlledAvionics\Plugins\TCA.UI.dll
23332 [EXC 08:45:04.443] Exception while generating SHA for assembly ThrottleControlledAvionics: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\ThrottleControlledAvionics\Plugins\ThrottleControlledAvionics.dll
23339 [EXC 08:45:04.444] Exception while generating SHA for assembly WasdEditorCameraContinued: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\WasdEditorCamera\Plugins\WasdEditorCameraContinued.dll
23346 [EXC 08:45:04.445] Exception while generating SHA for assembly ZeroMiniAVC: System.IO.IOException: Sharing violation on path R:\KSP_1.12.5-dev\GameData\ZeroMiniAVC\Plugins\ZeroMiniAVC.dll

 

Game runs ok, it's just that because of these exceptions, it doesn't generate the ModuleManager.configcache file

This is a complete game directory which was copied over from my old computer, where it works without any issue

I'm not sure how to resolve this, anybody have any ideas?

Link to complete log:   https://www.dropbox.com/s/9ds5vzdt6w1eos4/ModuleManagerTooFastBoot.zip?dl=0

I solved the problem, will be doing a PR in a bit.

It's a simple fix, just adding a parameter to the File.Open "FileShare.ReadWrite" in FileUtils.cs

Link to comment
Share on other sites

Is there a way to search for a specific module when a part has multiple of that part? For instance if there are two modules called configure. I can easily grab the first one or the second one, but I would like to make sire I grab the correct one. Can I use something like HAS[title[start xyz]] ? 

Link to comment
Share on other sites

17 minutes ago, Nori said:

Is there a way to search for a specific module when a part has multiple of that part? For instance if there are two modules called configure. I can easily grab the first one or the second one, but I would like to make sire I grab the correct one. Can I use something like HAS[title[start xyz]] ? 

Yes, you can. It would look something like this:

@MODULE[configure]:HAS[#title[xyz*]]

Link to comment
Share on other sites

14 hours ago, linuxgurugamer said:

I solved the problem, will be doing a PR in a bit.

It's a simple fix, just adding a parameter to the File.Open "FileShare.ReadWrite" in FileUtils.cs

The real issue if that Module Manager is being instantiated twice (or even more). If only one copy of ModuleManager would be in execution, the situation in which it would try to compute the SHA for a given file in different threads would just not happen.

Having multiple Module Managers running at the same time on the rig is terrible, with some patches ending up being corrupted (by some reason, the Localization ones are specially prone to the problem).

I had said before, and I will say it again: there must be only ONE Module Manager running in memory, and without solving this problem, people will still be screwed by bad patching happening randomly across the system.

Once you secure only one ModuleManager running at a given time, you don't need to scramble patching every single place where code that was meant to run solo subtly is facing concurrency with itself.

 

Edited by Lisias
some entertaining grammars made less entertaining.
Link to comment
Share on other sites

8 hours ago, Lisias said:

The real issue if that Module Manager is being instantiated twice (or even more). If only one copy of ModuleManager would be in execution, the situation in which it would try to compute the SHA for a given file in different threads would just not happen.

Having multiple Module Managers running at the same time on the rig is terrible, with some patches ending up being corrupted (by some reason, the Localization ones are specially prone to the problem).

I had said before, and I will say it again: there must be one ONE Module Manager running in memory, and without solving this problem, people will still be screwed by bad patching happening randomly across the system.

Once you secure only one ModuleManager running at a given time, you don't need to scramble patching every single place where code that was meant to run solo subtly is facing concurrency with itself.

 

Please don't assume I'm an idiot.

8 hours ago, Lisias said:

The real issue if that Module Manager is being instantiated twice (or even more). If only one copy of ModuleManager would be in execution, the situation in which it would try to compute the SHA for a given file in different threads would just not happen.

There is only one copy of MM in the install.  While I can't be positive, I suspect it may be the game itself which is keeping the file open;  I tested this extensively, and copied an entire install from one computer where this doesn't happen onto a new computer (much faster) where it does happen.

Edited by linuxgurugamer
Link to comment
Share on other sites

13 hours ago, linuxgurugamer said:

There is only one copy of MM in the install.  While I can't be positive, I suspect it may be the game itself which is keeping the file open;  I tested this extensively, and copied an entire install from one computer where this doesn't happen onto a new computer (much faster) where it does happen.

With all due respect, sir, opening any kind of executable code with a Write option enabled is for anti-virus what honey is for honeybadgers - and I assumed that someone that worked on I.T. infrastructure would be aware of that.

Additionally, by the time Unity starts to call the Awake method on the Monobehaviours, everything was already loaded into memory. KSP (at least the latest ones) first loads all the available DLLs, then it links them in memory (this is where missing dependencies are detected), and only then KSP starts to call code inside it. By the time ModuleManager opens a DLL for reading its contents, everything should be set for some time already and it's pretty awkward that KSP would keep these files opened after resolving all the dependencies.

Granted, not impossible (but that would be another flaw on KSP, I think).

Did you monitored the opened files in the system in order to determine who had these files opened at the time of the occurrence? Did you tried to make all the DLLs read/only on the file system to see if the problem goes away (or if a new one is created)?

In a way or another, instead of opening everything using a Write enabled share option (potentially attracting undesired attention from antivirus monitors), would not be better and safer putting the whole SHA thing inside a try catch, inside a loop, and doing a small busy wait if the problem happens and trying again?

Edited by Lisias
tyop! Surprised?
Link to comment
Share on other sites

Among other things, what I did to test this was:

  • Review log file to verify only one copy of MM
  • Add a sleep delay when trying to open the file, just in case it would be closed.

My conclusions are this:

  1. Only one copy of MM is installed
  2. Something else (KSP and/or Unity) is keeping the file open, even after reading it into memory

The file is still being opened in a read-only manner.  The new option simply specified what ways other processes can open the file.  Now, it's quite possible that instead of the FileShare.ReadWrite it should be FileShare.Read, but in any event, MM is not writing to the file, and if MM wasn't there, whatever else is opening the file would still be able to do what it can.  So this would be a minor criticism, at most.

I do have other things I'm working on, so I did enough to prove that:

  1. This allows MM to proceed without getting the file exceptions
  2. While KSP may have loaded all the DLLs into memory, that doesn't mean that KSP/Unity has closed the files.  This allows MM to read the files even while KSP/Unity is keeping the files open
  3. MM is now able to write the ModuleManager.ConfigCache file.  This is necessary for debugging MM scripts, and somewhat useful in reducing the load time of the game
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...