Jump to content

[Minimum KSP version - 1.12] Kerbal Inventory System (KIS) v1.29


IgorZ

Recommended Posts

After a long a trial and error path, I've found a pattern for my game:

  1. Open VAB with no vessel in it.
  2. Add IMC-22K as a root part.
  3. Add another IMC-22K on top of it (the manufacturer doesn't recommend doing it, btw).
  4. Remove and dispose the part from step #3
  5. Repeat steps #3-#4 tree times.
  6. Crashed!

I'm working to find out WHY the hell it's happening.

UPDATE. You may need to repeat step #5 more than 3 times. In my further testing it ranges from 3 to 9.

Edited by IgorZ
Link to comment
Share on other sites

1 hour ago, IgorZ said:

After a long a trial and error path, I've found a pattern for my game:

  1. Open VAB with no vessel in it.
  2. Add IMC-22K as a root part.
  3. Add another IMC-22K on top of it (the manufacturer doesn't recommend doing it, btw).
  4. Remove and dispose the part from step #3
  5. Repeat steps #3-#4 tree times.
  6. Crashed!

I'm working to find out WHY the hell it's happening.

Hey @IgorZ maybe this will help a little?

Steps:

  1. Loaded up KSP, I got the IMC-22K on and 10 times before I crashed.
  2. Reloaded, Using MemGraph, linked below, and padding the heap with 1GB I got the IMC-22K on and off 39 times.  Then crashed.
  3. Reloaded, did not pad using MemGraph.  11 times. Crashed.
  4. Changed MemGraph's settings in padheap.cfg from total of 1024 to 2048, so now adding 2GB. 
  5. Reloaded, padded, 69 times (lol, sorry, its true :) ).  Crashed.

 

Now, maybe I got a little faster with my clicking... but I don't think enough for that.

I should note this is on my work-in-progress modded 1.6.  But I've been playing and modding for long time.  No errors in my logs except for a few type mismatches from IFS/KSPIE.  As for MemGraph, Sarbian and Padishar and now Linuxgamer did all the hard work, but I volunteered as lead guinea pig, lol.

Hope it helps.  Thanks much for KAS and KIS, I don't play without them. :)

 

Edited:

Also should note, nothing of any value in the crash log or the KSP.log or output_log except the following from output_log.txt (which I'm sure you're getting as well, but for the sake of completeness):

========== OUTPUTING STACK TRACE ==================

  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF79E501C93)
0x00007FF79E501C93 (KSP_x64) 
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF79E2E1D03)
0x00007FF79E2E1D03 (KSP_x64) 
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF79E2B5F68)
0x00007FF79E2B5F68 (KSP_x64) 
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF79E5EC382)
0x00007FF79E5EC382 (KSP_x64) 
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF79E5ED235)
0x00007FF79E5ED235 (KSP_x64) 
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF79E5FD611)
0x00007FF79E5FD611 (KSP_x64) 
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF79E7A431C)
0x00007FF79E7A431C (KSP_x64) 
0x0000000041B54FC2 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Object:DestroyImmediate (UnityEngine.Object,bool)
0x0000000041B54F1F (Mono JIT Code) UnityEngine.Object:DestroyImmediate (UnityEngine.Object)
0x0000000059B967E5 (Mono JIT Code) KIS.KIS_IconViewer:Dispose ()
0x0000000059BD4464 (Mono JIT Code) KIS.KIS_IconViewer:Finalize ()
0x00000000055384B9 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr)
0x00007FFAF97282F1 (mono) mono_gc_is_finalizer_thread
0x00007FFAF984BD7E (mono) mono_unity_class_get
0x00007FFAF9728625 (mono) mono_gc_is_finalizer_thread
0x00007FFAF9793B87 (mono) mono_thread_interruption_request_flag
0x00007FFAF9848E77 (mono) mono_unity_class_get
0x00007FFB3BCB3DC4 (KERNEL32) BaseThreadInitThunk
0x00007FFB3D573691 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

**** Crash! ****

 

Edited by Tig
Link to comment
Share on other sites

@Tig You'd be laughing, but the  output_log.txt is not updating on my system. I don't know the reason, but it's time stamped in 2018.

Anyawas, the game crashing issue is indeed the issue of the new KIS. It's now a recognized bug. I assure you, with the steps to reproduce it's only a matter of time when it will get fixed. Hopefully, it won't take more than a couple of days.

Link to comment
Share on other sites

1 hour ago, IgorZ said:

@Tig You'd be laughing, but the  output_log.txt is not updating on my system. I don't know the reason, but it's time stamped in 2018.

Anyawas, the game crashing issue is indeed the issue of the new KIS. It's now a recognized bug. I assure you, with the steps to reproduce it's only a matter of time when it will get fixed. Hopefully, it won't take more than a couple of days.

I've heard about a bug in Unity on some systems with the log file.  You can use the command line -logFile <pathname> to put it wherever you want.  Some use it just for the convenience of not having to dig through the appdata folder after one of the updates.

I did some more testing..  I'm very suspicious that the crash is happening when the garbage collector runs after having removed a container or two.  I don't think its the number of containers so much as it is the timing of when the GC runs after having removed them.  Even with padding the heap the game will crash for me if I add and remove a few containers and then just do nothing, waiting for a GC.  The game is crashing for me (after having deleted containers) shortly after the current heap size exceeds the prior maximum by 30-40ish MB which in my experience is when the GC gets run. 

Link to comment
Share on other sites

1 hour ago, IgorZ said:

@Tig You'd be laughing, but the  output_log.txt is not updating on my system. I don't know the reason, but it's time stamped in 2018.

That could be because in a recent KSP update, Squad moved the output_log.txt file from the KSP directory to a user profile directory.

For me on Windows 10, it lives in "C:\Users\<username>\AppData\LocalLow\Squad\Kerbal Space Program\output_log.txt".  You could also check the guide at the link in my signature.

Link to comment
Share on other sites

Hi all,

just wondered those days why my game keeps on crashing randomly in the VAB.  I think I found the reason ( "Tig´s" logfile looks pretty identical to mine). I´m glad to see that you ´re already working on it.

 

Btw I really like the color scheme integration of the kis parts!  

Link to comment
Share on other sites

10 hours ago, IgorZ said:

2All. I've nailed down the problem! I still don't know what makes the game crashing, but I've found the piece of code that is responsible. Stay turned.

From the descriptions of adding memory my first guess would be you have a memory leak of some kind.  Yes, you can leak in .NET

Link to comment
Share on other sites

KIS 1.7  is seriously breaking and crashing in  KSP. 1.6.1, suggest no one use it.

A)  Module KISCollider added to ship.craft files breaks backwards compatibility.
B)  Possibly related , ships with parts like engines pre-attached (e.g. via KAS) directly to docking ports separate violently on switch to ship.
C)  Possibly related crashes disappear with down-grade to KIS 1.6
D)  Suggest setting.cfg option to disable KISCollider use and inclusion in ship.craft files.

 

Link to comment
Share on other sites

1 hour ago, krbolson said:

A)  Module KISCollider added to ship.craft files breaks backwards compatibility.

Could you, please, clarify how exactly it breaks compatibility? This module is only added to one part (gigantor solar panel), and it's done via MM patch. If you uninstall KIS, then the only expected inconvenience is a warning record in the log when loading the affected part. Have you expected anything more sever that that? What are the reproducing steps?

1 hour ago, krbolson said:

B)  Possibly related , ships with parts like engines pre-attached (e.g. via KAS) directly to docking ports separate violently on switch to ship.

It should not. No engine parts were ever affected by KIS (in any version). Please, give concrete examples.

1 hour ago, krbolson said:

C)  Possibly related crashes disappear with down-grade to KIS 1.6

https://github.com/ihsoft/KIS/issues/303#issuecomment-459272048. It's only 4 posts above yours :(

1 hour ago, krbolson said:

KIS 1.7  is seriously breaking and crashing in  KSP. 1.6.1, suggest no one use it.

To be more accurate, it's 1.17.

Edited by IgorZ
Link to comment
Share on other sites

Uh oh! A couple of posts had to get squished from this thread. People do sometimes say things that come across as unkind, but the rest of us to well to assume the best and just let it go. Rule-breaking posts can be reported, but let's not all pile on someone for an unfortunate choice of words. Is that OK?

Link to comment
Share on other sites

3 hours ago, Deddly said:

Uh oh! A couple of posts had to get squished from this thread. People do sometimes say things that come across as unkind, but the rest of us to well to assume the best and just let it go. Rule-breaking posts can be reported, but let's not all pile on someone for an unfortunate choice of words. Is that OK?

Aye sir

Link to comment
Share on other sites

1.18 (February 2nd, 2019):

  • [Change] Add an optional (yet) patch file to make the legacy KIS containers physics compliant. See file kis_physical_containers.cfg.txt.
  • [Enhancement] Add French localization.
  • [Enhancement] Improve English part descriptions.
  • [Enhancement] Add IWC-4500 "Wyvern" part.
  • [Fix #297] IMC-15K has wrong part volume.
  • [Fix #301] "volumeOverride" is not working.
  • [Fix #302] Structurel panel has wrong nodes.
  • [Fix #303] Game's crashing on the new parts.

I know, many people were disappointed by the game crashing bug. I'm sorry. I was disappointed too :)  I didn't know how easy it is to make Unity crashing from the managed code (now I know exactly how to do it). On a bright side, while I was guessing why the game is crashing, @rfelipe200 mande another cool container for us!

Another interesting addition is the "physical profile" patch. Many of you were using KIS parts not even knowing that they violate the physics laws! Put aside the kerbal backpack of volume 300L (google for a 100L backpack as an example), how about 1100L of volume inside a part which linear size can only fit 280L? It's SC-62. The other two containers have similar issues. One day, when I fully refactor KIS (as I did for KAS), all these things will be fixed. But why waiting? You can test it today! There is a file "kis_physical_containers.cfg.txt" inside the new release. Due to it has extension ".txt", MM doesn't pick it up. Remove the extension, and reload the game. The part properties will be updated, and you'll figure out how it looks like, living in a world of physics. Note, not only the volume has changed. The mas has reduced too. Consider it a "hard career" mode for now.

Note. The new containers are all 100% physics friendly. Their internal volume doesn't contradict to the linear size, and their mass is about right, given they are made of aluminum (and they are! "Kerbal Inventory Systems" has just replied to my inquire).

Link to comment
Share on other sites

thanks a bunch for the update, downloading and testing now.

frankly there's nothing to be disappointed about, 1.17 had some really cool new parts with really cool animations, and it bugged out :) totally normal if you ask me :D best thing about 1.17 is that it didn't mess with our older KIS parts, so in reality our saves weren't hurt (thanks a lot! for that)

Edited by arius32
not enough coffee (it's still morning here :) )
Link to comment
Share on other sites

7 hours ago, IgorZ said:

I didn't know how easy it is to make Unity crashing from the managed code

I'm assuming the crash fix came from this change to the code (Support lost texture event):

https://github.com/ihsoft/KIS/commit/aec6da26f218311695bafe5b193709382967d691#diff-9fd2acd34859195030978517c3414ef4

If you don't mind me asking, is this an issue with c# in general or just unity's interaction with it.  I've been trying to make a mod of my own (will have to see if that actually continues) and coming from a c/c++ background sometimes managed code is a bit tough.  I just don't "trust" it, lol.  I read the comments in the code... I guess what I'm saying is that I don't get it...  I thought all of those issues just got handled and don't understand why your changes were even necessary in the first place.

Specifically, this comment in the code:

  /// This method <i>must</i> be called if an icon becomes unusable. Otherwise, all the cached Unity
  /// objects will live and take memory till the scene is reloaded. Some of the internal counters
/// will also not get updated as expected. 

With my background that scares the crap out of me.  I thought that was part of the whole it-just-works-managed-code-magic. :)

If I'm asking more than I realize, feel free to tell me be an adult and look it up myself.  I don't mind.  But if you or someone else that knows could point me in the direction of "its a c# thing" or "its a unity thing" I'd appreciate it. :)

Link to comment
Share on other sites

Is it possible to prevent the side doors from animating on the IMG and IGC with a MM patch?  I'd like to stick stuff on the sides, and the doors animating breaks immersion for me.  If it has to prevent the top door from animating, that's fine too.

Link to comment
Share on other sites

2 hours ago, Tonka Crash said:

@rfelipe200 Have you considered coming up with variant textures for the original KIS containers? They look a little out of place with all the new parts. I doubt @IgorZ would mind.

Yes I have, no he doesn't mind at all, and yes I'm working on it. In fact, the only reason for them to not have part variants from the get-go is because I couldn't get their UV maps. But since I'll have to make a new mesh for them to support animation anyway, I'll make the new part variants to go with the revamped containers. So bear with it for a while, I think I made so that they would go well with at least the Wyvern container.

46 minutes ago, Geonovast said:

Is it possible to prevent the side doors from animating on the IMG and IGC with a MM patch?  I'd like to stick stuff on the sides, and the doors animating breaks immersion for me.  If it has to prevent the top door from animating, that's fine too.

Well, you can delete or comment out (add two slashes before) the openAnimName tag from the part's cfg file. It should prevent the doors from opening, at least while I don't find a way to make the doors open individually.

Link to comment
Share on other sites

16 minutes ago, rfelipe200 said:

Well, you can delete or comment out (add two slashes before) the openAnimName tag from the part's cfg file. It should prevent the doors from opening, at least while I don't find a way to make the doors open individually.

You mean

Quote

    MODULE
    {
        name = ModuleKISInventory
        maxVolume = 15000
        externalAccess = true
        internalAccess = true
        slotsX = 8
        slotsY = 6
        slotSize = 50
        itemIconResolution = 128
        selfIconResolution = 128
        openSndPath = KIS/Sounds/containerOpen
        closeSndPath = KIS/Sounds/containerClose
        defaultMoveSndPath = KIS/Sounds/itemMove
        //openAnimName = openAllDoors_22k
    }

?

I tried that, and the doors instantly opened in the editor and would never close even when launching.

edit: Just checked again, and it also makes the 'Toggle Doors' button disappear.

Edited by Geonovast
Link to comment
Share on other sites

5 minutes ago, Geonovast said:

You mean

?

I tried that, and the doors instantly opened in the editor and would never close even when launching.

Alright, try copying the following code to the cfg file after deleting that tag:

	MODULE
	{
		name = ModuleAnimateGeneric
		animationName = openAllDoors_22k
		startEventGUIName = #autoLOC_502051 //#autoLOC_502051 = Close
		endEventGUIName = #autoLOC_502069 //#autoLOC_502069 = Open
		actionGUIName = #autoLOC_502077 //#autoLOC_502077 = Toggle Bay Doors
	}	

It should unlink the animation from the KIS operation rather than just deleting its control.

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