Jump to content

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


Lisias

Recommended Posts

  On 11/2/2018 at 7:22 PM, linuxgurugamer said:

I'll bet that they changed something in the API, from a simple variable to a get/set.  This happened before as well.

Expand  

That explains why sometimes merely recompiling the thing agains the new KSP libraries solves the problem!

Link to comment
Share on other sites

  On 11/2/2018 at 7:43 PM, linuxgurugamer said:

 Yes. 

This happened with at least one of my mods, Kronol vessel viewer, and a recompile fixed the problem.

Expand  

I did recompiled HulcamVDS (and the whole shebang on that test bed) for 1.4.3 , and still got that NRE Exception from inside PartModule.Load, so I didn't bothered to try the stunt again on 1.4.5.

Well, I already had set up the circus (as we say around here). It will cost me nothing doing it again.

Link to comment
Share on other sites

  On 11/2/2018 at 7:43 PM, linuxgurugamer said:

This happened with at least one of my mods, Kronol vessel viewer, and a recompile fixed the problem.

Expand  

Unfortunately, this is different. I fire up a KSP 1.5.1 (with MH) with TweakScale and "my" HullCameraVDS (instrumented to flood my log with messages), both recompiled against the KSP 1.5.1 libraries, and the misbehaviour persists.

The good news is that <part>.prefab.Modules is not null anymore (Squad acted on that, for sure), but the PartModule Exception is still happening.

  Reveal hidden contents

The following is the same DLL, still compiled against 1.4.5, but running on 1.4.3:

  Reveal hidden contents

And, finally, the very same DLL running on 1.4.1:

  Reveal hidden contents

The commit where the I added that messages is here.

AND THE 1.4.1 running the DLL compiled agains 1.4.5 behave exaclty as the other!! That was a surprise!. So I decided t recompile the whole shebang again, but agains the 1.4.1 libraries, and got THE EXACT SAME RESULTS.

I'm baffled, as 1.4.1 was running flawless this afternoon. :D But I have a theory, in this afternoon, the TweakScale running was the "Release" one, and now I'm running a DLL recompiled in Debug mode, with an awful amount of extra logging. This appears to corroborate my thesis of a race condition, as the extra logging is hugely delaying the processing - but I need to cross check this, by recompiling everything in Release mode. :D 

— — — — — — — 

TL;DR : Recompiling everything to 1.4.5 didn't solved the problem for any KSP version, the behaviour is consistent. Whatever the bug is, it was not solved on the most recent 1.4 series. And it does not involve a recompiling to solve it.

Worst, It not only breaks the offending code (as the feature is not installed!), but injects undesired colateral effects on the rest of the mods.

IMHO, the best line of action is decommissioning this code on HullCameraVDS, as it doesn't do what it intended (the kerbals don't get the EVACamera!) and breaks some KSP versions. At least, while we don't find a way to make the thing work as it should.  Module Manager cannot be used instead?

 

Edited by Lisias
FINALLY!
Link to comment
Share on other sites

I did something that I should had done before: listing the modules before the instrumentation. Got this:

  Reveal hidden contents

So… The action it is not harmless. It is injecting a unnamed (perhaps null?) module on the part's module list.

— POST — EDIT — 

Exactly!!! I update my repo with the last edit for the log.

 

[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules is not null
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has 11 modules.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module KerbalEVA.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleScienceExperiment.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleScienceExperiment.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleScienceContainer.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module FlagDecal.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleTripLogger.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleEvaChute.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleLiftingSurface.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleLiftingSurface.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module FlagDecal.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module <NULL!>.

We really need to find the root cause of this problem. It is injecting modules with a NULL on the name!

Edited by Lisias
MOAR INFO.
Link to comment
Share on other sites

  On 11/2/2018 at 10:51 PM, Lisias said:

I did something that I should had done before: listing the modules before the instrumentation. Got this:

  Reveal hidden contents

So… The action it is not harmless. It is injecting a unnamed (perhaps null?) module on the part's module list.

— POST — EDIT — 

Exactly!!! I update my repo with the last edit for the log.

 

[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules is not null
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has 11 modules.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module KerbalEVA.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleScienceExperiment.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleScienceExperiment.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleScienceContainer.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module FlagDecal.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleTripLogger.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleEvaChute.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleLiftingSurface.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module ModuleLiftingSurface.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module FlagDecal.
[LOG 20:04:03.649] HullcamVDS::InstrumentKerbals: kerbalEVAfemale.partPrefab.Modules has the module <NULL!>.

We really need to find the root cause of this problem. It is injecting modules with a NULL on the name!

Expand  

Do you think you might be able to see that module in a post ModuleManager dump?

Link to comment
Share on other sites

  On 11/3/2018 at 12:04 AM, TranceaddicT said:

Do you think you might be able to see that module in a post ModuleManager dump?

Expand  

I don't think so. This is being done after MM does its magic.

Both Tweakscale and HullcamVDS starts the offended/offending code when the main menu starts,.way after MM applied its last patch. 

(obviously, I need to confirm on the code, just in case - it was a tough day...)

Link to comment
Share on other sites

  On 11/2/2018 at 10:06 PM, Lisias said:

IMHO, the best line of action is decommissioning this code on HullCameraVDS, as it doesn't do what it intended (the kerbals don't get the EVACamera!) and breaks some KSP versions. At least, while we don't find a way to make the thing work as it should.  Module Manager cannot be used instead?

 

Expand  

Actually, it does work, I just tested it.

But, it doesn't really need to be done at runtime, so I'm removing that code and adding a MM script to do what it is doing

Just released it, get the right one from here:

https://github.com/linuxgurugamer/HullcamVDSContinued/releases/tag/0.1.9.8

Link to comment
Share on other sites

  On 11/3/2018 at 1:26 AM, linuxgurugamer said:

Actually, it does work, I just tested it.

Expand  

This information makes me yet more worried about the issue...

If the thing is working, the module is being attached correctly. So why by Kraken's sake a NRE is blowing up in PartModule.Load? :huh:

Concurrency appears to be the source of the problem, as moving the task to MM (that effectively owns the process at the loading time) will prevent the misbehaviour.

Link to comment
Share on other sites

  On 11/3/2018 at 7:17 AM, Lisias said:

This information makes me yet more worried about the issue...

If the thing is working, the module is being attached correctly. So why by Kraken's sake a NRE is blowing up in PartModule.Load? :huh:

Concurrency appears to be the source of the problem, as moving the task to MM (that effectively owns the process at the loading time) will prevent the misbehaviour.

Expand  

I released the fix last night, try it and see if it was solved

Link to comment
Share on other sites

  On 11/3/2018 at 2:09 PM, linuxgurugamer said:

I released the fix last night, try it and see if it was solved

Expand  

Yes, it is. No more kerbalEVA's related exceptions. [on TweakScale]

This issue is fixed, but the problem is not. This is a workaround - it's good enough for TweakScale, HullcamVDS , EVA Parachutes & Ejector Seat. What's is… Good enough. :D 

But since we don't know what caused it, we are still prone to it later (mainly, TweakScale, as I'm the the last guy on this chain!). Some more investigation is on the way, but  is very good to know there's a good, working, workaround available while we don't find the root cause. :) 

Edited by Lisias
hit "Save" too soon
Link to comment
Share on other sites

  On 11/3/2018 at 2:42 PM, Lisias said:

Yes, it is. No more kerbalEVA's related exceptions. [on TweakScale]

This issue is fixed, but the problem is not. This is a workaround - it's good enough for TweakScale, HullcamVDS , EVA Parachutes & Ejector Seat. What's is… Good enough. :D 

But since we don't know what caused it, we are still prone to it later (mainly, TweakScale, as I'm the the last guy on this chain!). Some more investigation is on the way, but  is very good to know there's a good, working, workaround available while we don't find the root cause. :) 

Expand  

change the code, so that instead of running at the main menu, run at the space center screen.  That will hopefully avoid any other race conditions

Link to comment
Share on other sites

  On 11/3/2018 at 8:10 PM, linuxgurugamer said:

change the code, so that instead of running at the main menu, run at the space center screen.  That will hopefully avoid any other race conditions

Expand  

Until someone else does the same. :)

well... The best quick'n'dirty solution is to go ModuleManager. If the add-on already uses it, it's the best possible solution.

About the ones that doesn't, or can't (by needing to change things on runtime), something else must be cooked.

 

Link to comment
Share on other sites

  On 11/3/2018 at 10:14 PM, Lisias said:

Until someone else does the same. :)

well... The best quick'n'dirty solution is to go ModuleManager. If the add-on already uses it, it's the best possible solution.

About the ones that doesn't, or can't (by needing to change things on runtime), something else must be cooked.

 

 

Expand  

Doing it the MM way also reduces the code size a little bit, since you don't need to have code which is adding modules at runtime

Link to comment
Share on other sites

That's weird, tweakscale doesn't load at all in version 1.5.1 for me. Didn't play since 1.4.4 so maybe i'm doing something wrong. Is there any mod/addon(?) incompatible with tweakscale that could prevent it from working?

Ooooo shiny stuff! That's doing the stockalike parts a bit harder to make.

Edit: actually MM wasn't loading... what the...
Now everything is working but still doesn't know what happened.

Edited by Mathrilord
Link to comment
Share on other sites

  On 11/5/2018 at 7:59 AM, Mathrilord said:

Edit: actually MM wasn't loading... what the...

Now everything is working but still doesn't know what happened.

Expand  

Glad it worked out, but also curious about the issue.

Did you used the embedded ModuleManager.dll?  Did you overwrote your previous one?

What happened or was done when things started to work finally?

Link to comment
Share on other sites

  On 11/9/2018 at 1:36 AM, Lisias said:

Glad it worked out, but also curious about the issue.

Did you used the embedded ModuleManager.dll?  Did you overwrote your previous one?

What happened or was done when things started to work finally?

Expand  

Nothing. Two try doesn't work, the next one was good. I didn't change anything. Sadly(or not) log have been overwrite and I've not been able to reproduce the bug without actually removing ModuleManager.

By the way while I was looking at the log I saw that:

OG 13:18:07.401] ValidateKspMinMax, KspVersionMin: 1.4.4, KspVersionMax: 1.4.8
or[LOG 13:18:07.410] KSP-AVC -> Identical remote version found: Using remote version information only.

or

[LOG99

Is that normal????

and lol (KAX)

[ERR 13:19:44.850] TweakScale::PrefabDryCostWriter: negative dryCost: part=size2Fuselage, DryCost=-3.814697E-05

Edited by Mathrilord
Link to comment
Share on other sites

  On 11/9/2018 at 5:37 AM, Mathrilord said:

Nothing. Two try doesn't work, the next one was good. I didn't change anything. Sadly(or not) log have been overwrite and I've not been able to reproduce the bug without actually removing ModuleManager.

Expand  

Probably the Memory Manager cache. The (standard) MM save some files on the same directory the ModuleManager.dll to save some loading time, all of them starting with "modulemanager<someting>". We call them "cache". Sometimes, MM fails to detect that the cache is invalid, and use it nevertheless - what can cause many different problems. Deleting the cache fix the issue.

My guess is that, somehow, MM detected the situation on the second failure and deleted the cache itself on the third.

 

  On 11/9/2018 at 5:37 AM, Mathrilord said:

OG 13:18:07.401] ValidateKspMinMax, KspVersionMin: 1.4.4, KspVersionMax: 1.4.8
or[LOG 13:18:07.410] KSP-AVC -> Identical remote version found: Using remote version information only.

Expand  

Yes, this is normal. It's just KSP-AVC logging up what it's doing, so if something gets wrong later, we can track down if the add-on version if the adequate one.

 

  On 11/9/2018 at 5:37 AM, Mathrilord said:

and lol (KAX)

[ERR 13:19:44.850] TweakScale::PrefabDryCostWriter: negative dryCost: part=size2Fuselage, DryCost=-3.814697E-05

Expand  

Np, this is not normal. And it's good that you reported it. I use KAX too, but "mine" doesn't renders these errors - it's B9 parts the victims on my installation.

Long history made short: it's not something that TweakScale neither KAX (or B9) is doing wrong. It's something that no one is doing right. Technically, it's a "race condition", when more than one code wants to mangle the same thing on the computer. It's like many cars trying to run on  crossroad disregarding the others - sooner or later, a collision will happen.

In our case, obviously, there're no real collisions. But someone was instrumenting KAX (perhaps KAX itself, but can be any other add-on) at the same time TwekScale was. My current guess is that TweakScale gets a ConfigNode for the part that was recently recreated, but not yet repopulated - and then it gets a Zero on a field in which we expect the mass (as the other guy didn't filled the values yet).

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

  On 11/9/2018 at 1:11 PM, Lisias said:

Yes, this is normal. It's just KSP-AVC logging up what it's doing, so if something gets wrong later, we can track down if the add-on version if the adequate one.

Expand  

Actually I was asking if it's normal that some line of the log start with with missing bracket ( [ ) and non sensible letter or number. It's a bit like if there was a computer error that mix binary or hexadecimal or something. I want know because on my other computer(this one is new) I had one of the four ram array that was broken/desynchronized returning wrong value and it was slowly corrupting all my computer.

For KAX bug, I've been exploiting it secretly for the challenge Kerbal Express Airlines because who can say no to free parts! :ph34r: :cool:

Link to comment
Share on other sites

  On 11/9/2018 at 6:55 PM, Mathrilord said:

Actually I was asking if it's normal that some line of the log start with with missing bracket ( [ ) and non sensible letter or number. It's a bit like if there was a computer error that mix binary or hexadecimal or something. I want know because on my other computer(this one is new) I had one of the four ram array that was broken/desynchronized returning wrong value and it was slowly corrupting all my computer.

Expand  

Oh… That… :P 

No, it's not and this is the first time I saw something like that on KSP. This usually happens when two or more threads try to write on the same buffer at the same time (another treading problem), but can be something else.

Corrupted RAM usually adds a lot of unintelligible garbage on data streams, but it can happen that the bad RAM could mess the threading arbitrator's data too. But… I'm wild guessing.

Add a bunch of heavy mods to a copy of your installment and see what happens. Abusing the free RAM usually make something blows early when you have some bad RAM on the system.

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