Jump to content

[KSP v1.1.3] Stock Bug Fix Modules (Release v1.1.3b.1 - 10 Jul 16)


Claw

Recommended Posts

My docking ports stick and will not disconnect after they have been connected. Press decouple node and nothing happens, I can switch between ships but they still act as if they are connected no matter what I do?

Is there a fix for this out there? Or anyone have this happen to them or know what could be causing it?

Link to comment
Share on other sites

This is just awsome! Thanks alot! No more kerbals smashing to the ground while EVAIng over kerbin. I only think, the launchpad was supposed to crash under the force of my mighty lifters. Guess ill leave that one unfixed just for the dramatic effect :)

Link to comment
Share on other sites

This is just awsome! Thanks alot! No more kerbals smashing to the ground while EVAIng over kerbin. I only think, the launchpad was supposed to crash under the force of my mighty lifters. Guess ill leave that one unfixed just for the dramatic effect :)

You are very welcome. :)

BTW: The launch pad exploding was actually fixed in 0.90. So large craft on the highest tier launch pad no longer cause it to explode.

Cheers,

~Claw

Link to comment
Share on other sites

Claw, does KerbalDebrisFix work for when kerbals are just permanently ragdoll while still attached to the command seat? Because I was just roving on the Mun and Bill scraped his head on the ground, but not hard enough to dislodge him and be thrown out. Instead, he's ragdolling in the seat and nothing can wake him up. I checked this thread and yeah, Bill's state was 'Ragdoll' instead of the correct 'Seated (Command)' so I changed it and all is well with Bill, but yeah.. KerbalDebrisFix doesn't appear to correct ragdolling kerbals like this, is that correct?

Link to comment
Share on other sites

I encountered a strange problem. Sometimes when going on EVA my screen just turns black. I captured one of those moments into an output_log.txt

The problem seems to start from line #221407

Dear Claw, would you please take a peek, maybe you can identify the issue.

http://i.imgur.com/QuX56ui.jpg

Have you tried without tweakscale ? I got some similar texture issues on scene change: quicksave/quickload or reverting to SPH and launching craft again.

Found tha several latest versions of tweakscale are broken, don't know which one is last stable release for recommendation.

Link to comment
Share on other sites

Have you tried without tweakscale ? I got some similar texture issues on scene change: quicksave/quickload or reverting to SPH and launching craft again.

Found tha several latest versions of tweakscale are broken, don't know which one is last stable release for recommendation.

I'm afraid without TweakScale my save will become a complete mess...

Link to comment
Share on other sites

I have an issue I started noticing in 0.90. It's easily reproducible. Add the smallest decoupler below any root part (ex. the Mk1 CM) and add the toroidal fuel tank below it. Now add, say, 6 of the Small Octo Strut in symmetry around the decoupler and notice how one of them now seem to be the parent of the toroidal, and not the decoupler as one would think. If you remove the strut, the toroidal fuel tank will stick to it.

Link to comment
Share on other sites

I'm working on a mod right now that adds a bunch of more interesting contracts. One of them requires kerbals to be removed if the contract expires, which can trigger this bug. Can I bundle your CrewRosterFreezeFix.dll fix in with my mod when I publish it? (Giving you credit for that, of course)

EDIT: Nevermind, your fix didn't work in this case since the kerbal I needed to remove was generated by my mod instead of from the Astronaut Complex. I managed to fix it though, by basically doing what your mod does and set the kerbal to unowned instead of removing it from the roster.

Edited by ToTheMoooon
Link to comment
Share on other sites

There's a much more important Command-Seat based bug that needs to be fixed. If you ragdoll a Kerbal while in a command seat, you can not make him leave the seat. He will try to walk and actually dance in place instead, and he's basically stuck like that. But it gets worse if he's knocked out of the seat. If he's knocked out of the seat he becomes Debris that can only be recovered.

Link to comment
Share on other sites

Hello claw, I'm unsure if you know about this one, but I've found another case for a stock bugfix module as it's completely VAB/SPH breaking :)

If you go into the editor without selecting a root part, and then type in a name at the top, you'll get a tiny vessel.craft file that has no parts. If you press load now, KSP will throw and the load won't work. If you leave the VAB and go back into it, you won't be able to load anything. The fix is to delete the vessel.craft file.

.

I'm unsure if it's on the bugtracker yet (3929 looked kinda close, but not really...), but you might be able to search it a bit better than me. If you like I'll write up some code to handle this, unless you'd like to.

Link to comment
Share on other sites

Dear Claw, would you please take a peek, maybe you can identify the issue.

I'm afraid that with all of the other things that are showing up in your log file, I can't really tell what's going on. What you describe does happen on occasion in stock, but it's generally very hard to replicate (hence no real fix for it).

It looks like others have also given suggestions, but I would suggest that you try posting your request for help in the modded support forum. This thread is pretty specific, and you're likely to get more people looking at your issue in the support forum.

Claw, does KerbalDebrisFix work for when kerbals are just permanently ragdoll while still attached to the command seat?

No, it doesn't. If you have a broken save file with this sort of setup, that might help me add this case to the fix. It's sometimes hard to build a fix when I can't easily replicate the problem. So while not perfect, having a genuine broken save file can help.

I have an issue I started noticing in 0.90. It's easily reproducible. Add the smallest decoupler below any root part (ex. the Mk1 CM) and add the toroidal fuel tank below it. Now add, say, 6 of the Small Octo Strut in symmetry around the decoupler and notice how one of them now seem to be the parent of the toroidal, and not the decoupler as one would think. If you remove the strut, the toroidal fuel tank will stick to it.

I would have to look at this to understand what you are describing. Again, I would suggest that bug reports make their way to the appropriate forum. While I do my best to help out, this thread is primarily aimed at building stock fixes rather than trouble shooting. Once a problem is fleshed out (with pictures, replication steps, etc) it's a lot easier for me to try to fix. Unfortunately this thread isn't quite large enough to do all that work for all bugs. :P

I managed to fix it though, by basically doing what your mod does and set the kerbal to unowned instead of removing it from the roster.

Cool, I'm glad you managed to fix it. Yeah, my fix is mostly aimed at the hiring/firing functions built into stock, since I can't really get down into the root of the problem.

Also, welcome to the forums! :D

There's a much more important Command-Seat based bug that needs to be fixed. If you ragdoll a Kerbal while in a command seat, you can not make him leave the seat. He will try to walk and actually dance in place instead, and he's basically stuck like that. But it gets worse if he's knocked out of the seat. If he's knocked out of the seat he becomes Debris that can only be recovered.

Indeed. As I noted above, it's a challenge to replicate, which makes building a reliable fix difficult. If you have a way to easily replicate, or a save that might help me out.

Hello claw, I'm unsure if you know about this one, but I've found another case for a stock bugfix module as it's completely VAB/SPH breaking :)

So there are two things going on in your video.

First, the crux of the bug that breaks the VAB/SPH is that the end result of that empty file is that it's really a corrupt .craft. KSP is pretty much incapable of dealing with them, and it's not really something I can fix easily (at least I think not, given how much parsing goes on).

The second piece is the auto-save when you name something. I hadn't seen that before, so I gave it a try (in Windows). My KSP does not auto save a file when I type in a name. Do you have any mods that might be doing that (something that auto-saves so you don't lose your file)? I think that stock KSP will not save anything unless you explicitly click on the SAVE button, and the save button isn't active if you don't have any parts built. Hence the lack of checking for an empty craft when it saves.

Not sure if that answers it for you.

Cheers,

~Claw

Edited by Claw
Link to comment
Share on other sites

So there are two things going on in your video.

First, the crux of the bug that breaks the VAB/SPH is that the end result of that empty file is that it's really a corrupt .craft. KSP is pretty much incapable of dealing with them, and it's not really something I can fix easily (at least I think not, given how much parsing goes on).

The second piece is the auto-save when you name something. I hadn't seen that before, so I gave it a try (in Windows). My KSP does not auto save a file when I type in a name. Do you have any mods that might be doing that (something that auto-saves so you don't lose your file)? I think that stock KSP will not save anything unless you explicitly click on the SAVE button, and the save button isn't active if you don't have any parts built. Hence the lack of checking for an empty craft when it saves.

Not sure if that answers it for you.

Cheers,

~Claw

I can confirm that this happens on Windows (stock). The key to triggering this bug is pressing the enter key while in the name box, which triggers the save with the ship as-is. A potential solution might be to scan for such ships and delete them, perhaps by checking the ship size, which is always 0, or checking if any PART nodes exist. In my testing deleting the file externally fixed the editor functionality.

The .craft:

ship = Dingleberry
version = 0.90.0
description =
type = VAB
size = 0,0,0

EDIT: Actually, you might be able to directly nuke the method by poking with EditorLogic.fetch.shipNameField and removing the method callback. I'll leave the implementation to your capable hands...er...claws?

Edited by Xaiier
Link to comment
Share on other sites

So, this might be a bit of crazy defensive overcoding, but this works to defend against the problem:


using System;
using System.Reflection;
using UnityEngine;

namespace FixTheVAB
{
[KSPAddon(KSPAddon.Startup.EditorAny, false)]
public class MainClass : MonoBehaviour
{
private int updatesUntilCapture = 10;
private Callback<string> theirCallback;

public void Update()
{
if (updatesUntilCapture == 0)
{
Debug.Log("Replacing GUI save method");
//Find callback
FieldInfo[] theirFields = typeof(ScreenSafeTextField).GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
foreach (FieldInfo testInfo in theirFields)
{
if (testInfo.FieldType == typeof(Callback<string>))
{
theirCallback = (Callback<string>)testInfo.GetValue(EditorLogic.fetch.shipNameField);
string hexName = "";
foreach (char c in testInfo.Name)
{
hexName += Convert.ToByte(c).ToString("x2");
}
Debug.Log("Found field: 0x" + hexName);
}
}
//Save callback so we can restore it later
if (theirCallback != null)
{
Delegate[] oldList = theirCallback.GetInvocationList();
foreach (Delegate d in oldList)
{
if (d.Method != null && d.Method.Name != null)
{
Debug.Log("Replacing: " + d.Method.Name);
}
}
EditorLogic.fetch.shipNameField.SetOnSubmitCallback(OurSave);
}
else
{
Debug.LogError("CALLBACK NOT CAPTURED");
}
updatesUntilCapture--;
}
if (updatesUntilCapture > 0)
{
updatesUntilCapture--;
}
}

private void OurSave(string name)
{
Debug.Log("Skipping save of " + name);
ScreenSafeUISlideTab componentUpwards = EditorLogic.fetch.shipDescriptionField.gameObject.GetComponentUpwards<ScreenSafeUISlideTab>();
componentUpwards.Collapse();
}

public void OnDestroy()
{
if (theirCallback != null)
{
Debug.Log("Releasing GUI save method");
EditorLogic.fetch.shipNameField.SetOnSubmitCallback(theirCallback);
}
}
}
}

This works too. The above is kept around for proof of my foolishness. Thanks xEvilReeperx.


using System;
using UnityEngine;

namespace FixTheVAB
{
[KSPAddon(KSPAddon.Startup.EditorAny, false)]
public class MainClass : MonoBehaviour
{
public void Awake()
{
EditorLogic.fetch.shipNameField.submitOnEnter = false;
}
}
}

This is likely the best solution. It doesn't look look like there's any harm in clobbering it completely, and it brings back the collapse behaviour.


using System;
using UnityEngine;

namespace FixTheVAB
{
[KSPAddon(KSPAddon.Startup.EditorAny, false)]
public class MainClass : MonoBehaviour
{
private int updatesUntilCapture = 10;

public void Update()
{
if (updatesUntilCapture == 0)
{
EditorLogic.fetch.shipNameField.SetOnSubmitCallback(OnSave);
updatesUntilCapture--;
}
if (updatesUntilCapture > 0)
{
updatesUntilCapture--;
}
}

private void OnSave(string name)
{
ScreenSafeUISlideTab componentUpwards = EditorLogic.fetch.shipDescriptionField.gameObject.GetComponentUpwards<ScreenSafeUISlideTab>();
componentUpwards.Collapse();
}

public void OnDestroy()
{
EditorLogic.fetch.shipNameField.SetOnSubmitCallback(null);
}
}
}

Edited by godarklight
Link to comment
Share on other sites

Not sure if fixable. But wondering if you could look into the issue that the new SAS vector following code only uses reaction wheels for control.

If you build a ship with OKTO2, and RCS or Fins, but no reaction wheels. And try any new SAS feature besides stability it vibrates all over the place and doesn't work.

Link to comment
Share on other sites


using System;
using UnityEngine;
using System.Collections;

namespace FixTheVAB
{
[KSPAddon(KSPAddon.Startup.EditorAny, false)]
public class MainClass : MonoBehaviour
{
public void Start()
{
StartCoroutine(Clobber)
}

IEnumerable Clobber()
{
for (int i = 0; i < 10; i++)
yield return null; // wait 10 frames

EditorLogic.fetch.shipNameField.SetOnSubmitCallback(OnSave);
}

private void OnSave(string name)
{
EditorLogic.fetch.shipDescriptionField.gameObject.GetComponentUpwards<ScreenSafeUISlideTab>().Collapse();
}

public void OnDestroy()
{
EditorLogic.fetch.shipNameField.SetOnSubmitCallback(null);
}
}
}

Personal preference would be to do that as a Coroutine (see edits in quote. Note: Not tested) for clarity. Not really an issue with something this size, but avoiding cluttering Update when you have a better alternative is a good habit.

Edited by Crzyrndm
Link to comment
Share on other sites

If you have a broken save file with this sort of setup, that might help me add this case to the fix. It's sometimes hard to build a fix when I can't easily replicate the problem. So while not perfect, having a genuine broken save file can help.

Lucky for you, unlucky for me... I have two 'dancing' kerbals in my Munrover command seats.

It's a modded savegame (it would be a rarity if it wasn't eh?), but this particular rover has no non-stock parts (there are FAR and collisionFX modules added to the parts though)

It's called 'Munbase rover', there aren't many vessels so it should be easy to find.

Stuck kerbals are Bob and Kelfrid.

Here is the quicksave: https://www.dropbox.com/s/pv44dxva58gffa2/output_log.txt?dl=0

Please let me know if you find a fix.

edit:

I managed to shake them loose by driving over the edge of a cliff :D.

Kelfrid and the rover managed to stick to the edge.

Bob slid down the crater for almost a kilometer :D, he did seem to enjoy himself though.

screenshot40.png

edit2:

game crash, not saved, they are stuck again :(. Unable to reproduce the 'shake loose'.

edit 3: success!!!

I am developing a phobia for command seats.

Tip: to shake them loose, be sure they are in 'walking' or ragdol mode, after reloading they are half a minute in rigid T-stance and impossible to shake out of the vehicle.

Edited by OrtwinS
Link to comment
Share on other sites

I have had trouble with a kerbal stuck in a command seat. Right click thought he was on EVA, but he was still firmly attached to the seat (though standing). When I looked in the save file, I found that the kerbal was still very much a part of the parent vessel (presumably a child of the seat), but the kerbal's state was incorrect. I copied the "seated" state from a known working seated kerbal and that fixed things.

Link to comment
Share on other sites

Sorry for the long delay. I have not abandoned this work, but have been very busy in other areas (for good reason, I promise!).

Not sure if fixable. But wondering if you could look into the issue that the new SAS vector following code only uses reaction wheels for control.

If you build a ship with OKTO2, and RCS or Fins, but no reaction wheels. And try any new SAS feature besides stability it vibrates all over the place and doesn't work.

I have looked at this issue, and I'm unable to fix it. It's one spot in the code that needs a tweak, but it is protected and I do not have access via plugin (sorry). :(

YESSS! KerbalDebrisFix! This is now my true must-have mod!

Excellent! I am glad it's working for you!

ahm? i have this mod.. still experiencing sticky at launch pad..

I am happy to check it out, but I need more info please. A picture or .craft file and the offending launch pad tier is needed.

Here is the quicksave: https://www.dropbox.com/s/pv44dxva58gffa2/output_log.txt?dl=0

Please let me know if you find a fix.

Yes, ragdolled in seats is still a problem. Unfortunately you linked me to your output_log and not a save file, so I am unable to view them. But I'm glad you managed to save your guys!

I have had trouble with a kerbal stuck in a command seat. Right click thought he was on EVA, but he was still firmly attached to the seat (though standing). When I looked in the save file, I found that the kerbal was still very much a part of the parent vessel (presumably a child of the seat), but the kerbal's state was incorrect. I copied the "seated" state from a known working seated kerbal and that fixed things.

Yes, there's a problem where they can ragdoll in the seat. I don't know exactly what this looks like in the save so I'm not certain what needs to change to correctly fix it. And I'm too much of a fraidy-cat to try releasing blind fixes. :P

I have a rover which I could upload which consistantly exhibits the 'rag doll unable to leave a command chair' bug. Would this be of use? If so I will upload it when I get home. Currently out posting on my phone.

Yes please!! (See above three posts).

Cheers!

~Claw

Link to comment
Share on other sites

Sorry myself for the delay. Here is a link to the rover. I redesigned it over and over thinking it was a clipping bug as when the rover crashes it sort of turns into a ballerina and pivots on one corner with the kerbal still sat in the seat but ragdolling (if gravity is low enough). After totally rebuilding it I then thought it was mod interaction of some sort so I tried it in a stock game and the behaviour remained. Hopefully it is some form of fixable bug.

If this particular rover does not replicate the bug on your system then I have a couple of versions dating back to 0.24 or 0.25 that I could upload.

Ragtime Rover

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