Jump to content

[1.1.2] Kerbal Inventory System (KIS) 1.2.12


KospY

Recommended Posts

Hey kerbonauts. I've seen reports on my thread, but I haven't seen any stack traces yet. I'm happy to take a look at how to improve the compatibility with the stock bug fixes, if folks happen to have the traces (or an indication of where the incompatibility is). In the past, I've had to rename modules and such to prevent mod compatibility issues. So I'm open to insights as to what needs work.

Cheers,
~Claw

Link to comment
Share on other sites

1 hour ago, Claw said:

Hey kerbonauts. I've seen reports on my thread, but I haven't seen any stack traces yet. I'm happy to take a look at how to improve the compatibility with the stock bug fixes, if folks happen to have the traces (or an indication of where the incompatibility is). In the past, I've had to rename modules and such to prevent mod compatibility issues. So I'm open to insights as to what needs work.

Cheers,
~Claw

Hello! If my guess is right you're here because of "Stock bug Fix Modules & Stockplus". If so here are the relevant stack traces:
 

160608T014554.869 [ERROR] [ConfigNode.CleanupInput] Input is null
   at System.Environment.get_StackTrace()
   at ConfigNode.CleanupInput(System.String value)
   at ConfigNode.AddValue(System.String name, System.String value)
   at PartModule.Save(.ConfigNode node)
   at ProtoPartModuleSnapshot..ctor(.PartModule module)
   at ProtoPartSnapshot..ctor(.Part PartRef, .ProtoVessel protoVessel)
   at KIS.KIS_Shared.PartSnapshot(.Part part)
   at KIS.KIS_Item..ctor(.Part part, KIS.ModuleKISInventory inventory, Single quantity)
   at KIS.ModuleKISInventory.AddItem(.Part part, Single qty, Int32 slot)
   at KIS.ModuleKISInventory.GuiHandleEmptySlot(Rect textureRect, Int32 slotIndex)
   at KIS.ModuleKISInventory.GuiInventory()
   at KIS.ModuleKISInventory.GuiMain(Int32 windowID)
   at UnityEngine.GUILayout+LayoutedWindow.DoWindow(Int32 windowID)
   at UnityEngine.GUI.CallWindowDelegate(UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)
160608T014554.872 [EXCEPTION] [BaseFieldList.Save] NullReferenceException: Object reference not set to an instance of an object
   at BaseFieldList.Save (.ConfigNode node)
   at PartModule.Save (.ConfigNode node)
   at ProtoPartModuleSnapshot..ctor (.PartModule module)
   at ProtoPartSnapshot..ctor (.Part PartRef, .ProtoVessel protoVessel)
   at KIS.KIS_Shared.PartSnapshot (.Part part)
   at KIS.KIS_Item..ctor (.Part part, KIS.ModuleKISInventory inventory, Single quantity)
   at KIS.ModuleKISInventory.AddItem (.Part part, Single qty, Int32 slot)
   at KIS.ModuleKISInventory.GuiHandleEmptySlot (Rect textureRect, Int32 slotIndex)
   at KIS.ModuleKISInventory.GuiInventory ()
   at KIS.ModuleKISInventory.GuiMain (Int32 windowID)
   at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
   at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)

As you may notice problem starts from `ProtoPartSnapshot` constructor. KIS uses protos and prefabs a lot! If they fail to do the job then KIS fails as well.

In both cases above the issue is in BaseFieldList class: for a reason some modules in prefab have it half-initialized. To be more specific, member `BaseFieldList._fields` is null. When `ProtoPartSnapshot` goes thru modules to save their fields it attempts to get enumerator and fails with NRE. I solve this issue by calling `Awake()` on `PartModule` via reflection. It does the right initialization, and proto part doesn't fail. Another (but related) problem is nulls in `[KSPField]` annotated fields. Looks like persisting code doesn't like it badly so, again, I fix it via reflection by setting to a default non-null value (e.g. field "controlSrcStatusText" in ModuleCommand is set to an empty string).
 

UPD: The errors above is a result of getting snapshot for "Probodobodyne HECS" with the mod installed and my fixes turned off. If I call "Awake" on the module prior to get the snapshot then everything is working fine.

UPD2: Here is the code that does the cleanup.

Edited by IgorZ
Link to comment
Share on other sites

8 hours ago, IgorZ said:

@Rob2222 @Bishop149 @cyberpunkdreams @StevieC

Guys, please try this patch.

  • Detection of the uninitialized modules is now dirty but much more reliable. It should catch all the possible cases.
  • Logging is improved. The module that fails to cooperate with KIS will now be logged.
  • If bad module cannot be fixed it's removed from the part with an error message thrown into logs. Please, check the logs even if you think everything is working fine. There must be no errors from KIS. There will be warnings but if they start from word "WORKAROUND" then you're OK.

On my test setup it works fine. At least in the editor and on the launch pad.

 

 

Sorry.. didn't read up the forum to know what the original problems were, but this patch fixed some exceptions I was getting when putting some items in containers while in VAB

 

[LOG 15:07:17.765] Start pickup in mode Move from part: SEP.solarPanel (Part)
[EXC 15:07:20.065] NullReferenceException: Object reference not set to an instance of an object
    BaseFieldList.GetEnumerator ()
    KIS.KIS_Shared.CleanupFieldsInModule (.PartModule module)
    KIS.KIS_Shared.CleanupModuleFieldsInPart (.Part part)
    KIS.KIS_Shared.PartSnapshot (.Part part)
    KIS.KIS_Item..ctor (.Part part, KIS.ModuleKISInventory inventory, Single quantity)
    KIS.ModuleKISInventory.AddItem (.Part part, Single qty, Int32 slot)
    KIS.ModuleKISInventory.GuiInventory (Int32 windowID)
    KIS.ModuleKISInventory.GuiMain (Int32 windowID)
    UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
    UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)

 

The exception is gone and items gets transfered to container now, thanks!

Link to comment
Share on other sites

Hey, guys! I need you help.

Could you please suggest a mod that introduces a crewed pod part with no IVA? The mods I usually use do define IVA but this use-case is already covered. I need the other one: no IVA in the part.

Also, I'll be appreciated for suggesting a mod which you believe is worst compatible with KIS with regard to transferring crews' inventories. I'm doing some enhancements to eliminate the need for authors to support seats' inventories. But I need real test targets to prove my changes work as expected.

Link to comment
Share on other sites

Ok, how in the name of jibbering hell do I attach an explosive to something. I 've spent 15 minutes trying to work it out and there's nowt useful in the manual

It used to work like any other radial part, equip screwdriver, drag from inventory and X. Now that doesn't attach it, it just floats off. I see you can now "equip" explosives as you can the screwdriver, but it alwys goes in the left hand and doesn't seem to DO anything.

I'm likely just being dense, but I've tried everything I can think of, equipped, not equipped, tool, no tool, X, H etc

Edit: Regarding pods with no IVA, I think most of the crewed parts in USI's Kolonisation Systems don't have an IVA (yet)

Edited by Bishop149
Link to comment
Share on other sites

21 minutes ago, Bishop149 said:

Ok, how in the name of jibbering hell do I attach an explosive to something. I 've spent 15 minutes trying to work it out and there's nowt in the manual

It used to work like any other radial part, equip screwdriver, drag from inventory and X. Now that doesn't attach it, it just floats off. I see you can now "equip" explosives as you can the screwdriver, but it alwys goes in the left hand and doesn't seem to DO anything.

User manual says explosives can be attached without tools. And isn't H the attach key?

Someone can tell if I'm wrong about that. Can't test this out myself right now.

Link to comment
Share on other sites

On ‎6‎/‎7‎/‎2016 at 10:02 PM, IgorZ said:

@Rob2222 @Bishop149 @cyberpunkdreams @StevieC

Guys, please try this patch.

  • Detection of the uninitialized modules is now dirty but much more reliable. It should catch all the possible cases.
  • Logging is improved. The module that fails to cooperate with KIS will now be logged.
  • If bad module cannot be fixed it's removed from the part with an error message thrown into logs. Please, check the logs even if you think everything is working fine. There must be no errors from KIS. There will be warnings but if they start from word "WORKAROUND" then you're OK.

On my test setup it works fine. At least in the editor and on the launch pad.

 

 

I do *NOT* have Stock Bug Fixes etc installed. I *do* have DRE installed, and I was also unable to add parts into inventories. I grabbed the patch and replaced the KIS.dll with it, and voila, inventory access restored. Thank you!

Link to comment
Share on other sites

6 hours ago, eightiesboi said:

I do *NOT* have Stock Bug Fixes etc installed. I *do* have DRE installed, and I was also unable to add parts into inventories. I grabbed the patch and replaced the KIS.dll with it, and voila, inventory access restored. Thank you!

Sounds like the symptoms I'm currently struggling with: In the editor, I can't drag & drop items from the part list into container inventories; I can drag & drop stuff once it's mounted on the rocket, but that workaround does not work for the screwdriver (which I guess is pretty essential; I'm just beginning to experiment with KIS), since it can't be mounted to the rocket.

Like eightiesboi, I have Deadly Reentry installed, but not Stock Bug Fixes.

Since I'm using CKAN, I don't know if simply throwing in the newest patch is an option for me. Any ETA for it to make it into CKAN?

Link to comment
Share on other sites

On 6/8/2016 at 1:02 AM, IgorZ said:

@Rob2222 @Bishop149 @cyberpunkdreams @StevieC

Guys, please try this patch.

  • Detection of the uninitialized modules is now dirty but much more reliable. It should catch all the possible cases.
  • Logging is improved. The module that fails to cooperate with KIS will now be logged.
  • If bad module cannot be fixed it's removed from the part with an error message thrown into logs. Please, check the logs even if you think everything is working fine. There must be no errors from KIS. There will be warnings but if they start from word "WORKAROUND" then you're OK.

On my test setup it works fine. At least in the editor and on the launch pad.

 

 

Working flawlessly, @IgorZ

Link to comment
Share on other sites

2 hours ago, Christoph Lipka said:

Since I'm using CKAN, I don't know if simply throwing in the newest patch is an option for me. Any ETA for it to make it into CKAN?

Totally should be OK to throw the patch in.

As far as I know, CKAN only tracks filenames, not filesizes or anything else. Just download the new DLL, rename it to KIS.dll, and stick it in GameData\KIS\Plugins. As far as CKAN is concerned, nothing will have changed. You should be able to remove/upgrade the mod in CKAN as normal.

If you're concerned, you can keep the original KIS.dll as a backup if you give it a different extension or move it somewhere else.

Link to comment
Share on other sites

15 hours ago, IgorZ said:

Hey, guys! I need you help.

Could you please suggest a mod that introduces a crewed pod part with no IVA? The mods I usually use do define IVA but this use-case is already covered. I need the other one: no IVA in the part.

Also, I'll be appreciated for suggesting a mod which you believe is worst compatible with KIS with regard to transferring crews' inventories. I'm doing some enhancements to eliminate the need for authors to support seats' inventories. But I need real test targets to prove my changes work as expected.

Not sure if it is what you are asking for, but C2-B Horizon cockpit from KAX mod does not have finished IVA.
It is possible to get into IVA for this cockpit, but dials are placed just like somone throw them there, probably from raster proper monitor mod, does not produce CTDs, so some small part of IVA is defined somewhere.

Don't know if that can help or not though.

Link to comment
Share on other sites

18 hours ago, IgorZ said:

Hey, guys! I need you help.

Could you please suggest a mod that introduces a crewed pod part with no IVA? The mods I usually use do define IVA but this use-case is already covered. I need the other one: no IVA in the part.

Also, I'll be appreciated for suggesting a mod which you believe is worst compatible with KIS with regard to transferring crews' inventories. I'm doing some enhancements to eliminate the need for authors to support seats' inventories. But I need real test targets to prove my changes work as expected.

I don't think Orbital Utility Vehicle has an IVA:

 

Link to comment
Share on other sites

23 hours ago, IgorZ said:

Hey, guys! I need you help.

Could you please suggest a mod that introduces a crewed pod part with no IVA? The mods I usually use do define IVA but this use-case is already covered. I need the other one: no IVA in the part.

Also, I'll be appreciated for suggesting a mod which you believe is worst compatible with KIS with regard to transferring crews' inventories. I'm doing some enhancements to eliminate the need for authors to support seats' inventories. But I need real test targets to prove my changes work as expected.

You could always remove some IVA's with an MM patch.

The mod with the worst KIS issues for crew inventory that immediately springs to mind is actually UKS - the inflatable parts (most of the MK-V line) delete the inventory of any Kerbal who enters them.  (Which causes some issues, as they are largely designed to be placed via KIS...)

Link to comment
Share on other sites

Are there any easy methods of detecting when a part is attached or detached from a vessel from the part's perspective? Essentially, I have a part that modifies the behaviour of another part if it is present on the same vessel and I would like to be able to detect any changes made to the vessel by KIS in a lightweight manner. Is OnStart or OnLoad called when a part is attached by KIS? How about when it is removed?

Link to comment
Share on other sites

@kcs123 @cyberpunkdreams @DStaal

Thank you for the suggestions! I'll use these mods as my primary test targets.

11 hours ago, Booots said:

Are there any easy methods of detecting when a part is attached or detached from a vessel from the part's perspective? Essentially, I have a part that modifies the behaviour of another part if it is present on the same vessel and I would like to be able to detect any changes made to the vessel by KIS in a lightweight manner. Is OnStart or OnLoad called when a part is attached by KIS? How about when it is removed?

Attach/detach part events are handled via common KSP mechanism. Register for evens "GameEvents.onPartAttach" and "GameEvents.onPartRemove". Alternatively, you can listen for KIS event "OnKISAction" but there are cons:

  1. You'll have to deal with its parameters to figure out what happen.
  2. It's not a public API, it can change at any moment without warning.
Link to comment
Share on other sites

Yyou might also check Fantom Works. It is for KSP 1.0.5., but cockpits and fuselages should work in KSP 1.1.2.
I forgot the name of this mod, but Deimos Rast just posted link in KAX thread about it. Might serve a purpose for testing KIS too.

Link to comment
Share on other sites

New version v1.2.11 is released. It only has fixes. Unless critical issues are found this is the last 1.2.x version. Next version will be 1.3 where I'm going to significantly refactor the approach to the pod's inventories. The main goal is to support pods with variable seats number completely transparently. It's a significant change which may (but not required to) be incompatible with the previous versions.

Link to comment
Share on other sites

On 6/7/2016 at 5:45 AM, AlexGodbehere said:

Hi All. This may be a known bug, but I couldn't seem to find anything regarding it. Upon loading a save of a Duna base, all struts, pipes and ground pylons suddenly break and flip up into the air. Is this expected behavior due to the nature of the KSP saves, or is there something I can do about it?

http://imgur.com/luZxhaZ

 

Edit: I'm not actually sure if this falls under KIS or KAS. Let me know if its the latter and I'll move it.


    As stated before, it is a known issue.  That said, I have a large base on the Mun (20+ buildings and ships) connected together with KAS and I have a rule of thumb that I use:
   ... always connect and disconnect along the linear 'chain'.  In other words, the last thing you connected should be the first thing you disconnect.  Like a 'stack' of plates.

    If you disconnect or connect somewhere in the middle, it is much more likely to send everything flying into the air for a fireworks show. 
    It also seems to depend which direction you attach to.  The larger section is situated on the ground and if anything needs to bounce around a bit, it is the smaller one I just added. 

    If I follow this rule of thumb, my base does just fine.  That also means that if I want to disconnect something further down the chain, I must disconnect everything leading to it, and then reconnect leading back out.  One after another... in a linear chain.

     Another thing that I see happen occasionally if I link more than 2 lines to a single ship/building is that the connector becomes a permanent part of the ship/building.  When I disconnect it, the ship now has its axis origin of the mass at the point of the connector making it impossible to fly the ship without veering in the direction of the connector.  There seems to be no way to remove the connector as I must destroy everything attached to it first.  That is my biggest headache and can only be fixed with a reload (unless there is a fix that I am unaware of).

     Perhaps others have different experiences, but for me, this has been the easiest way to play without needing to reload often from, as they refer to it... the Kraken.

Edited by SCESW
Link to comment
Share on other sites

12 hours ago, SCESW said:

There seems to be no way to remove the connector as I must destroy everything attached to it first.  That is my biggest headache and can only be fixed with a reload (unless there is a fix that I am unaware of).

There is such a way: feature "disconnect". Hover mouse on the part the connector is attached to and hold key "X". You'll see this part and the connector highlighted. Then, click left mouse and the hovered part will disconnect from its root, which is the connector in this case.

Link to comment
Share on other sites

Are there any known mod incompatibilities with KIS? I'm attempting to add things into "seat 1 inventory" in the SPH and the parts are dropping behind the inventory UI instead of dropping into inventory.

I'll get a output log when I boot up tonight.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...