Jump to content

[KSP >= 1.3.0] TweakScale - Under Lisias' Management - 2.4.8.8 - 2024-1117


Lisias

Recommended Posts

2 hours ago, Lisias said:

Way interesting. You may had diagnosed the problem (perhaps), I will try to confirm it.

I will get back to you soon.

Hmmmmmmm, I just tried this on a much less modded install (my testing environment, which has stuff like TweakScale, B9PartSwitch, Interstellar Fuel Switch, MechJeb, KER, vessel mover, part info, etc.) - and in this environment I DO see both switcher options in the editor. So... Some conflict on my main install causing one switcher but not the other to appear? Still very confusing!

On the less modded install, I do not get an exception from tweakscale when moving/placing/scaling the OPT drop tank, either.

So... uh... I guess somehow another mod is making one of the switchers not appear, and also somehow interfering with TS...?

EDIT: I tried on my main install career save. I DO see both switchers on sandbox, and I don't on career. I see an upgrade in the tech tree that gives new B9PartSwitch options to the drop tanks in career. Could there be some interaction between TweakScale and B9PartSwitch modules that are not unlocked/upgraded yet in a Career save...?

EDIT AGAIN: I couldn't reproduce the same exceptions at first; tried opening career save, creating new craft with drop tank, manipulating size and contents, and launching. I didn't see TweakScale related stuff at that point. However, then I reverted back to the editor, and *THAT* seemed to lead to TS related stuff. Maybe reverting starts things off...? Not sure, there are still exceptions from other stuff as well.

Log is: https://www.dropbox.com/s/ac4gp0dkwngfmno/KSPLog_TSExceptionsReproduced2020-2-18.log?dl=0

 

 

Edited by AccidentalDisassembly
Link to comment
Share on other sites

5 hours ago, AccidentalDisassembly said:

Hmmmmmmm, I just tried this on a much less modded install (my testing environment, which has stuff like TweakScale, B9PartSwitch, Interstellar Fuel Switch, MechJeb, KER, vessel mover, part info, etc.) - and in this environment I DO see both switcher options in the editor. So... Some conflict on my main install causing one switcher but not the other to appear? Still very confusing!

On the less modded install, I do not get an exception from tweakscale when moving/placing/scaling the OPT drop tank, either

Well, then we have some evidence that someone else is borking on this one.

 

5 hours ago, AccidentalDisassembly said:

So... uh... I guess somehow another mod is making one of the switchers not appear, and also somehow interfering with TS...

Probably an Exception killing the Thread, and so some event from TweakScale scheduled to run is missed. But, frankly, this is just a guess for now.

 

5 hours ago, AccidentalDisassembly said:

EDIT: I tried on my main install career save. I DO see both switchers on sandbox, and I don't on career. I see an upgrade in the tech tree that gives new B9PartSwitch options to the drop tanks in career. Could there be some interaction between TweakScale and B9PartSwitch modules that are not unlocked/upgraded yet in a Career save...?

TweakScale completely ignores the unlocked/upgraded thingy on parts. It scales whatever is available on the part now, and that's it.

To tell you the true, I don't even know exactly how unlocked/upgraded stuff works...

The way I can imagine TweakScale could be doing something bad is... not doing something it should when scaling a part with upgrades... Something else to check, I think.

 

5 hours ago, AccidentalDisassembly said:

EDIT AGAIN: I couldn't reproduce the same exceptions at first; tried opening career save, creating new craft with drop tank, manipulating size and contents, and launching. I didn't see TweakScale related stuff at that point. However, then I reverted back to the editor, and *THAT* seemed to lead to TS related stuff. Maybe reverting starts things off...? Not sure, there are still exceptions from other stuff as well.

That's interesting. Reverting is nothing else than reloading the craft - when you revert to launch, you reload the craft and fire it up on the physics engine on a full initialisation. On reverting to Editor, the craft is not fully initialised . Using Unity lingo, CLONE.

In both situations, I expect that some internals of TweakScale is NULL and on the First Update() of the part, that critical initialisation stuff I mentioned is executed. If by some reason the part is duplicated on memory (Unity lingo COPY), the First Update() will believe it was already initialised (what strictly is what copy means, copy every single bit of data of the parts, including TS initialisation stuff). If by some reason such COPY is not that full copy as I expect, TweakScale will bork for sure...

The only problem on that is that TweakScale has this M.O. for years, something like that would be already detected and reported for sure - assuming I would not caught the damned thing myself (now and then I DO PLAY with TweakScale nowadays...). So this could be perhaps a new misbehaviour on KSP 1.11.x??? I will build testbeds with the same configuration of add'ons for different KSP versions and see what I get.

 

-- -- POST EDIT -- -- 

Just installed a bare minimal 1.11.1 for testing this thing. B9PS, CRP, Firespitter, OPT, OPT_Legacy, OPT_Reconfig. The OPTDropTank got two B9PS Module sections here too, it's by design. One B9PS controls the HeatShield, the other Controls the Tank contents.

Then I fired up the thing, build something with the OPTdropTank "OPT DropTank Mk I" (the part you pinpointed as a possible source of problems) and...

108440911-ce4cc100-7232-11eb-9264-395bb2

The Kraken Damned thing worked without a flaw on my rig. (sigh)

108441285-9003d180-7233-11eb-9a60-6f3718

I launched it, and then reverted to Editor, and not a single Exception was logged on the process. :/

I hate to have to say it again, but TweakScale is innocent on this one. As well B9PS.

We need to keep digging into your rig.

--- --- --- POST POST EDIT --- --- ---

NO! I managed to reproduce it! I needed to scale the damn thing!! :D

The exception is slightly different, probably  because I'm using TweakScale beta on this test bed, but the problem is there, on revert to the Editor, as you specified.

Now I have all I need to work on the problem!

[ERR 21:50:51.438] Exception handling event onEditorShipModified in class ModuleB9PartInfo:System.NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Behaviour.get_enabled(UnityEngine.Behaviour)
  at TweakScale.TweakScale.get_IsScaled () [0x00000] in <d0c485183fcf4c76a03b2923576b7ed2>:0
  at TweakScale.TweakScale.IPartMassModifier.GetModuleMass (System.Single defaultMass, ModifierStagingSituation situation) [0x00000] in <d0c485183fcf4c76a03b2923576b7ed2
  at Part.GetModuleMass (System.Single defaultMass, ModifierStagingSituation sit) [0x00046] in <dcd149aee9c64162a3bb6c8525068846>:0
  at B9PartSwitch.ModuleB9PartInfo.UpdateFields () [0x00019] in <b85eabe067044bcb9aeabe863954a5ce>:0
  at B9PartSwitch.ModuleB9PartInfo.EditorShipModified (ShipConstruct construct) [0x00006] in <b85eabe067044bcb9aeabe863954a5ce>:0
  at EventData`1[T].Fire (T data) [0x000b0] in <dcd149aee9c64162a3bb6c8525068846>:0

[EXC 21:50:51.444] NullReferenceException
    TweakScale.TweakScale.get_IsScaled () (at <d0c485183fcf4c76a03b2923576b7ed2>:0)
    TweakScale.TweakScale.IPartMassModifier.GetModuleMass (System.Single defaultMass, ModifierStagingSituation situation) (at <d0c485183fcf4c76a03b2923576b7ed2>:0)
    Part.GetModuleMass (System.Single defaultMass, ModifierStagingSituation sit) (at <dcd149aee9c64162a3bb6c8525068846>:0)
    B9PartSwitch.ModuleB9PartInfo.UpdateFields () (at <b85eabe067044bcb9aeabe863954a5ce>:0)
    B9PartSwitch.ModuleB9PartInfo.EditorShipModified (ShipConstruct construct) (at <b85eabe067044bcb9aeabe863954a5ce>:0)
    EventData`1[T].Fire (T data) (at <dcd149aee9c64162a3bb6c8525068846>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    KSPe.Util.Log.UnityLogDecorator:UnityEngine.ILogHandler.LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception)
    EventData`1:Fire(ShipConstruct)
    EditorLogic:SetBackup()
    EditorLogic:StartEditor(Boolean)
    <Start>d__133:MoveNext()
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[LOG 21:50:51.445] [VesselMover] INFO: [Move Launch Controller]: Hiding Flight GUI

 

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

5 hours ago, Lisias said:

--- --- --- POST POST EDIT --- --- ---

NO! I managed to reproduce it! I needed to scale the damn thing!! :D

The exception is slightly different, probably  because I'm using TweakScale beta on this test bed, but the problem is there, on revert to the Editor, as you specified.

Now I have all I need to work on the problem!


[ERR 21:50:51.438] Exception handling event onEditorShipModified in class ModuleB9PartInfo:System.NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Behaviour.get_enabled(UnityEngine.Behaviour)
  at TweakScale.TweakScale.get_IsScaled () [0x00000] in <d0c485183fcf4c76a03b2923576b7ed2>:0
  at TweakScale.TweakScale.IPartMassModifier.GetModuleMass (System.Single defaultMass, ModifierStagingSituation situation) [0x00000] in <d0c485183fcf4c76a03b2923576b7ed2
  at Part.GetModuleMass (System.Single defaultMass, ModifierStagingSituation sit) [0x00046] in <dcd149aee9c64162a3bb6c8525068846>:0
  at B9PartSwitch.ModuleB9PartInfo.UpdateFields () [0x00019] in <b85eabe067044bcb9aeabe863954a5ce>:0
  at B9PartSwitch.ModuleB9PartInfo.EditorShipModified (ShipConstruct construct) [0x00006] in <b85eabe067044bcb9aeabe863954a5ce>:0
  at EventData`1[T].Fire (T data) [0x000b0] in <dcd149aee9c64162a3bb6c8525068846>:0

[EXC 21:50:51.444] NullReferenceException
    TweakScale.TweakScale.get_IsScaled () (at <d0c485183fcf4c76a03b2923576b7ed2>:0)
    TweakScale.TweakScale.IPartMassModifier.GetModuleMass (System.Single defaultMass, ModifierStagingSituation situation) (at <d0c485183fcf4c76a03b2923576b7ed2>:0)
    Part.GetModuleMass (System.Single defaultMass, ModifierStagingSituation sit) (at <dcd149aee9c64162a3bb6c8525068846>:0)
    B9PartSwitch.ModuleB9PartInfo.UpdateFields () (at <b85eabe067044bcb9aeabe863954a5ce>:0)
    B9PartSwitch.ModuleB9PartInfo.EditorShipModified (ShipConstruct construct) (at <b85eabe067044bcb9aeabe863954a5ce>:0)
    EventData`1[T].Fire (T data) (at <dcd149aee9c64162a3bb6c8525068846>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    KSPe.Util.Log.UnityLogDecorator:UnityEngine.ILogHandler.LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception)
    EventData`1:Fire(ShipConstruct)
    EditorLogic:SetBackup()
    EditorLogic:StartEditor(Boolean)
    <Start>d__133:MoveNext()
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[LOG 21:50:51.445] [VesselMover] INFO: [Move Launch Controller]: Hiding Flight GUI

 

Hooray, a lead! :) That does look similar, at least the IPartMassModifier.GetModuleMass stuff...!

Link to comment
Share on other sites

On 2/13/2021 at 3:35 PM, Lisias said:

 

Found my way on the mess Paypal is nowadays. For some reason, Paypal choose to do not provide PayPal.me for Brazil, and I lost this option somewhere in the past when I had to migrate my account to Brazil due fiscal reasons. Not sure if I ever had, though - I never had the need before.

However, there's a similar feature called Donation Buttons, and I finally found my way on how to use it.

Use this link for such. I will update everything and the kitchen's sink as time allows with this new link. :)

Donation link worked! Thank You!

Link to comment
Share on other sites

18 hours ago, AccidentalDisassembly said:

Hooray, a lead! :) That does look similar, at least the IPartMassModifier.GetModuleMass stuff...!

It's the Current bleeding edge code compiled on DEBUG mode. And this is where things are getting really scary...

The problem is happening INSIDE UNITY ITSELF!! (full details here)

(wrapper managed-to-native) UnityEngine.Behaviour.get_enabled(UnityEngine.Behaviour)

I checked and rechecked my Awake and OnAwake events, I doing it right there. There's no moment in which an awaken Scale object is not able to fulfil requests (some times it just returns 0 mass, 0 cost, etc, but it's able to return something).

In DEBUG mode I have lots and lots os debugging logs, some of them on my event handlers, and this kinda changes how things are called on the stack - and so the problem had moved away from where it was borking on your rig.

So, and again, I'm back to square 1: this appears to be something on Unity (or KSP?), and not on B9PS neither TweakScale...

At least this is deterministic, so I can be confident that once this vanishes, the problem is worked around. But, boy, what the hell I need to do now?  I'm tempted to shove a empty try-catch on the damned IPartMassModifier.GetModuleMass , but this appears to be hot code (so, impacts FPS) - not to mention this is a hell of a kludge...

-- -- -- POST EDIT -- -- -- 

I FIXED IT!!!! :)

I was wrong when I said it was a weird interaction between something else and B9PS and TweakScale. The source of the interaction was the B9PS itself.

@AccidentalDisassembly, your report explaining exactly where the thing started to happens hinted me about the source of the problem! Thanks a lot!!! :)

A Pull Request to the B9PS Maintainer was issued. This problem (and probably the others related to B9PS and TweakScale) should vanish as the B9PS Maintainer merges the PR and releases the new version!

https://github.com/blowfishpro/B9PartSwitch/pull/207

Cheers!

Edited by Lisias
I FIXED IT!!! #HURRAY/pt-br :D
Link to comment
Share on other sites

10 hours ago, Lisias said:

-- -- -- POST EDIT -- -- -- 

I FIXED IT!!!! :)

I was wrong when I said it was a weird interaction between something else and B9PS and TweakScale. The source of the interaction was the B9PS itself.

@AccidentalDisassembly, your report explaining exactly where the thing started to happens hinted me about the source of the problem! Thanks a lot!!! :)

A Pull Request to the B9PS Maintainer was issued. This problem (and probably the others related to B9PS and TweakScale) should vanish as the B9PS Maintainer merges the PR and releases the new version!

https://github.com/blowfishpro/B9PartSwitch/pull/207

Cheers!

Hooray! I'm glad to have contributed; 9 times out of 10 when I report something, it was actually my fault - so this is a nice change, hah!

Link to comment
Share on other sites

unknown.png?width=1104&height=623

Crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap crap 

It's be working perfectly fine before along with other mods, I installed KSP interstellar extended and then it started acting out weirdly. Keep in mind that KSPIE has worked well before with this mod, and I installed it both on ckan and manually and none worked this time. I also got a different type of error on ckan, I'll see if I can screenshot that aswell. Thanks for any sort of help!

Link to comment
Share on other sites

56 minutes ago, Abducted_Cow said:

It's be working perfectly fine before along with other mods, I installed KSP interstellar extended and then it started acting out weirdly. Keep in mind that KSPIE has worked well before with this mod, and I installed it both on ckan and manually and none worked this time. I also got a different type of error on ckan, I'll see if I can screenshot that aswell. Thanks for any sort of help!

Unfortunately, the screenshot didn't show up. But most of the time screenshots are of little to no use when something serious happens, because all we can see is the final result, not the problems that leaded to that crappy result.

Please post your full KSP.log when this happens (quit KSP before copying the log, otherwise it may be incomplete) on drobox or something and then post the link here, so I can inspect it. The KSP.log has a huge amount of information that I can use to try to figure out what's happening.

Link to comment
Share on other sites

15 minutes ago, Abducted_Cow said:

I don't have too much experience navigating KSP files outside of mods, nor experience in using the forums, so sorry for dumb questions like these, but where is the log file specifically and how should I send it? 

 

You can find info about log files and required info in this post:

KSP.log file can be found in the same folder where you have installed KSP and where KSP_x64.exe is nested too.

Link to comment
Share on other sites

1 hour ago, Abducted_Cow said:

Thanks so much! Should I copy and paste the log file, or... is there another way?

Whatever you do, don't copy and paste. Use a file hosting service (dropbox, google drive, uh.. pastebin? or something like that) and link to the file instead.

Link to comment
Share on other sites

i am getting fatal  error  on stock mod  parts i guess 

  LOG 09:21:04.371] [TweakScale] ERROR: **FATAL** Part Thoroughbred (S2-17 "Thoroughbred" Solid Fuel Booster) has a fatal problem due having duplicated properties - see issue [#34]( https://github.com/net-lisias-ksp/TweakScale/issues/34 ). at error:0
[LOG 09:21:04.371] [TweakScale] ERROR: **FATAL** Part Clydesdale (S2-33 "Clydesdale" Solid Fuel Booster) has a fatal problem due having duplicated properties - see issue [#34]( https://github.com/net-lisias-ksp/TweakScale/issues/34 ). at error:0
[LOG 09:21:04.372] [TweakScale] ERROR: **FATAL** Part Shrimp (F3S0 "Shrimp" Solid Fuel Booster) has a fatal problem due having duplicated properties - see issue [#34]( https://github.com/net-lisias-ksp/TweakScale/issues/34 ). at error:0
[LOG 09:21:04.372] [TweakScale] ERROR: **FATAL** Part Mite (FM1 "Mite" Solid Fuel Booster) has a fatal problem due having duplicated properties - see issue [#34]( https://github.com/net-lisias-ksp/TweakScale/issues/34 ). at error:0
[LOG 09:21:04.389] [TweakScale] ERROR: **FATAL** Part rocketNoseConeSize4 (Protective Rocket Nose Cone Mk16A) has a fatal problem due having duplicated properties - see issue [#34]( https://github.com/net-lisias-ksp/TweakScale/issues/34 ). at error:0
[LOG 09:21:04.389] [TweakScale] ERROR: **FATAL** Part Size.1.5.Cone (Protective Rocket Nosecone Mk5A) has a fatal problem due having duplicated properties - see issue [#34]( https://github.com/net-lisias-ksp/TweakScale/issues/34 ). at error:0

 

what do i need to remove or what do  i  add  more info please   

Edited by Hrishabh
Link to comment
Share on other sites

20 hours ago, Abducted_Cow said:

Dropbox file: https://www.dropbox.com/s/vjg41tv2ayxop15/Player.log?dl=0

I think it should work.

UGH... tons and tons of Exceptions!!! o.O 

TweakScale is not borking, it's being borked, but this only happened once:

Module TweakScale threw during OnLoad: System.ArgumentException: An item with the same key has already been added. Key: TweakScale
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0
  at System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector,
  at System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector)
  at TweakScale.ScaleExponents.CreateExponentsForModule (ConfigNode node, System.Collections.Generic.Dictionary`2[TKey,TValue] parent) [0x00040] i
  at TweakScale.ScaleType..ctor (ConfigNode partConfig) [0x00312] in <6abb476517a84d89b511b2077e7c6791>:0
  at TweakScale.TweakScale.SetupPrefab () [0x00041] in <6abb476517a84d89b511b2077e7c6791>:0
  at TweakScale.TweakScale.OnLoad (ConfigNode node) [0x00020] in <6abb476517a84d89b511b2077e7c6791>:0
  at PartModule.Load (ConfigNode node) [0x001ab] in <9d71e4043e394d78a6cf9193ad011698>:0

On the other hand, there 're an considerable amount of

[TweakScale] WARNING: No valid member found for diameter in Part for <unk>

(about 1800 of that). As will similar messagens about some other parts, like:

[TweakScale] WARNING: Duplicate TweakScale module on part [B9.Control.RCS.Block.R5] R5 RCS Thruster Block

All of this suggests you have a really nasty problem of bad patching. Really, really nasty.

I also found this:

Node 'TweakScaleRogueDuplicate' found in loaded data, but 'TweakScale' is defined in prefab.
Looking for TweakScaleRogueDuplicate in other indices...
...no TweakScaleRogueDuplicate module found on part definition. Skipping...

What's the smoking gun about what I said - something is shoving bad patching uncontrollably on your pregab, and TweakScale is trying to getting things tight besides.

But all of that are more of annoyances than real problems, because TweakScale knows how to work around these pesky duplicates. 

It's the problems TweakScale yells on the loading screen the real problem. But these ones I can only check on KSP.log, as Player.log is Unity biased, and the information I really need to check these ones is on KSP.log.

But what's really crapping your game is this:

NullReferenceException: Object reference not set to an instance of an object
  at FNPlugin.Propulsion.AlcubierreDrive.<Update>b__172_3 (FNPlugin.Propulsion.AlcubierreDrive w) [0x00000] in <4d85f936717544ee9ee15156bd430225>:
  at System.Linq.Enumerable.Sum[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00036] in <fbb
  at FNPlugin.Propulsion.AlcubierreDrive.Update () [0x000aa] in <4d85f936717544ee9ee15156bd430225>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

There're 98111 occurrences of this one. :(

The FNPlugin is getting a NRE by some reason, and the first one happened after this:

TweakScale] WARNING: Duplicate TweakScale module on part [SurveyScanner] M700 Survey Scanner

Whatever is borking TweakScale, it may also be playing havoc with FNPlugin. Interestingly, I found this near this last TweakScale warning:

[Part B9.Structure.HX2.H] [ModuleB9PartSwitch 'bottomNodeSwitch'] Switched subtype to Single

So obviously you have B9PS installed. I recently fixed a problem on it (see this post), and there's a chance that this could be the reason you are getting so much problems. But it doesn't explains all of the problems I detected.

So, please publish the KSP.log too so I can give it a peek. There're a lot of things that are only logged on the KSP.log  and I need to check it to be sure about the probable causes for the other problems you have.

 

20 hours ago, Hrishabh said:

i am getting fatal  error  on stock mod  parts i guess 

<cut>

what do i need to remove or what do  i  add  more info please   

Without the KSP.log I can't tell. You showed me the victims of the problem, but I don't know who had patched them so I don't know who borked the patching.

Send me the KSP.log on dropbox or something (don't copy & paste it here, it will break the Forum! It's too much data for a post!!!) and I will check what's happening.

Scratch that. I found your post on the github issue #34. I'm  checking it right now.

 

On 2/18/2021 at 10:04 PM, basepart said:

The mod "Precise Editor" breaks both the TweakScale and the B9PartSwitch (maybe other mods as well). I had many TweakScale Exception errors in my log file and when I removed the "Precise Editor" mod everything looks fine.

Humm... I will give this a look too. Precise Editor is something that I used to use in the past, and I will probably use it again in the next months, when Real Life will finally give me a break and I will go back to some savegames of mine! :)

Edited by Lisias
Brute force post merging,
Link to comment
Share on other sites

19 minutes ago, Lisias said:

Humm... I will give this a look too. Precise Editor is something that I used to use in the past, and I will probably use it again in the next months, when Real Life will finally give me a break and I will go back to some savegames of mine! :)

Precise Editor seems to be working fine, I reproduced the NRE without Precise Editor installed, so the problem is somewhere else, still looking.

Link to comment
Share on other sites

On 2/21/2021 at 1:02 AM, Hrishabh said:

i am getting fatal  error  on stock mod  parts i guess 

<cut>

what do i need to remove or what do  i  add  more info please   

Downloaded the log from the github issue #34's post and analysed it.

Remove BladeTweaks - or at least, delete BladeTweaks/Squad-TweakScale.cfg . This will solve the problem.

This is a well known problem, to tell you the true - I had forgot about it.

Cheers!

 

On 2/21/2021 at 8:39 PM, basepart said:

Precise Editor seems to be working fine, I reproduced the NRE without Precise Editor installed, so the problem is somewhere else, still looking.

Wait a bit until the next release of B9PartSwitch. That bug I solved was insidious, it could potentially inject Exceptions on everybody - it was borking on the handling of a long chain of events, and once the NRE happens, everybody on that chain that would be handled later is just ignored. And so a lot o code that is depending of that chain of events to be fully handled will bork...

 

-- -- POST EDIT -- -- 

I misunderstood Precise Editor with Precise Node.

Really handy Editor Helper, I wish I knew it sooner!!! :D

Edited by Lisias
tyops. as usulla.
Link to comment
Share on other sites

I'm sorry, but first time poster, but I wasn't able to find this problem mentioned anywhere else.

Specifically, when using tweakscale to increase the scale of engines, when I recover(such as landing at the runway), the recovery price of the engines is lower than expected.  Up to being outright negative. 

Version is 2.4.4.5 as downloaded/installed by CKAN.

I'm playing with Interstellar Extended, and thus don't actually land anything on the average day(I try to reuse and resupply in situ), but when I land my "fully reusable except for the fuel" SSO and I get -1k funds rather than the 100k+ that the engine cost...

Okay, testing, I can verify that this affects the LANTR(KSPIE specific), NERVA(KSPIE modified), and, to keep it simple to use in a fresh campaign, the Flea booster

Flea Solid Rocket booster, stock: 200(116 w/o fuel, 84 fuel), Staputnik: 300

2.5 meter Flea: 1,600 (928, 672 fuel), 2.5m Stayputnik: 38 fund.
Recovery: -472 booster, 672 fuel, 300 Stayputnik.

5 meter Flea: 12,800  (7,424, 5376 fuel)(4X larger, 64X cost), 5 meter Stayputnik: 13 fund  
On Recovery:  -5,176 for the booster, 5,376 for the solid fuel.  300 for the 5m probe core.  Right from KSP's launch pad, 100% recovery.

Oh, figured out the formula:

Recovery Value is [original raw value w/supplies] - [adjusted fuel cost].  It needs to be switched from original to adjusted value w/supplies, if that makes sense.

 

 

Edited by firethorn6
clarify a bit
Link to comment
Share on other sites

15 hours ago, firethorn6 said:

I'm sorry, but first time poster, but I wasn't able to find this problem mentioned anywhere else.

Don't be, bug reports are what keep code tight.

I'll give a shot on a clean install, but in the mean time, it will help if you:

Fire up your rig; make a quick flight were the problem happens; close KSP and send me the KSP.log via dropbox or something.

Closing KSP is important because sometimes the file buffers are not flushed in time and I may loose some information.

-- -- -- POST EDIT -- -- --

Dude, you found something.

I made this simple test using the latest TweakScale release on KSPs 1.4.5, 1.7.3, .1.8.1, 1.10.1 and it worked fine on them:

109468175-0336f000-7a4b-11eb-84f7-adfd9e

109468703-bdc6f280-7a4b-11eb-8e02-ab0c58

109469917-7477a280-7a4d-11eb-972f-215b18

109474079-e0a8d500-7a52-11eb-8a75-e228a6

Well, let's check KSP 1.11.1, lots of thing broke on this release, and it appears we have a new problem on this terrible release:
109470945-d4227d80-7a4e-11eb-8b40-955048

BINGO. Something on KSP 1.11.x broke TweakScale.

Well... Apparently I will stop development again, and spend my free time hunting more bugs.  :/

-- -- POST POST EDIT -- -- 

Github issue: https://github.com/net-lisias-ksp/TweakScale/issues/169

Edited by Lisias
Did some tests. KSP 1.11.x broke TweakScale.
Link to comment
Share on other sites

9 hours ago, Lisias said:

I made this simple test using the latest TweakScale release on KSPs 1.4.5, 1.7.3, .1.8.1, 1.10.1 and it worked fine on them:

Oh, oops, I knew I forgot to mention something.  Version of KSP would have been good.  I'm playing on 1.11.0.3045.

No wonder it was missed.  Having to worry about multiple versions when you can't automate tests?  Ouch.

 

 

Link to comment
Share on other sites

5 hours ago, firethorn6 said:

Oh, oops, I knew I forgot to mention something.  Version of KSP would have been good.  I'm playing on 1.11.0.3045.

No wonder it was missed.  Having to worry about multiple versions when you can't automate tests?  Ouch.

It's not that bad as it appears. 90% of the time, it's something broke on the new KSP version, not on TweakScale!! :D 

Supporting multiple KSP versions is easy: older ones don't break. :/ 

(I'm zeroing on this one, and I don't like the smell of it)

-- -- POST EDIT -- -- 

Squad broke TweakScale (and a lot of other add'ons), and I don't see a way to fix this without reverse engineering - what's against forum rules.[found a way, I think. It's ugly but should work]

What happens is that, now, Squad is using values from the PREFAB for calculating the recovering funds instead of asking the Part itself for the current value.

The IPartCostModifier is still being called, but its value is not used anymore. Empirical tests demonstrated that the total cost of the part is being fetched from the PREFAB, but the amount of resources is still being calculated from the living part. With the PREFAB total cost calculated with an unscaled part (200F for the Flea), and the recovered resources being calculated from the living part (944F for a 2.8 meter scaled Flea), we found the reason you are getting -744 for the Flea part! 200 - 944 = -744!!!

This don't break only TweakScale, but EVERY ADD'ON that changes the value of the part after launch, as add'ons that introduce damage to the part.

This is nasty, sir. Add'On authors can't fight the Dev Team.

Full detais on https://github.com/net-lisias-ksp/TweakScale/issues/169

Edited by Lisias
Found the problem.
Link to comment
Share on other sites

19 hours ago, Lisias said:

 

This don't break only TweakScale, but EVERY ADD'ON that changes the value of the part after launch, as add'ons that introduce damage to the part.

This is nasty, sir. Add'On authors can't fight the Dev Team.

Full detais on https://github.com/net-lisias-ksp/TweakScale/issues/169

I'm not sure if itis meaningful or not to report bug on KSP bug tracker. Very few reported bugs are solved and on each update there is high chance to something else become broken.

Link to comment
Share on other sites

23 minutes ago, kcs123 said:

I'm not sure if itis meaningful or not to report bug on KSP bug tracker. Very few reported bugs are solved and on each update there is high chance to something else become broken.

To tell you the true, I'm afraid of reporting this and making things worse.

Fact: someone squashed the whole IPartCostModifier mechanism, by using the cost from the part's prefab while recovering the craft.

Fact: this is not the first time the living part's data is squashed by the prefab counterpart - effectively rendering the living part data useless.

Question: where else this is happening on KSP 1.11.x? By fixing this one, what else will break since apparently now is the norm to have living data squashed by the prefab?

Question: how Squad is managing damaged parts on recovery? Is this borked too? If not, what are they doing? And why they are ignoring the IPartCostModifier so?

Edited by Lisias
Tyops.
Link to comment
Share on other sites

1 hour ago, Lisias said:

To tell you the true, I'm afraid of reporting this and making things worse.

Fact: someone squashed the whole IPartCostModifier mechanism, by using the cost from the part's prefab while recovering the craft.

Fact: this is not the first time the living part's data is squashed by the prefab counterpart - effectively rendering the living part data useless.

Question: where else this is happening on KSP 1.11.x? By fixing this one, what else will break since apparently now is the norm to have living data squashed by the prefab?

Question: how Squad is managing damaged parts on recovery? Is this borked too? If not, what are they doing? And why they are ignoring the IPartCostModifier so?

All I see on the bug tracker is a big heap of confirmed bugs (but not mine, which they apparently haven't looked at), and zero progress on any of them... :(

EDIT: I needed to look harder. Wonder if they're going to patch, and if so, if they'd like to communicate about when that might be...

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