Jump to content

[KSP >= 1.3.0] TweakScale - Under Lisias' Management - 2.4.7.6 - 2024-0322


Lisias

Recommended Posts

49 minutes ago, Lisias said:

Hi! Your rig is pretty damanged...

For starterts, you have two TweakScaleCompanions installed on the rig - and there can be only one. KSPIE is ano badly installed:

KSPIE+1.29.6+for+KSP+1.8.1
<...>
Stock folder: Squad
<...>
TweakScale
TweakScaleCompanion
TweakScaleCompanion 4.48.45 pm

Completely remove <KSP_ROOT>GameData/TweakScaleCompanion 4.48.45 pm . Additionaly, rename KSPIE+1.29.6+for+KSP+1.8.1 to KSPIE.

Besides this, I think you have a problem with ExsurgentEngineering (and I don't have the slightest idea about what it is):

[ERR 17:07:29.850] AssemblyLoader: Exception loading 'ExsurgentEngineering': System.Reflection.ReflectionTypeLoadException: 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 <9577ac7a62ef43179789031239ba8798>:0
  at AssemblyLoader.LoadAssemblies () [0x000e6] in <106570632fc343a784fad39e75e877bf>:0

Additional information about this exception:

 System.TypeLoadException: Could not resolve type with token 0100002b (from typeref, class/assembly SolidRocket, Assembly-CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)

Reach ExsurgentEngineering maintainers for help, this is also screwing a lot of other addons, as HangerExtenderExtended , KineTechAnimationModuleLoader ,  MechJeb2 and all the TweakScaleCompanions due the Assembly Loader/Resolver problem on KSP:

[LOG 17:07:30.683] [ModuleManager] Intercepted a ReflectionTypeLoadException. List of broken DLLs:
ExsurgentEngineering 1.0.5122.3109 GameData/ExsurgentEngineering/Plugins/ExsurgentEngineering.dll

Thanks a lot, will do. I will update you if it works.

Link to comment
Share on other sites

6 hours ago, Mmlz said:

Hi @Lisias

I am also experiencing the "Missing Class: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown" error. Can you assist?

Please find my log here: https://www.dropbox.com/scl/fi/r6a34oj5vqqk4e0fpx0kj/KSP.log?rlkey=qct1zvqtmvh6y3thv4c1pliom&dl=0

Thank you!

Hi!

You have a case of missing dependency.

Please remove the file <KSP_ROOT>/GameData/ScrapYard/Plugins/ScrapYard_ContractConfigurator , or install Contract Configurator (and its dependencies, if any) and you will be good.

Additionally, please file a report on CKAN about it. Their metadata files needs to be updated, this file should be installed only when Contract Configurator is installed!

Cheers!

 

Link to comment
Share on other sites

21 hours ago, Lisias said:

Hi!

You have a case of missing dependency.

Please remove the file <KSP_ROOT>/GameData/ScrapYard/Plugins/ScrapYard_ContractConfigurator , or install Contract Configurator (and its dependencies, if any) and you will be good.

Additionally, please file a report on CKAN about it. Their metadata files needs to be updated, this file should be installed only when Contract Configurator is installed!

Cheers!

 

This fixed my issue! Thank you so much! :)

Link to comment
Share on other sites

METAR

A serious regression was detected on TweakScale 2.4.7.3. See Issue 314 for the gory details.

TL;DR: When I fixed Issue 307, I inadvertently triggered yet another bug on Editor . Why it's a bug on Editor? Because if it would be something I'm doing wrong, I would be screwing crafts when they are loaded on the Flight Scene (i.e., by loading a SaveGame, or by launching crafts directly into the Launch Pad or Runway), since the code is essentially the same.

Being a Editor bug or not, the fact is that KSP is not going to be fixed, so I need to cope with the problem somehow. Currently Work In Progress.

In the mean time, I strongly suggest to revert back to 2.4.7.2 . You will be hit by Issue 307 again, but it's a lesser of a problem than what we have now.

Link to comment
Share on other sites

ANNOUNCE

Release 2.4.7.4 is available for downloading, with the following changes:

  • A serious regression was detected on 2.4.7.3. The code intended to fix Issue 307 triggered Yet Another Bug on Editor™, and had to be removed. This, unfortunately, resurrects #307. :(
  • Closes Issues:
    • #314 The Editor is screwing with me again when scaling Parts with PartModuleVariant
  • ReOpen Issues:
    • #307 Attachment Points are not being scaled (or being reset) after changing the Variant

A SERIOUS REGRESSION were (finally) diagnosed.

The fix for the Issue 307 ended up triggering a new bug on Editor (or an old bug in disguise), what lead into the problem reported on Issue 314.

Exactly "how" this happens is (hopefully) diagnosed, "why" I will never know and "when" is currently work in progress - the aim for the next TweakScale release is to close again #307, but without screwing anything else this time.

Until there, please select your Variant before scaling the part, what's exactly what you had to do before 2.4.7.3 anyway.

I'm not happy with the time I took to finally understand the problem, but I least I could issue a fix in less than 2 hours after detecting it. My apologies for the borkage on the wild - but Real Life™ and Day Job© sometimes conspires together to screw my life, and the last 8 weeks were being royally screwed - and the few days I got to rest I, well, rested. :) 

@AnFa, I'm afraid I didn't managed to diagnose correctly your report, my apologies - but as a matter of fact, I think you were bitten by BOTH problems are the same time (mine and ReRoot). In a way or another, if you are still using TweakScale, please check this fix, thank you.

Know Issues

  • Attachment nodes are being reset when changing Variant on a scaled part. Please change the Variant before scaling the part as a temporary workaround.
    • See issues #307 and #314 for the gory details.
  • There's a long standing issue on TweakScale about scaling ModuleEnginesFX's plumes - some engines' plumes is just not scaled, while others scaled pretty badly. It's something that never worked right on TweakScale, and it will only be really fixed on TweakScale 2.5 (when this thing goes gold)
    • The best workaround (and also the reason I'm dragging my feet on this) is to use SmokeScreen or Waterfall.
      • For SmokeScreen, you need:
        • SmokeScreen itself.
        • Real Plumes (to enable SmokeScreen on Stock parts)
          • Additional Part Sets and Add'Ons may need specialised support not included on Real Plumes.
      • For Waterfall, you need:
        • Waterfall itself.
        • StockWaterfallEffects (to enable SmokeScreen on Stock parts)
          • Additional Part Sets and Add'Ons may need specialised support not included on StockWaterfallEffects.
    • See Issue #27

Disclaimer

By last, but not the least...

Spoiler

No Module Manager was harmed during the development of TweakScale.

And since we are here, a very important disclaimer and serious warning: please, pretty please don't give attention to character assassinations attempts against my add'ons. I'm perfectly aware that they are not perfect, but under no circumstances they are malicious.

There's absolutely NO CHANCE any of my code would do shady things on you, neither try to force you to do something by your back. I may bork trying to do the right thing, but it's all.

In special, this crap:

Spoiler

 

is, well… CRAP!! That "shady ass version of a Module Manager tampering library" is a tool to PROTECT YOU from fatal mishaps on installations:

  • You forgot to install Module Manager, or by some reason it isn't operational? It will bark on you.
  • You installed an older version of MM by accident, what fools KSP on using the older version? It will try to fix it, and then will bark on you so you restart KSP and use the right one.
  • You installed a different version of MM by accident? It will remove the alien one (no matter what it is) so the MM you want to use will be safeguarded against replacement.
  • You screwed something while trying to get rid of PD Launcher? It will bark on you, warning that things are not going to work 100% fine, no matter what anyone else tells you
    • the KSP.log ending up on the wrong place is already a sign that you should not do it this way!!!
  • You forgot to install a dependency that makes TweakScale to bork? It will bark on you and prevent you from loading the game, what would destroy your savegames!!
  • You forgot to install a dependency that makes KSPIE bork? Same thing!
  • You have any Add'On that screws up the savegames if incorrectly installed? Talk to me and I will implement a WatchDog for it.

And since Module Manager (forum) itself is being prevented somehow to yell when Reflection Exceptions are detected while loading DLLs nowadays (see Issue 312), Module Manager WatchDog is, now, the only defense you have against such borkages!

And even this "shady" feature can be easily disabled when using CKAN or any other PackageManager that handles itself the problem, as we can see on this linkI never pushed my weight on users, and this will not change.

I have my share of problems to fix, I'm not denying it and I'm bashing my cheeks to have them sorted out. No one needs half baked, unfunded and easily refutable (the freaking thing is OPEN SOURCE, damnit - anyone can read the code and check themself!!!) accusations to be added to my already significant workload - unfortunately, this means that I will need to defend myself from such crapness as I'm doing now. This is not even about my reputation anymore (I don't need help to screw it up myself!! :sticktongue:), we are talking about people intentionally putting users at risk. I will not even try to speculate about the reasons.

(sigh). Vida que segue.

 

This Release will be published using the following Schedule:

  • GitHub, reaching first manual installers and users of KSP-AVC. Right now.
  • CurseForge. Right Now.
  • SpaceDock. Right Now.
Edited by Lisias
All your Distribution Channels are belong to us!
Link to comment
Share on other sites

Hiho, im having issues with the mod, it seems to have a problem with KSP-IE (deducting that before installing it, it had no issues, now, spewing exceptions left and right).

Log: https://drive.google.com/file/d/1qJ67yGiuXiB_-4_GG8Zc1LZT0YBtUFcn/view?usp=sharing

the problem is, that it doesn't let me attach parts in editor.

Now my presumption of what might be causing it, is this, buuut, I am no specialist;

[LOG 16:26:59.210] [TweakScale] ERROR: System.NotSupportedException: The invoked member is not supported in a dynamic module.
  at System.Reflection.Emit.AssemblyBuilder.get_Location () [0x00006] in <9577ac7a62ef43179789031239ba8798>:0
  at KSPCommunityFixes.Modding.ReflectionTypeLoadExceptionHandler+FailedAssembly..ctor (System.Reflection.Assembly assembly) [0x000b8] in <84a4e11594ad4c4cb519f08a8e322246>:0
  at KSPCommunityFixes.Modding.ReflectionTypeLoadExceptionHandler.LogReflectionTypeLoadExceptionInfo (System.Reflection.Assembly assembly) [0x00021] in <84a4e11594ad4c4cb519f08a8e322246>:0
  at KSPCommunityFixes.Modding.ReflectionTypeLoadExceptionHandler.Assembly_GetTypes_Prefix (System.Reflection.Assembly __instance, System.Type[]& __result) [0x0000c] in <84a4e11594ad4c4cb519f08a8e322246>:0
  at (wrapper dynamic-method) System.Reflection.Assembly.System.Reflection.Assembly.GetTypes_Patch1(System.Reflection.Assembly)
  at KSPe.Util.SystemTools+Type+Find.ByQualifiedName (System.String qn) [0x00039] in <58fb44557e3d487fa13c42bddbc423e1>:0
  at TweakScale.Startup.Start () [0x000a3] in <8e463f0c7a754587854563c7c6517452>:0  at error:0

i would be grateful, if someone would take a look at it.

 

Link to comment
Share on other sites

4 hours ago, Comrad_501 said:

Hiho, im having issues with the mod, it seems to have a problem with KSP-IE (deducting that before installing it, it had no issues, now, spewing exceptions left and right).

Log: https://drive.google.com/file/d/1qJ67yGiuXiB_-4_GG8Zc1LZT0YBtUFcn/view?usp=sharing

the problem is, that it doesn't let me attach parts in editor.

Now my presumption of what might be causing it, is this, buuut, I am no specialist;

[LOG 16:26:59.210] [TweakScale] ERROR: System.NotSupportedException: The invoked member is not supported in a dynamic module.
<snipped-by-lisias>

i would be grateful, if someone would take a look at it.

 

well, you presumed right - this insidious Exception appears to be part of the problem.

It appears to be something on Unity?

https://forum.unity.com/threads/finding-the-cause-of-system-notsupportedexception-error.1256958/

Humm…Yeah, something on Unity, definitively:

https://github.com/googlesamples/unity-jar-resolver/issues/362

https://github.com/googlesamples/unity-jar-resolver/commit/1b7a9a586796751227796a50277cab6b8c27c8d4

So, nope, KSPIE and TweakScale are innocent on this one. Something else is triggering this Unity bug, almost surely by doing something completely innocent but that by some arcane reason destabilised something inside this sad excuse of software called Unity3D.

What's unfortunate, because if it would be something I'm doing wrong, I would fix it ASAP.

On the bright (or less dark) side, your CPU is a i7-10700KF, a symmetrical CPU (i.e., all the cores are equal and runs at the same speed), what makes things slightly less worst to cope with.

However, we still need to find what's happening on your rig and try to work around it. I'm afraid that TweakScale is just the one winning a lottery here, ideally we need to zero in the problem or this crap will hit someone else later with someone else.

We are going to do combinatorial analysis here. :/

First, do a FULL BACKUP of the whole thing and from now on, only mangle with the backup. Do not try anything below on the original installation, as these changes are destructive!

  • Remove Harmony and anything that dependes on it (KSPCF, Kopernicus, etc). Then fire up the test bed and try to reproduce the problem.
  • If the problem is still present, remove KSPIE and try again.
  • If the problem is still present, send me a new KSP.log, but also the output_log.txt this time.

In the mean time, I will try the opposite here. I will install KSPIE and see what happens. Then I will install Harmony and KSPCF, etc.

I suspect I will not find anything, because such an obvious error would be already caught in the field, but I need to try nevertheless - or we will risk a misdiagnose and I already had my share this month. :) 

Anyway, let me know whatever are your findings.

Good hunting!

— — POST EDIT — — 

This thing is happening around here since some time, even before I get here!!

https://forum.kerbalspaceprogram.com/search/?q="System.NotSupportedException"&quick=1&updated_after=any&sortby=newest&search_and_or=or

— — POST POST EDIT — — 

Aha, found something!

https://github.com/blizzy78/ksp_toolbar/pull/39

If I'm right, I have no choice but to cope with this mess on KSPe. Damn, another update fest as it appears.

— — POST POST POST EDIT — — 

@Comrad_501 wait!!! Found something about! Try to first delete the following file:

D:\Steam\steamapps\common\Kerbal Space Program\GameData\KopernicusExpansion\Plugins\RunSharp.dll

I have notice that this fixed the problem!

— — POST POST POST POST EDIT — — 

NO!  DO NOT DELETE THAT FILE!!! (source)

-- POST POST POST POST POST EDIT --

That's the history: KopernicusExpansion decides to add a tool to make Reflection handling easier, RunSharp. Apparently it is not using it itself, but some extensions to it are.

Why this thing is playing havoc on KSP I didn't checked yet (but I will). 

So, there's a possible quick&dirty work around for your problem: delete RunSharp.dll and then check if anything borks. If you find nothing wrong, good - you can play KSP while I cook something to cope with the problem. If something borks complaining about the absence of the RunSharp.dll, then you will need to remove TweakScale for while (as I' m assuming you is playing KopernicusExpansion already).

Edited by Lisias
Whoa! Apparently I found the perpetrator! :) — But we can't get rid of it… :(
Link to comment
Share on other sites

55 minutes ago, Lisias said:

well, you presumed right - this insidious Exception appears to be part of the problem.

It appears to be something on Unity?

https://forum.unity.com/threads/finding-the-cause-of-system-notsupportedexception-error.1256958/

Humm…Yeah, something on Unity, definitively:

https://github.com/googlesamples/unity-jar-resolver/issues/362

https://github.com/googlesamples/unity-jar-resolver/commit/1b7a9a586796751227796a50277cab6b8c27c8d4

So, nope, KSPIE and TweakScale are innocent on this one. Something else is triggering this Unity bug, almost surely by doing something completely innocent but that by some arcane reason destabilised something inside this sad excuse of software called Unity3D.

What's unfortunate, because if it would be something I'm doing wrong, I would fix it ASAP.

On the bright (or less dark) side, your CPU is a i7-10700KF, a symmetrical CPU (i.e., all the cores are equal and runs at the same speed), what makes things slightly less worst to cope with.

However, we still need to find what's happening on your rig and try to work around it. I'm afraid that TweakScale is just the one winning a lottery here, ideally we need to zero in the problem or this crap will hit someone else later with someone else.

We are going to do combinatorial analysis here. :/

First, do a FULL BACKUP of the whole thing and from now on, only mangle with the backup. Do not try anything below on the original installation, as these changes are destructive!

  • Remove Harmony and anything that dependes on it (KSPCF, Kopernicus, etc). Then fire up the test bed and try to reproduce the problem.
  • If the problem is still present, remove KSPIE and try again.
  • If the problem is still present, send me a new KSP.log, but also the output_log.txt this time.

In the mean time, I will try the opposite here. I will install KSPIE and see what happens. Then I will install Harmony and KSPCF, etc.

I suspect I will not find anything, because such an obvious error would be already caught in the field, but I need to try nevertheless - or we will risk a misdiagnose and I already had my share this month. :) 

Anyway, let me know whatever are your findings.

Good hunting!

— — POST EDIT — — 

This thing is happening around here since some time, even before I get here!!

https://forum.kerbalspaceprogram.com/search/?q="System.NotSupportedException"&quick=1&updated_after=any&sortby=newest&search_and_or=or

— — POST POST EDIT — — 

Aha, found something!

https://github.com/blizzy78/ksp_toolbar/pull/39

If I'm right, I have no choice but to cope with this mess on KSPe. Damn, another update fest as it appears.

— — POST POST POST EDIT — — 

@Comrad_501 wait!!! Found something about! Try to first delete the following file:

D:\Steam\steamapps\common\Kerbal Space Program\GameData\KopernicusExpansion\Plugins\RunSharp.dll

I have notice that this fixed the problem!

aye aye, i got sidetracked, off to try removing the bloody lad

Edited by Comrad_501
Link to comment
Share on other sites

yup, i'm digging too, because can't play without that beautiful mod, arg :'( , seems we got the same problem : 

[LOG 21:28:08.721] [TweakScale] ERROR: System.NotSupportedException: The invoked member is not supported in a dynamic module.
  at System.Reflection.Emit.AssemblyBuilder.get_Location () [0x00006] in <9577ac7a62ef43179789031239ba8798>:0 
  at KSPCommunityFixes.Modding.ReflectionTypeLoadExceptionHandler+FailedAssembly..ctor (System.Reflection.Assembly assembly) [0x000b8] in <84a4e11594ad4c4cb519f08a8e322246>:0 
  at KSPCommunityFixes.Modding.ReflectionTypeLoadExceptionHandler.LogReflectionTypeLoadExceptionInfo (System.Reflection.Assembly assembly) [0x00021] in <84a4e11594ad4c4cb519f08a8e322246>:0 
  at KSPCommunityFixes.Modding.ReflectionTypeLoadExceptionHandler.Assembly_GetTypes_Prefix (System.Reflection.Assembly __instance, System.Type[]& __result) [0x0000c] in <84a4e11594ad4c4cb519f08a8e322246>:0 
  at (wrapper dynamic-method) System.Reflection.Assembly.System.Reflection.Assembly.GetTypes_Patch1(System.Reflection.Assembly)
  at KSPe.Util.SystemTools+Type+Find.ByQualifiedName (System.String qn) [0x00039] in <58fb44557e3d487fa13c42bddbc423e1>:0 
  at TweakScale.Startup.Start () [0x000a3] in <8e463f0c7a754587854563c7c6517452>:0  at error:0
[ERR 21:28:08.722] Unable to use a named GUIStyle without a current skin. Most likely you need to move your GUIStyle initialization code to OnGUI

[ERR 21:28:08.723] Unable to use a named GUIStyle without a current skin. Most likely you need to move your GUIStyle initialization code to OnGUI

[LOG 21:28:08.723] [TweakScale] "Houston, we have a problem!" about missing DLLs was displayed. Missing class: The invoked member is not supported in a dynamic module.

Link to comment
Share on other sites

6 minutes ago, matthias123 said:

yup, i'm digging too, because can't play without that beautiful mod, arg :'( , seems we got the same problem : 

I just edited my previous post with a possible work around, while I don't find a proper fix.

Try it and let me know if anything goes wrong.

I still need to check what's this RunSharp thingy is doing that it's screwing people using Reflection - but the real problem is Mono deciding to throw an exception instead of just returning NULL when a property is not available due some black magic. I already handle NULL on that situation, as Assemblies loaded from Resources also don't have a location.

Link to comment
Share on other sites

Well (yellow liquid), the game doesnt boot @Lisias

Edit

@Lisiasit aint bootin at all, i think its something with the other mods, i need to rake a look

Edit v2

Had to get rid of bloody kopernicus to make it start, and its not spamming exceptions anymore, sooo yeah, kopernicus issue as you said @Lisias

Edited by Comrad_501
Link to comment
Share on other sites

18 minutes ago, Comrad_501 said:

aye aye, i got sidetracked, off to try removing the bloody lad

Check the KSP.log after removing it. Some KopernicusExpansion' extensions use it, others don't. With a bit of lucky, this dirty trick buy us some time while I don't figure out what to do!

2 minutes ago, Comrad_501 said:

Well (yellow liquid), the game doesnt boot @Lisias

Krap. Put that file back so, something else installed on your rig needs it.

You will have to remove TweakScale until I find my way on this problem, sorry...

Link to comment
Share on other sites

11 minutes ago, Lisias said:

I just edited my previous post with a possible work around, while I don't find a proper fix.

Try it and let me know if anything goes wrong.

I still need to check what's this RunSharp thingy is doing that it's screwing people using Reflection - but the real problem is Mono deciding to throw an exception instead of just returning NULL when a property is not available due some black magic. I already handle NULL on that situation, as Assemblies loaded from Resources also don't have a location.

it worked !, well i guess i will be able to finish my mission tonight ! , thanks you can't wait to know what cause that exception from mono

Link to comment
Share on other sites

11 hours ago, Comrad_501 said:

Yey, more bloody errors... it boots without Kopernicus nor tweakscale, buuuu, no tweakscale

image.png?ex=653431ba&is=6521bcba&hm=f9e

 

@Lisias Noted, it is Kopernicus. tweakscale works fine without Kop. now why does kopernicus not like tweakscale

About these errors, send me the MMPatch.log and the KSP.log and I will check what's happening. Chances are that I already had fixed it on the TweakScale Companion for OPT, by the way. Idem for TundraExploration, but this Companion is still work in progress.

KerbalUsabilty is a new problem AFAIK.

Anyway, send me the KSP.log and MMPatch.log files and I will check them.

About Kopernicus… Well… That's the history: since some time ago, some folks around here decided to deeply change some code on KSP using Harmony or similar (RunSharp appears to generate CIL code at runtime - something like having a compiler embedded with your code). I'm one that criticise this practice due the incredible chances of screwing other people - usually people that are doing things right, and are caught in a crossfire by a new situation that never happened before - exactly what caught me with my pants down right now.

I concede that sometimes there's no other viable way, but yet… Before 1.8.0 Kopernicus wasn't using any of that shenanigans, so apparently it's possible to avoid using them - but take this with a grain of salt, because there's a limit for what is doable without these things.

But yet, I really try hard to avoid them, even by doing things in the hard way.

The whole KSP-Recall uses that "hard way" concept - I reimplement the feature that it's misbehaving, instead of trying to fix it injecting new code on the system (what's not exactly allowed on this Forum, by the way) - the reason I do things this way it's clear by now.

It's virtually impossible to foresee every consequence of changing already stablished code that will so behave in a new way, we never know when we will be hit by a new bug.

Exactly what's happening now. I will try to fix KSPe (my personal library that I use on everything I do, kitchen's sink included) and so I will really need to fix this thing only once (deployment will be my problem, because I didn't managed to push KSPe as a reusable library on SpaceDock's eco system as I did on CurseForge), but keep in mind that a lot of add'ons around here also use Reflection the way I do, and they are going to get hit the same.

— — POST EDIT — — 

As a matter of fact, I did a search on all my archived Logs and found this "RunSharp.dll" on some logs from my support "tickets" since Nov 2021.

Interesting enough, the RunSharp's induced "Unsuported" Stunt didn't screwed TweakScale all the time - sometimes TS passed through unscratched.

— — POST POST EDIT — — 

That's precious! (I'm being sarcastic)

This problem is unfixable by me!!! 

The Exception is being thrown inside a method called GetTypes_Patch1 on System.Reflection.Assembly.System.Reflection.Assembly that does not exists for me.

The "RunSharp.dll" is, indeed, a tool for making easier to use System.Reflection.Emit, that it's a tool to generate code at runtime. So someone, somewhere, is generating Dynamic Assemblies using this stunt.

But what's causing the problem is something that was injected on System.Reflection.Assembly.System.Reflection.Assembly using something like Harmony or similar.

So I remembered that KSPCF once published a fix/work-around/whatever for the infamous Assembly Loader/Resolver, and I'm pretty sure that code would need to handle the .Location property (that it's known to trigger the Unsupported Exception on dynamic assemblies).

Checking KSPCF soure code, I found this line:

if (methodName.StartsWith("<SetupFSM>") && !methodName.Contains("_Patch"))

what suggests that KSPCF should be, indeed, be involved somehow on this mess.

I also found that KSPCF is, in fact, directly accesing the GetTypes method (see here, and here). So we have evidences enough to drop them this hot potato.

@Comrad_501, @matthias123, both of you should ask for further help on KSPCF. There's absolutely nothing I can do from my side, as the problem is that whoever applied the GetTypes_Patch1 thingy into System.Reflection.Assembly.System.Reflection.Assembly, didn't accounted for Dynamic Assemblies and, so, are getting screwed.

My code is borking because it was induced to call GetTypes_Patch1 (whatever it is) instead of the original GetTypes. Additionally, my code that got screwed does not tries to access the .Location property, only .Namespace and .Name - so, again, there's nothing I can do to even workaround the problem on my side.

It's important to keep in mind that this problem is affecting everybody and everything that calls System.Reflection.Assembly.System.Reflection.Assembly.GetTypes() as I do, being TweakScale only one of the victims.

Edited by Lisias
POST POST EDIT
Link to comment
Share on other sites

12 hours ago, Lisias said:

About these errors, send me the MMPatch.log and the KSP.log and I will check what's happening. Chances are that I already had fixed it on the TweakScale Companion for OPT, by the way. Idem for TundraExploration, but this Companion is still work in progress.

Ksp log: https://drive.google.com/file/d/1ZVfUAoahg4SPpG_4JOpi89abvzqEUsmK/view?usp=sharing
MMPatc
h log: https://drive.google.com/file/d/1Juh77BU2TzXqhzwmV418vKDu3ySvEB5c/view?usp=sharing

Link to comment
Share on other sites

17 hours ago, Lisias said:

Interesting enough, the RunSharp's induced "Unsuported" Stunt didn't screwed TweakScale all the time - sometimes TS passed through unscratched.

Sooooooo, i got lucky, I reinstalled TS (onto the modpack) and for some reason it's totally fine... I am now generally confused...

Link to comment
Share on other sites

4 hours ago, Comrad_501 said:

Sooooooo, i got lucky, I reinstalled TS (onto the modpack) and for some reason it's totally fine... I am now generally confused...

Usually I would be too, but since last year I'm getting bitten by "mysterious" events on KSP that came and gone out of the blue - and one of that events caused something similar to what happen to you. And it vanished exactly the same.

I checked KSPCF latest release, and indeed they found a point to make things better on their Exception Reporting tool - but I didn't found any change related specifically to the GetTypes thingy, what suggests that whatever had hit us, came from "somewhere else".

On the bright side… I learnt something new (and interesting). I'm still unable to fix these problems, but I'm a bit less "defenceless" now.

Cheers!

Edited by Lisias
Grammars. Don't you hate this thing?
Link to comment
Share on other sites

11 hours ago, Lisias said:

Usually I would be too, but since last year I'm getting bitten by "mysterious" events on KSP that came and gone out of the blue - and one of that events caused something similar to what happen to you. And it vanished exactly the same.

I checked KSPCF latest release, and indeed they found a point to make things better on their Exception Reporting tool - but I didn't found any change related specifically to the GetTypes thingy, what suggests that whatever had hit us, came from "somewhere else".

On the bright side… I learnt something new (and interesting). I'm still unable to fix these problems, but I'm a bit less "defenceless" now.

Cheers!

Aye, Thanks for the help, i'm really grateful, and i'll pass on the potato, if needed
Cheers!

Link to comment
Share on other sites

On 10/8/2023 at 7:05 AM, Comrad_501 said:

There's something very wrong on your rig, I found no messages related to the TweakScale's booting process, it's like the patchers were installed, but not the DLLs.

How did you installed TweakScale? What version are you using?

Link to comment
Share on other sites

  • 2 weeks later...
On 7/7/2023 at 7:02 AM, Lisias said:

Support for Real Fuels is not done yet, it will be available when I finish the respective TweakScale Companion.

I don't have the slightest idea about the reason RF and TweakScale worked 12 months ago, and I didn't changed anything related to it in the mean time. Whatever it happened, happened by a 3rd party (perhaps a change on RF that I didn't detected, perhaps a 4th party interfering somehow).

In a way or another, this will be implemented on the next TweakScale Companion release, so there's no need to keep such diagnosing from your part.

Humm… Since we are here, there will be a catch… The TSCoFuel will probably only work with the next TweakScale 2.5 release - I will not further develop the current 2.4 for obvious reasons, but I will keep 2.4 available for some months in parallel in case someone can't use 2.5 for a reason or another (and then I check that reason and fix it on the 2.5).

Hi, have you finished the support for Real Fuel? I just tried the newest version of this mod, still can't scale engines thrust force.

Link to comment
Share on other sites

4 hours ago, HideoKuze said:

Hi, have you finished the support Xfor Real Fuel? I just tried the newest version of this mod, still can't scale engines thrust force.

Not yet. Real Life™ hijacked me from the ongoing task, and I didn't managed to get back to it yet. It's being developed on https://github.com/TweakScale/Companion_FuelSwitches if you want to follow it.

Link to comment
Share on other sites

  • 2 weeks later...

The fact is that if you don't act in a certain way, after tweak scale, one of your symmetrical fuel tank will get the right fuel according to tweak scale, and the other tank will get the initial fuel, the before you tweak scale.

To avoid it, select your fuel tank, put your symetrical tank not tweak scaled, select your fuel, you'll get the original quantity with a normal tank, then tweak scale one tank, and the other tank will be tweak scaled too with the right quantity in each fuel tank. If you want to proceed with another similar tweak scaled tank in symmetry, don't take from the previous tweakscaled tank using option key, but select another original tank, put it in symmetry, then select fuel options, and tweakscale again, and so on....This is the only way to get symmetrical fuel in tweakscaled tank

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