Jump to content

Trying to diagnose gambreaking lag. What does this ouput.log msg mean?


Recommended Posts

I get game-breaking lag when there's a vehicle within 2.5km of the space center and I try to launch a second instance of the same craft design on the runway. I'm doing this to try to diagnose a problem in kOS, but I can't get to the part where I diagnose the problem because of the game-breaking lag (My FPS is about 1/10 - That's one animation frame every 10 seconds) that happens whenever there's two instances of the craft both in existence within the loaded sphere (and annoyingly it doesn't happen with two vessels in orbit near each other - only when I launch to the runway does this happen.)

The only clue I have what's going on is this utterly inexplicable message in the output_log corresponding with loading the craft into the SPH editor:

("PartModule indexing mismatch at....")

I have no clue what a "PartModule indexing mismatch" is supposed to mean or what on earth I do about it.


------------------- initializing editor mode... ------------------

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

editor started

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[Part]: PartModule indexing mismatch at kOSMachine0m, index 0.
Node 'ModuleLight' found in loaded data, but 'kOSProcessor' is defined in prefab.
Looking for ModuleLight in other indices...

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

...ModuleLight module found at index 1.

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[Part]: PartModule indexing mismatch at kOSMachine0m, index 0.
Node 'ModuleLight' found in loaded data, but 'kOSProcessor' is defined in prefab.
Looking for ModuleLight in other indices...

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

...ModuleLight module found at index 1.

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Modular Rover KOS test loaded!

Later on, I get this message when the vessel is actually launched to the runway:

"PartModule <modulename> at <part name>, index <number>: index exceeds module count as defined in cfg."

And I get it for several different <modulename>'s and several different <part name>'s and several different <number>'s, spamming the log.

I've looked and I can't figure out which "cfg" file it's referring to, and which config setting is being exceeded.

Here's a small sample of the part in the log where it first starts:



[Part]: PartModule ModuleAeroReentry at dockingPort3, index 1: index exceeds module count as defined in cfg.
Looking for ModuleAeroReentry in other indices...

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

...no ModuleAeroReentry module found on part definition. Skipping...

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

PartModule is null.

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[Part]: PartModule ModuleAeroReentry at landerCabinSmall, index 7: index exceeds module count as defined in cfg.
Looking for ModuleAeroReentry in other indices...

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

...no ModuleAeroReentry module found on part definition. Skipping...

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

PartModule is null.

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[Part]: PartModule ModuleAeroReentry at batteryBank, index 0: index exceeds module count as defined in cfg.
Looking for ModuleAeroReentry in other indices...

Does anyone have a clue what on earth this message is trying to tell me?

Link to comment
Share on other sites

"PartModule indexing mismatch at...." appends when there is a difference between the module list in the save and the module list in the part definition. You get it when you add/remove a mod or when you use a mod that insert module in flight (Like FAR does).

It's not an error at all.

None of those looks like "real" errors.

Link to comment
Share on other sites

Could your problem be that two kOS instances on the two vessels are interfering with each other? In my experience, huge lag like that is only ever caused by a mod doing something way too heavy in (Fixed)Update. Log spam from (Fixed)Update can cause significant slowdown but is unlikely to be 10 seconds per frame...

Link to comment
Share on other sites

I've narrowed down the "PartModule indexing mismatch" message to only being caused when I've compiled a new DLL for kOS and installed it and then tried running a saved game that already had existing vessels in it with kOS parts on them that are loaded into full physics because they're parked within 2.5km of the launchpad.

I think I am seeing two unrelated errors. Because I still get the slowdown even when that message goes away.

It seems that launching a new vessel when one already exists within the "physics radius" of the launchpad or runway has both of these two unrelated issues:

1 - It prints messages to the log about mismatched Partmodule indexing if there was a kOS.DLL install update between the launching of the old and the new vessels.

2 - It creates enormous lag and kills frame rate if the old vessel had ever had any kOS commands executed on its terminal, regardless of whether there was a kOS.DLL update or not. Even using the same kOS.DLL as before triggers the problem. Also, if the previous vessel had no kOS commands run on it, there is no lag, even when kOS.DLL was updated between launches.

So they seem to be two utterly disconnected things.

Link to comment
Share on other sites

  • 1 year later...
On 9/25/2014 at 6:08 AM, sarbian said:

"PartModule indexing mismatch at...." appends when there is a difference between the module list in the save and the module list in the part definition. You get it when you add/remove a mod or when you use a mod that insert module in flight (Like FAR does).

Hey Sarbian, @Snark and I are having a conversation here about about the impact adding/removing modules when there exist multiple MODULE's of the same name in a part.  You mentioned FAR dynamically inserts (and removes?) modules in flight.  I'm wondering, does FAR always append its dynamic stuff to the "end" of a part's module list?  (So that it doesn't break indices of regular modules and trip up KSP?).  No specific issue here, I'm just somewhat new to all this and trying to better understand things.

ps. Sorry for resurrecting an old thread.

Edited by Fwiffo
Link to comment
Share on other sites

25 minutes ago, sarbian said:

and FAR code changed

Ah - was it refactored to avoid dynamically adding/removing modules?  These days, do mods generally avoid that?

I realize a lot of things have changed in the last two years :-).  The question came up because I recently noticed messages in my KSP.log (while doing a lot of iterative edits to a custom part I'm working on) which seemed to indicate the game was taking a stab at remapping part modules after my actions fouled up the indices.  It seemed to me this works fine when each part module has a unique name, but I wanted to know more about how the game handles situations where you have several of the same name (which IIRC is the case in at least one or two stock parts).  e.g. Does it just pick the first one, does it go in the same order, does it do more intense analysis of other properties to find closest match?

(I replied here just because your comment from two years ago was the closest lead I could find on the topic!  Can move my question to a new thread if that's better etiquette)

Edited by Fwiffo
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...