Modular Rocket Systems (MRS) by Orvidius

Modular Rocket Systems (MRS) by Orvidius

128k Downloads

[Bug 🐞]: Lander leg missing ModuleWheelDamage, causes IVA mods (MAS/ASET) to crash

tofof opened this issue Β· 5 comments

commented

Brief description of your issue (aka the problem)

IVA mods crash when they try to read ModuleWheelDamage on landing gear that don't have it.

See e.g. this line, responsible for MAS crashing: https://github.com/MOARdV/AvionicsSystems/blob/f14d66b0e7a71e271df32520e5f3ab053e93669a/Source/MASVesselComputerModules.cs#L1342

This causes IVA cockpit panels to become nonfunctional.

Solution

Add the following (or other appropriate values, these were borrowed from Squad\landingLegLT-5.cfg) to NBlandingLeg1.cfg:

	MODULE
	{
		name = ModuleWheelDamage
		baseModuleIndex = 0
		
		stressTolerance = 99999999
		impactTolerance = 40
		deflectionMagnitude = 1
		deflectionSharpness = 2.0
		slipMagnitude = 0
		slipSharpness = 2.0
		explodeMultiplier = 1.0
	}

Operating system

Win11

KSP version

1.12.5

Version of addon

Version 1.13.2.0-release <Archival>

Steps to reproduce the behavior or issue

Mods (CKAN)

  • Avionics Systems (moarDV) 1.3.6
  • Vexarp IVA 0.6.1
  • Near Future Spacecraft 1.4.3

Mods (not CKAN πŸ‘Ž )

  • This mod, Version 1.13.2.0-release <Archival>

Mk3b Pandora pod + MRS Landing leg, go IVA, click buttons on panels and they're nonfunctional.
Mk3b Pandora pod + stock legs, go IVA, functional

ksp.log showing:

IndexOutOfRangeException: Index was outside the bounds of the array.
AvionicsSystems.MASVesselComputer.UpdateGear () (at <2bb05d285e56479a9e9bde992b09bb1d>:0)
AvionicsSystems.MASVesselComputer.UpdateModuleData () (at <2bb05d285e56479a9e9bde992b09bb1d>:0)
AvionicsSystems.MASVesselComputer.RefreshData () (at <2bb05d285e56479a9e9bde992b09bb1d>:0)
AvionicsSystems.MASVesselComputer.Awake () (at <2bb05d285e56479a9e9bde992b09bb1d>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.GameObject:AddComponent()
AvionicsSystems.MASPersistent:FetchVesselComputer(Vessel)
AvionicsSystems.MASFlightComputer:Start()

Expected behavior

Legs have required modules used by all other landing leg mods and don't cause crashes in other mods

Actual behavior

No response

Environment

You ask for literally each of these pieces of info elsewhere

Log files

KSP.log

Screenshots

No response

Additional context

No response

How did you download and install this?

GitHub release .zip (advanced manual installation)

commented

πŸ‘ Thank you @tofof :octocat:

❓❔

Have you reviewed the open issues logs and recent changelogs?

In order to help us help you, please provide:

  • <KSP_ROOT>/KSP.LOG
  • and one of the following:
    • if Module Manger is installed
      • <KSP_ROOT>/GameData/ModuleManager.ConfigCache
    • if Module Manger /L is installed
      • <KSP_ROOT>/PluginData/ModuleManager/ConfigCache.cfg
  • Screenshots of issue (if appropriate) (images tell a much stronger tale)

You can archive these files (rar or zip, sadly no 7zip) and drag-n-drop them into an issue comment

πŸ“³πŸ‘€Please either watch this repositiory for updates.

πŸ’¬Kindly read our simple guides to:

commented

If IVA mods crash when parts don't have the ModuleWheelDamage module, perhaps they should check if the part have the module before trying to use it?

commented

Yes, they should do that. Just like how parts packs should define all the appropriate modules.

this parts pack was released for KSP 1.4.5 and is in the process of updating it to 1.12.x;

Should define IF they are needed; and I still haven't determined that. ModuleWheelLock isn't defined in the mentioned part, but not having it doesn't lock up the MAS/RPM IVA screen.

Just a conversation, partly because this is the first I've heard about this and I have approaching 200 addons (about 150 published, and the rest on the way) with about 80% being parts addons.

Still glad to know - and something learned. Hopefully you also posted a bug report on MAS/RPM to let them know. Just trying to find the root cause/best solution which is why bug reporting is encouraged. πŸ™‚

My plan is still the same - a hotfix to push the module manager patch for this part; and will review/update both the patch and the part when I get to updating/including this part in the new release.

commented

Yes, they should do that. Just like how parts packs should define all the appropriate modules.

commented

@tofof Thank you for the bug report! Am looking into it.

If IVA mods crash when parts don't have the ModuleWheelDamage module, perhaps they should check if the part have the module before trying to use it?

Thank you, @Lisias My thoughts exactly.

I will add a RPM/MAS compatibility patch that adds a blank part module if RPM/MAS is installed. This is just until I can update the part which is planned in the next couple of updates.