Jump to content

Bug: AssemblyLoader does not alphabetically sort plugins when loading on filesystems with non-alphabetical directory listings such as BTRFS


Recommended Posts

I've been using WinBTRFS with my modded KSP install and have recently noticed that directory listings with WinBTRFS are non-alphabetical. This has caused some issues with ModularManager due to how AssemblyLoader (the core KSP component) works. I don't wish to use NTFS on my external drive, as it needs to be accessible via Linux. I have, however, noticed this issue on Linux as well.

For example, see the following from a log on startup on my `D:\` drive (WinBTRFS)

[LOG 15:25:04.488] Load(Assembly): /ModuleManager.4.2.3
[LOG 15:25:04.488] AssemblyLoader: Loading assembly at D:\Kerbal Space Program\GameData\ModuleManager.4.2.3.dll
[LOG 15:25:04.510] AssemblyLoader: KSPAssembly 'ModuleManager' V2.5.0
[LOG 15:25:04.510] Load(Assembly): /999_Scale_Redist
[LOG 15:25:04.510] AssemblyLoader: Loading assembly at D:\Kerbal Space Program\GameData\999_Scale_Redist.dll
[LOG 15:25:04.513] Load(Assembly): Squad/Plugins/KSPSteamCtrlr
[LOG 15:25:04.513] AssemblyLoader: Loading assembly at D:\Kerbal Space Program\GameData\Squad\Plugins\KSPSteamCtrlr.dll
[LOG 15:25:04.515] Load(Assembly): 000_Harmony/0Harmony
[LOG 15:25:04.515] AssemblyLoader: Loading assembly at D:\Kerbal Space Program\GameData\000_Harmony\0Harmony.dll
[LOG 15:25:04.527] Load(Assembly): 000_Harmony/HarmonyInstallChecker
[LOG 15:25:04.527] AssemblyLoader: Loading assembly at D:\Kerbal Space Program\GameData\000_Harmony\HarmonyInstallChecker.dll
[LOG 15:25:04.529] AssemblyLoader: KSPAssembly 'HarmonyKSP' V1.0.0

I believe that this out-of-order loading, which is not shown in this log from startup of the same install, copied to my `C:\` drive (NTFS, which has near-alphabetical sorting of directory listings):

[LOG 16:49:00.506] Load(Assembly): /999_Scale_Redist
[LOG 16:49:00.507] AssemblyLoader: Loading assembly at C:\Users\wren\Desktop\Kerbal Space Program\GameData\999_Scale_Redist.dll
[LOG 16:49:00.525] Load(Assembly): /ModuleManager.4.2.3
[LOG 16:49:00.525] AssemblyLoader: Loading assembly at C:\Users\wren\Desktop\Kerbal Space Program\GameData\ModuleManager.4.2.3.dll
[LOG 16:49:00.527] AssemblyLoader: KSPAssembly 'ModuleManager' V2.5.0
[LOG 16:49:00.527] Load(Assembly): 000_AT_Utils/Plugins/000_AT_Utils
[LOG 16:49:00.527] AssemblyLoader: Loading assembly at C:\Users\wren\Desktop\Kerbal Space Program\GameData\000_AT_Utils\Plugins\000_AT_Utils.dll
[LOG 16:49:00.528] AssemblyLoader: KSPAssembly 'AT_Utils' V1.10.0
[LOG 16:49:00.528] Load(Assembly): 000_AT_Utils/Plugins/001_AnisotropicPartResizer
[LOG 16:49:00.528] AssemblyLoader: Loading assembly at C:\Users\wren\Desktop\Kerbal Space Program\GameData\000_AT_Utils\Plugins\001_AnisotropicPartResizer.dll
[LOG 16:49:00.529] AssemblyLoader: KSPAssembly 'AnisotropicPartResizer' V1.5.0
[LOG 16:49:00.529] Load(Assembly): 000_AT_Utils/Plugins/002_MultiAnimators
[LOG 16:49:00.529] AssemblyLoader: Loading assembly at C:\Users\wren\Desktop\Kerbal Space Program\GameData\000_AT_Utils\Plugins\002_MultiAnimators.dll
[LOG 16:49:00.530] AssemblyLoader: KSPAssembly 'MultiAnimators' V1.2.0
[LOG 16:49:00.530] Load(Assembly): 000_AT_Utils/Plugins/0_00_AT_Utils_UI
[LOG 16:49:00.530] AssemblyLoader: Loading assembly at C:\Users\wren\Desktop\Kerbal Space Program\GameData\000_AT_Utils\Plugins\0_00_AT_Utils_UI.dll
[LOG 16:49:00.531] Load(Assembly): 000_AT_Utils/Plugins/CC.UI

This difference in load order causes issues with ModuleManager and almost all KSP mods with dependencies, as they rely on this order.

I apologize if this is the wrong place for this; I would greatly appreciate it if someone would direct me to the right place if so.

Edited by ThePuzzlemaker
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...