severedsolo Posted June 16, 2019 Share Posted June 16, 2019 (edited) Requested by @Tonka Crash here: What does it do? A simple mod that will parse your KSP.log and notify you at the Main Menu if any Assemblies (plugins) have failed to load, if there are any, then it will give you a notification, as above. Important Note: MADLAD does not know, or care, WHY a dll failed to load. Usually your choices are a) you didn't install all the dependencies, or b) the mod is not compatible with your KSP version. Attention: From KSP 1.8 / MADLAD 2.0 onwards, the way MADLAD handles mods who's dependencies aren't met has changed. See this post for more information: It also won't point out which mod a DLL is from. If the DLL has a strange name (accord.dll from Kerbal Wind Tunnel comes to mind) - you'll need to do some more digging. Adding mods to the whitelist Spoiler MADLAD now supports a whitelist for cases where it is expected that an assembly will fail to load and this is ok. Add a MM patch to your mod as follows: @MADLAD_WHITELIST //there can only be one so target with @ { MOD //each assembly should have it's own MOD node { ModName = CC_RemoteTech //the name of the assembly you are expecting to fail DependencyPath = RemoteTech/Plugins/RemoteTech.dll //the path to the dependency (relative to GameData if it WAS installed.) //If the file is not found, we assume the user didn't install it deliberately and the error is suppressed. } } License: MIT Download Here Source Edited March 1, 2021 by severedsolo Link to comment Share on other sites More sharing options...
Tonka Crash Posted June 16, 2019 Share Posted June 16, 2019 @severedsolo Now the trick is to get people to use it. This is one of the reasons I'd hinted that it would be a good option for inclusion in a mod like KSP-AVC/miniAVC that almost everyone has. Link to comment Share on other sites More sharing options...
severedsolo Posted June 16, 2019 Author Share Posted June 16, 2019 (edited) 3 minutes ago, Tonka Crash said: @severedsolo Now the trick is to get people to use it. This is one of the reasons I'd hinted that it would be a good option for inclusion in a mod like KSP-AVC/miniAVC that almost everyone has. *shrug* it's an open license, if people want to include it they can. I don't expect it will ever need any maintenance either. With this, I've actually managed to write a KSP mod that doesn't interface with KSP in any way at all. Other than making KSP load it. Edited June 16, 2019 by severedsolo Link to comment Share on other sites More sharing options...
DStaal Posted June 16, 2019 Share Posted June 16, 2019 I'll be using it. One question: Is there a way to let the player copy-paste out of it? It'd make reporting issues easier. Link to comment Share on other sites More sharing options...
severedsolo Posted June 16, 2019 Author Share Posted June 16, 2019 3 minutes ago, DStaal said: I'll be using it. One question: Is there a way to let the player copy-paste out of it? It'd make reporting issues easier. No, but quite frankly, you should be providing your entire log when reporting issues. There is useful information around the error that it prints. This is literally just to alert you that there is a problem, and refer to the log for more details. Link to comment Share on other sites More sharing options...
DStaal Posted June 16, 2019 Share Posted June 16, 2019 Fair enough. Mostly I wanted to be able to grab it and store it so I could sort it out later - not report that text itself, but be able to refer to it better, especially if there are multiple mods involved. Link to comment Share on other sites More sharing options...
zer0Kerbal Posted June 16, 2019 Share Posted June 16, 2019 Thank you! I'll use. Feature request: have MADLAD create a .log (fresh every run) file in \Logs\MODLAD\ like MM does? would be a stretch goal of having either a command line switch (like MM does) or setting to turn that feature on/off. This log would parse KSP.log for all WRN/ERR etc and store in its own with related messages. Link to comment Share on other sites More sharing options...
Stone Blue Posted June 16, 2019 Share Posted June 16, 2019 (edited) Nice!.... you've managed to make me spend about half my daily likes on you, today, already, Severed... Edited June 16, 2019 by Stone Blue Link to comment Share on other sites More sharing options...
severedsolo Posted June 17, 2019 Author Share Posted June 17, 2019 15 hours ago, zer0Kerbal said: Thank you! I'll use. Feature request: have MADLAD create a .log (fresh every run) file in \Logs\MODLAD\ like MM does? would be a stretch goal of having either a command line switch (like MM does) or setting to turn that feature on/off. This log would parse KSP.log for all WRN/ERR etc and store in its own with related messages. 18 hours ago, DStaal said: I'll be using it. One question: Is there a way to let the player copy-paste out of it? It'd make reporting issues easier. I'll roll these together, and have it output its log to the folder so that it can be copy pasted if needed Link to comment Share on other sites More sharing options...
Superfluous J Posted June 17, 2019 Share Posted June 17, 2019 I prefer this on its own. On its own, I'll use it. If it was (only) baked into MiniAVC it'd get deleted Link to comment Share on other sites More sharing options...
Stone Blue Posted June 17, 2019 Share Posted June 17, 2019 4 hours ago, severedsolo said: I'll roll these together, and have it output its log to the folder so that it can be copy pasted if needed I assume it will include timestamps? Makes it much easier to match up with the KSP.log vOv Link to comment Share on other sites More sharing options...
severedsolo Posted August 10, 2019 Author Share Posted August 10, 2019 (edited) On 6/17/2019 at 2:51 PM, Stone Blue said: I assume it will include timestamps? Makes it much easier to match up with the KSP.log vOv Indeed. MADLAD 1.1 Released Errors will now be logged to GameData/MADLAD/Logs/log.txt as well as popping up in game. Fixed a bunch of issues with the version file Edited August 10, 2019 by severedsolo Link to comment Share on other sites More sharing options...
Azzinoth Posted October 18, 2019 Share Posted October 18, 2019 Could you make this mod avaiable in CKAN? Link to comment Share on other sites More sharing options...
severedsolo Posted October 19, 2019 Author Share Posted October 19, 2019 19 hours ago, Azzinoth said: Could you make this mod avaiable in CKAN? Sure, I meant to I guess it just slipped my mind. Will get that done soon. MADLAD 2.0 Released Recompile against KSP 1.8 / .Net Framework 4.5 Due to changes in the way KSP/Unity handle dependencies with 1.8 mod may warn of loading exceptions in scenes other than the Main Menu. See forum post for more details. Note the major version number change. This is absolutely 100% not compatible with KSP versions earlier than 1.8 Changes to the way MADLAD detects problems with Mods that have dependencies. In previous versions of KSP, MADLAD only had to check for exceptions on the Main Menu because if a mods dependencies weren't met, that mod would just refuse to load and we'd know about it straight away. This has changed in KSP 1.8. Now KSP will happily load a dll and won't actually cause an issue / throw an exception until that dll actually tries to access one of it's dependencies. So going forward, MADLAD will now scan entries as they appear in your log, and if it detects a "Could not load file or assembly" error, it will log it and pop up to warn you. Mods that fail to load straight away (before the Main Menu) will be handled in the usual way. Link to comment Share on other sites More sharing options...
severedsolo Posted October 19, 2019 Author Share Posted October 19, 2019 @Azzinoth - Apparently MADLAD is already on CKAN. I don't remember adding it, maybe someone else did. Link to comment Share on other sites More sharing options...
HebaruSan Posted October 19, 2019 Share Posted October 19, 2019 3 hours ago, severedsolo said: @Azzinoth - Apparently MADLAD is already on CKAN. I don't remember adding it, maybe someone else did. I was watching this conversation: https://github.com/KSP-CKAN/NetKAN/pull/7435 Link to comment Share on other sites More sharing options...
zer0Kerbal Posted October 19, 2019 Share Posted October 19, 2019 (edited) possible bug concerning log.txt creation. issue reported on github. and using it on 1.7.3 without any (noticeable) issue(s). Edited October 19, 2019 by zer0Kerbal Link to comment Share on other sites More sharing options...
severedsolo Posted October 20, 2019 Author Share Posted October 20, 2019 10 hours ago, zer0Kerbal said: possible bug concerning log.txt creation. issue reported on github. and using it on 1.7.3 without any (noticeable) issue(s). MADLAD 2.0.1 Released Handle cases where the Logs Directory doesn't exist before attempting to write to it. Link to comment Share on other sites More sharing options...
severedsolo Posted October 28, 2019 Author Share Posted October 28, 2019 (edited) MADLAD 2.1 released Now alerts users if mods are installed to the wrong locations (if specified in the version file) - thanks to @linuxgurugamer see: here for more information and documentation Still doesn't handle KSPAssemblyDependency that's coming next - my computer went south this weekend so didn't get time to implement it. 1.7.3 backport is coming but, see above. Edited October 28, 2019 by severedsolo Link to comment Share on other sites More sharing options...
linuxgurugamer Posted October 28, 2019 Share Posted October 28, 2019 1 hour ago, severedsolo said: Still doesn't handle KSPAssemblyDependency that's coming next - my computer went south this weekend so didn't get time to implement it. Any chance it was a windows update? Link to comment Share on other sites More sharing options...
severedsolo Posted October 29, 2019 Author Share Posted October 29, 2019 10 hours ago, linuxgurugamer said: Any chance it was a windows update? Only if it was more broken than I thought! I use Linux Mint. Nah this was just 2 years of detritus and bad package management (on my part) building up until the system became an unstable mess, so I had to reinstall. Link to comment Share on other sites More sharing options...
severedsolo Posted November 4, 2019 Author Share Posted November 4, 2019 Madlad 2.1.0.1 Released Fixed very bad folder structure from last release. If you copy and pasted the folder blindly, I'd check your GameData directory for duplicates. Sorry. Link to comment Share on other sites More sharing options...
zer0Kerbal Posted November 4, 2019 Share Posted November 4, 2019 so MADLAD would yell about itself? *chuckle* Link to comment Share on other sites More sharing options...
linuxgurugamer Posted November 12, 2019 Share Posted November 12, 2019 @severedsolo I think I want to make a small change to the InstallValidator code. It won't invalidate anything that already uses it, I just want to add the ability to check to see if a directory exists without having to specify a file in it. I'll get this done and do a PR this evening Link to comment Share on other sites More sharing options...
Vorg Posted November 20, 2019 Share Posted November 20, 2019 This keeps doing a popup but I don't know which mod is triggering it. Must have missed something when going through them: Spoiler [ERR 19:25:06.827] AssemblyLoader: Exception loading 'MultiAnimators': System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown. [2019-11-18 21:54:26]: 002_MultiAnimators, Version=1.1.0.2, Culture=neutral, PublicKeyToken=null 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 <ad04dee02e7e4a85a1299c7ee81c79f6>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x0001c] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 System.RuntimeType Could not load file or assembly 'DMModuleScienceAnimateGeneric, Version=0.21.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. at KerboKatz.ASS.AutomatedScienceSampler.CheckTypeForScienceActivator (System.Type type) [0x00060] in <5a8cf6fa51b341e5a2b9633bfcfe406f>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x00030] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 System.RuntimeType Could not load file or assembly 'StationScience, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. at KerboKatz.ASS.AutomatedScienceSampler.CheckTypeForScienceActivator (System.Type type) [0x00060] in <5a8cf6fa51b341e5a2b9633bfcfe406f>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x00030] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 [2019-11-18 21:56:40]: 002_MultiAnimators, Version=1.1.0.2, Culture=neutral, PublicKeyToken=null 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 <ad04dee02e7e4a85a1299c7ee81c79f6>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x0001c] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 System.RuntimeType Could not load file or assembly 'DMModuleScienceAnimateGeneric, Version=0.21.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. at KerboKatz.ASS.AutomatedScienceSampler.CheckTypeForScienceActivator (System.Type type) [0x00060] in <5a8cf6fa51b341e5a2b9633bfcfe406f>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x00030] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 System.RuntimeType Could not load file or assembly 'StationScience, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. at KerboKatz.ASS.AutomatedScienceSampler.CheckTypeForScienceActivator (System.Type type) [0x00060] in <5a8cf6fa51b341e5a2b9633bfcfe406f>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x00030] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 [2019-11-18 23:14:20]: 002_MultiAnimators, Version=1.1.0.2, Culture=neutral, PublicKeyToken=null 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 <ad04dee02e7e4a85a1299c7ee81c79f6>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x0001c] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 System.RuntimeType Could not load file or assembly 'DMModuleScienceAnimateGeneric, Version=0.21.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. at KerboKatz.ASS.AutomatedScienceSampler.CheckTypeForScienceActivator (System.Type type) [0x00060] in <5a8cf6fa51b341e5a2b9633bfcfe406f>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x00030] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 System.RuntimeType Could not load file or assembly 'StationScience, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. at KerboKatz.ASS.AutomatedScienceSampler.CheckTypeForScienceActivator (System.Type type) [0x00060] in <5a8cf6fa51b341e5a2b9633bfcfe406f>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x00030] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 [2019-11-18 23:17:44]: 002_MultiAnimators, Version=1.1.0.2, Culture=neutral, PublicKeyToken=null 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 <ad04dee02e7e4a85a1299c7ee81c79f6>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x0001c] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 System.RuntimeType Could not load file or assembly 'DMModuleScienceAnimateGeneric, Version=0.21.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. at KerboKatz.ASS.AutomatedScienceSampler.CheckTypeForScienceActivator (System.Type type) [0x00060] in <5a8cf6fa51b341e5a2b9633bfcfe406f>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x00030] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 System.RuntimeType Could not load file or assembly 'StationScience, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. at KerboKatz.ASS.AutomatedScienceSampler.CheckTypeForScienceActivator (System.Type type) [0x00060] in <5a8cf6fa51b341e5a2b9633bfcfe406f>:0 at KerboKatz.Utilities.LoopTroughAssemblies (System.Action`1[T] CheckType) [0x00030] in <a9fd0328e42c42c683680f8ee94d4e7e>:0 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now