Jump to content

[Solved] Odd DLL interactions - where do I go next?


Recommended Posts

Some players on the MechJeb thread reported that RasterPropMonitor was breaking MJ. After quite a bit of fiddling around, I found out that the DLL RPM uses to interface with SCANsat was the culprit - but only if SCANsat is not installed. I have no idea why this stopped working - players report that MJ dev build 182 or thereabouts works, but the most recent dev builds do not.

When I look at KSP_Data/output_log.txt (with only MJ and RPM installed), I see this:


PartLoader: Compiling Part 'MechJeb2/Parts/MechJeb2_AR202/part/mumech_MJ2_AR202'

(Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

MechJeb caught exception in core OnLoad: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at MuMech.MechJebCore.LoadComputerModules () [0x00000] in <filename unknown>:0
at MuMech.MechJebCore.OnLoad (.ConfigNode sfsNode) [0x00000] in <filename unknown>:0

(Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

and, of course, early in the file is


Non platform assembly: D:\Games\KSP-modtest\GameData\SCANsatRPM\SCANsatRPM.dll (this message is harmless)
AssemblyLoader: Exception loading 'SCANsatRPM': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0

Additional information about this exception:

System.TypeLoadException: Could not load type 'SCANsatRPM.JSISCANsatRPM' from assembly 'SCANsatRPM, Version=0.15.5201.30201, Culture=neutral, PublicKeyToken=null'.

System.TypeLoadException: Could not load type 'MapMarkupLine' from assembly 'SCANsatRPM, Version=0.15.5201.30201, Culture=neutral, PublicKeyToken=null'.

If I remove SCANsatRPM.dll, the AR202 loading section looks like this:


PartLoader: Compiling Part 'MechJeb2/Parts/MechJeb2_AR202/part/mumech_MJ2_AR202'

(Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

Platform assembly: D:\Games\KSP-modtest\KSP_Data\Managed\Mono.Security.dll (this message is harmless)

So, it appears that when SCANsatRPM.dll fails to load (since the SCANsat assemblies it uses are missing), it somehow causes MechJeb to fail to load later. Again, this used to work, but something changed in MechJeb (apparently) and it doesn't now. While I could be a lazy engineer and say "Well, MechJeb changed, so it's not my problem", I'd really like to understand what happened and why, and change the RPM code if appropriate.

However, I don't know what to even start looking for - nothing in the RPM code jumps out as obviously a problem, but I'm also not a C# guy natively, so I may not see it if it's not screamingly obvious, anyway.

Edited by MOARdV
Found the solution
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...