Jump to content

Can't find a duplicate of 999_Scale_Redist.dll


Recommended Posts

I updated a few mods this morning. Normally I use CKAN, but in this case, CKAN is not showing any updates, while the game says there are updates, so I downloaded them manually. The mods updated were TweakScale, ReStock, ReStockPlus, and configurable containers. When I started the game, I get a fatal error saying that 999_Scale_Redist.dll has a duplicate entry. I went into the game directory and did a windows search, and it only finds a single copy, directly in the GameData folder, which, according to the install docs, is the only place it should be.  If Windows isn't finding the dupe, does anyone have any clue what else could be causing the problem?  I tried uninstalling TweakScale, and loading the game, and even though the GameData/999_Scal_Redist.dll is gone, I still get the fatal error message.

 

Link to comment
Share on other sites

3 hours ago, Michel Bartolone said:

I updated a few mods this morning. Normally I use CKAN, but in this case, CKAN is not showing any updates, while the game says there are updates, so I downloaded them manually. The mods updated were TweakScale, ReStock, ReStockPlus, and configurable containers. When I started the game, I get a fatal error saying that 999_Scale_Redist.dll has a duplicate entry. I went into the game directory and did a windows search, and it only finds a single copy, directly in the GameData folder, which, according to the install docs, is the only place it should be.  If Windows isn't finding the dupe, does anyone have any clue what else could be causing the problem?  I tried uninstalling TweakScale, and loading the game, and even though the GameData/999_Scal_Redist.dll is gone, I still get the fatal error message.

Publish the KSP.log and we will be able to locate the culprit.

Lately, I had a lot of reports about an previous release of FAR - but, really, only the KSP.log will tell us for use.

If I'm right about bring FAR, remove this file:

<KSP-Root>/GameData/FerramAerospaceResearch/Plugins/Scale_Redist.dll

Link to comment
Share on other sites

18 hours ago, Lisias said:

Publish the KSP.log and we will be able to locate the culprit.

Lately, I had a lot of reports about an previous release of FAR - but, really, only the KSP.log will tell us for use.

If I'm right about bring FAR, remove this file:

<KSP-Root>/GameData/FerramAerospaceResearch/Plugins/Scale_Redist.dll

Thanks for pointing me to the log. I should have known enough to at least look there, but of course the line you show right here...in FAR, is correct. Not your fault at all but I really wish the game would just say where it found the dup, in the message that comes up...it has the info, just spit it out!

Link to comment
Share on other sites

13 hours ago, Michel Bartolone said:

Thanks for pointing me to the log. I should have known enough to at least look there, but of course the line you show right here...in FAR, is correct. Not your fault at all but I really wish the game would just say where it found the dup, in the message that comes up...it has the info, just spit it out!

These pesky error messages are a pain in the SAS, I agree (I hate them too). But the consequences from not having them are worse.

By some reason beyound me (I'm a UNIX guy, and I have a background on Windows 3.11 and Windows 95 when DLL hell was plaguing us as the plague), Add'On Authors around here had settled with a deployment model that tends to screw up things the very same way it had one on the Windows 3.11 era: allowing multiple copies of DLLs to linger around on the GameData.

Before KSP 1.8.0 this was not a fatal problem, but was a problem nevertheless - every time you load a DLL with an Assembly already loaded, it is loaded into a new AppDomain, and from this point, all calls to it (being from Unity, being from/to other's Assemblies) are marshalled. And this makes everything slower.

(Marshalling are a way to package data to allow Remote Procedure Calls to interchange parameters and results)

Oukey, you get a slower rig but nothing really bad happens. Until KSP 1.8.0.

On KSP 1.8.0 and newer, Squad tried to tackle down the performance problem by short circuiting any duplicated Assemblies to the first one that was loaded. You still get <n> Assemblies loaded on the Assembly Resolver "directory", but all of them pinpoints to the first one that was loaded. So, no AppDomains crossovers and no performance penalty. However...

(sigh)

They created two problems while doing this:

  1. They coded something poorly, and if you try to load two DLLs with the same filename, something screws up inside the Assembly Resolver and from now on, everything in need to Load a DLL or to use the Reflection start to get screwed - the thing acts as the DLL could not be loaded, and all the Assemblies failed on the process, so your code is rendered dead in the water.
  2. Due the nature of how KSP load things and the current DLL naming practices, when you have many DLLs providing different versions of the same Assembly, the oldest one is elected to be used!!!

The problem 2 is particularly nasty because Module Manager does that, and everything and the kitchen's sink needs Module Manager. And almost everybody distributes it embedded on the zip package - what means that almost everybody ends up with multiple Module Managers on the GameData - and using the oldest one, losing all the bug fixes the newest ones provides!

So, in face all this problems I described above, I decided to go FATAL every time the Watch Dog finds duplicate Assemblies. In essence, there can be only one, in GameData/999_Scale_Redist.dll file, and everything else should be removed.

Of course, ModuleManagerWatchDog can be removed from your system, and by then you will not be annoyed anymore by these things. But by doing that, a lot of invisible problems will start to erode your gaming sooner or later, and you will eventually get screwed.

My workload on TweakScale dropped a ton since I published the WatchDog. And this tells a lot about the problems I described above. ;) 

Cheers!

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

2 hours ago, linuxgurugamer said:

Of course, using CKAN will eliminate most if not all of those unnecessary ModuleManager DLLs, as well as many other duplicate DLLs.

Not every time. Most people with this problem had installed FAR using CKAN.

And since not every add'on is available on CKAN, there's not too much that CKAN can do about.

Link to comment
Share on other sites

18 hours ago, linuxgurugamer said:

Of course, using CKAN will eliminate most if not all of those unnecessary ModuleManager DLLs, as well as many other duplicate DLLs.

In this case, CKAN was not showing the mods as having available  updates, but the game was, so I was doing a manual install...

 

18 hours ago, Lisias said:

These pesky error messages are a pain in the SAS, I agree (I hate them too). But the consequences from not having them are worse.

 

 

I wasn't advocating to eliminate the error messages, I was asking for the message to identify the path to the duplicates found, so I don't have to search for them...even in the logs...just spit them out to the screen so I can see where to look!

Link to comment
Share on other sites

15 hours ago, Lisias said:

Not every time. Most people with this problem had installed FAR using CKAN.

And since not every add'on is available on CKAN, there's not too much that CKAN can do about.

There must have been other mods, because I've installed FAR with CKAN without any problems.

And yes, the issue with regard to other mods which are not in CKAN is real, and my thanks to you for the work you've done.

The right way to install for a mod to install DLLs from another mod is to put the DLL in the same location that the other mod would put it, this helps avoid  duplicate DLLs.  On my part, I don't include foreign DLLs in any of my mods anymore to avoid this problem.

 

1 hour ago, Michel Bartolone said:

In this case, CKAN was not showing the mods as having available  updates, but the game was, so I was doing a manual install...

Curious as to which updates

1 hour ago, Michel Bartolone said:

I wasn't advocating to eliminate the error messages, I was asking for the message to identify the path to the duplicates found, so I don't have to search for them...even in the logs...just spit them out to the screen so I can see where to look!

ZeroMiniAVC does look for duplicates and shows a window with a list of the paths for all of them, as well as a suggested one (not always correct) to keep

Link to comment
Share on other sites

9 hours ago, Michel Bartolone said:

I wasn't advocating to eliminate the error messages, I was asking for the message to identify the path to the duplicates found, so I don't have to search for them...even in the logs...just spit them out to the screen so I can see where to look!

Point taken. I should had explained better. I was trying to tell that, besides being tempting sometimes, removing the tool is far from being a safe measure on the long run.

 

7 hours ago, linuxgurugamer said:

There must have been other mods, because I've installed FAR with CKAN without any problems.

That's the thing: the tool tries to avoid peskying users (too much) by barking only when there's risk of the problem being triggered.

If you install FAR and something else with a rogue ScaleRedist but doesn't install TweakScale, the duplicates thingies are not a problem for you, so the tool doesn't bothers you about.

 

Edited by Lisias
Grammars... (Sigh)
Link to comment
Share on other sites

On 4/4/2022 at 7:06 AM, linuxgurugamer said:

There must have been other mods, because I've installed FAR with CKAN without any problems.

And yes, the issue with regard to other mods which are not in CKAN is real, and my thanks to you for the work you've done.

The right way to install for a mod to install DLLs from another mod is to put the DLL in the same location that the other mod would put it, this helps avoid  duplicate DLLs.  On my part, I don't include foreign DLLs in any of my mods anymore to avoid this problem.

 

Curious as to which updates

ZeroMiniAVC does look for duplicates and shows a window with a list of the paths for all of them, as well as a suggested one (not always correct) to keep

In this case, it was failing to even get far enough for ZeroMiniAVC to load.

Link to comment
Share on other sites

  • 2 years later...
17 hours ago, Avoa said:

I accidentally deleted my 999 redist file. help.

Install TweakScale again!!

How did you installed it?

Edited by Lisias
late quoting
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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...