• 1
Claw

FIX: Dock / Undocking Bug in 0.23.5

Question

Help! My docking ports refuse to dock or undock!

KSP has suffered from docking and undocking problems for a while now. This thread by roscoe_jones outlines a fix but seems to not fix all of the problems with docking issues in 0.23.5. I think I have figured out a new method which seems to work on the more stubborn undocking problems in 0.23.5.

Also, for completeness, I've included instructions on how to fix the common "unable to dock" problem.

This thread has been added to the 0.24 Cross-Platform Problems thread: http://forum.kerbalspaceprogram.com/threads/92235

Keep a copy of your save files somewhere safe...


UPDATE HISTORY:

8 May 14 - Found shorter method to fix "undock bug"

Edited by Claw

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

I'm having two docks stuck together at my Mun lander and I'm trying this fix, but I don't understand where you got "47" from, in step 5c.

Share this post


Link to post
Share on other sites
  • 0
I'm having two docks stuck together at my Mun lander and I'm trying this fix, but I don't understand where you got "47" from, in step 5c.

In step 5c, the number #47 is the number of the other docking port. One docking port is the parent (whose number is relatively easy to find). For step 5c, you need to determine the "child" docking port. This is a bit tricky because nowhere in the save file does it explicitly tell you what number a part is. If you have another part attached to the child docking port (such as a fuel tank), you can go look at that fuel tank and it will tell you its parent number. Assuming the docking port is the parent of the fuel tank, that would tell you what part number the docking port is. It can be rather difficult to figure out what a particular part's number is if you are unfamiliar with looking at saves.

If you haven't tried it already, I would highly recommend that you use the "super quick and dirty" instructions. Those work in nearly every case, and are much easier to follow/implement.

It's not easy, but hopefully some of that made sense.

Cheers,

~Claw

Share this post


Link to post
Share on other sites
  • 0

Thanks for the answer. I think your explanation was a little over my skill level, so I tried the quick fix and the Attn line had the correct parent number. So I went back to the lander and now everything works fine. I have no idea what happened. Thanks anyway!

Share this post


Link to post
Share on other sites
  • 0

I don't use KJR, but I'm still cursed with this problem. Have been since .23 I think.

I use stations and dock alot using Romfarer's docking cam.

Claw's quick and dirty fix works most of the time, except when I use shielded ports.

I think I saw a post about the nosecone version (that's why I'm here). Don't know what to do with the inline versions yet.

edit:

found it and it worked :-)

typos

Edited by espenrik

Share this post


Link to post
Share on other sites
  • 0

The problem is back. What to do when step 4 of the quick fix yields this:

name = ModuleDockingNode
isEnabled = True
state = PreAttached
dockUId = 0
dockNodeIdx = 0
EVENTS

This is above the "EnableXfeed active = true" bit, but there's no parent number.

This is the dock in question, if that helps at all:

cWUcv1.jpg

Edited by PeskyPony

Share this post


Link to post
Share on other sites
  • 0

That is not the same bug.

The state says it's preattached, not docked. Your struts should've popped as well.

Share this post


Link to post
Share on other sites
  • 0

I don't know what could be the problem since I undocked it before and it was fine. I then realized I had put a scientist instead of a pilot in it, so I did a quick load, changed crew and then it wouldn't undock.

Note: That screenshot was just referential, the struts do disappear after decoupling.

This one is post-decoupling. You can even see the struts are gone and I'm trying to move away with RCS:

xi6edh.jpg

Edited by PeskyPony

Share this post


Link to post
Share on other sites
  • 0

Hello,

Im not sure if it is the right place to post my case. My MK2 cockpit looses connection with Mk2 cargo bay after I undock.

I used to undock this craft without problem. Cockpit fell of with higher speed when the cargo bay is closed.

Save file and craft.

Edited by Flan

Share this post


Link to post
Share on other sites
  • 0

So, I keep having this issue with docks getting stuck, but the code doesn't look like the setup in the OP. I still tried changing it to the fix, but nothing. These are two of the docks:

            PART
{
name = dockingPort2
cid = 4292421192
uid = 764773335
mid = 3555246955
launchID = 105
parent = 0
...
srfN = None, -1
attN = None, -1
attN = bottom, 1

...

MODULE
{
name = ModuleDockingNode
isEnabled = True
state = Docked (docker)
dockUId = 764773335
dockNodeIdx = 0
EVENTS


PART
{
name = dockingPort2
cid = 4294539224
uid = 732890210
mid = 680968784
launchID = 103
parent = 359
position = -7.71540021896362,-3.11059498786926,-7.71647357940674
rotation = 0.5110344,0.01572897,-0.4887137,0.7069339
mirror = 1,1,1
symMethod = Radial
istg = 0
dstg = 0
sqor = -1
sidx = -1
attm = 0
srfN = None, -1
attN = top, 359
attN = bottom, 361

...

MODULE
{
name = ModuleDockingNode
isEnabled = True
state = PreAttached
dockUId = 0
dockNodeIdx = 0
EVENTS

You can see that instead of "Ready", one says "Preattached" and the other says "Docked".

Anyway to fix this? It's already on 5 separate docks and it's put construction on my two stations on hold. Out of the 5, two were built docked in the VAB and three were docked in orbit. I'm playing KSP 32 if that helps. I can upload my save file if anybody wants to take a look and see what I'm doing wrong.

Edited by PeskyPony

Share this post


Link to post
Share on other sites
  • 0

I just learned my undocking bugs were because I was using an old version of Procedural Parts. Anything built in the VAB prior to updating that mod was unable to undock. Anything built and launched after updating was able to undock normally.

Share this post


Link to post
Share on other sites
  • 0

I have had this problem for two days then after much searching found this post. Worked a treat. Thank you very much.

Share this post


Link to post
Share on other sites
  • 0
I just learned my undocking bugs were because I was using an old version of Procedural Parts. Anything built in the VAB prior to updating that mod was unable to undock. Anything built and launched after updating was able to undock normally.

Ohh, good to know. :)

I have had this problem for two days then after much searching found this post. Worked a treat. Thank you very much.

Great, I am glad it worked out for you!

Cheers,

~Claw

Share this post


Link to post
Share on other sites
  • 0

FOUND IT!

The bug is an interaction between the latest versions of Procedural Parts and Kerbal Joint Reinforcement. Earlier versions were fine. Either mod by itself is fine. But the current versions of both mods together causes the undocking bug. Verified with a stripped down install of only stock parts and those two mods.

Specifically, it's Procedural Parts 1.0.2 and Kerbal Joint Reinforcement v3.1.1 that won't play nice together.

Edit: Now I go looking at the KJR thread, people have known about the issue for weeks. A fixed dll is available, but not officially released.

Edited by White Owl

Share this post


Link to post
Share on other sites
  • 0

Hello Fellow KSP Player,

Unfortunately i have bad news, the fix for KJR (17.Jan) does not solve the problem entirely. It worked on my station 4 times, when i attached the ship the 5. time it could not undock! Save file is here:

http://s000.tinyupload.com/index.php?file_id=04063120361666111169

Also im confused about the guides how to fix this. Which one is usable for 0.9 version ? Could someone point me to that ?

Also do i need to name the ports differently to identify or make it work ?

Thanks for the help!

Share this post


Link to post
Share on other sites
  • 0
Unfortunately i have bad news, the fix for KJR (17.Jan) does not solve the problem entirely. It worked on my station 4 times, when i attached the ship the 5. time it could not undock! Save file is here:

Yes, the problem is not isolated to KJR. It also happens in stock, although the exact reason is unknown. I think there was just a bug in KJR that triggered it more often, or maybe caused it directly itself.

In any case, this guide still works for 0.90. One way to find the port is to turn off the crossfeed and search the save file (as outlined in the instructions). You can also set the docking port to "control from here" and use the control id to search for the correct docking port.

Sorry for the delayed response. I was out on an extended trip. If you can give this guide a try, it should hopefully help you out.

Cheers,

~Claw

Share this post


Link to post
Share on other sites
  • 0

So I'm trying to work through the instructions but my save file diverts from the instructions. Here's where I'm at:

I've disabled the x-feed and used this setting to find my part in the save. I then scroll up to get the dockUid and that's where things breakdown for me, my dockUid = 0. Any recommendations?

Share this post


Link to post
Share on other sites
  • 0
I then scroll up to get the dockUid and that's where things breakdown for me, my dockUid = 0. Any recommendations?

Are these components that you've docked in flight? Or were they put together in the VAB/SPH?

If these were connected in the editor and the dockUId is showing 0, then the next section to look at is the attachment points. Up where it says attN and link. This will show what else is connected to the docking port. If you have something under "link" then it's a bad sign. My initial feeling is that you might have something surface attached instead of stack attached.

If it was attached in flight, then there might be something else going on. In that case, you'll have to dig around a bit to see what is actually attached to the docking port by looking at "parent = XX" and find the reference to the port in question. That means you'll also have to figure out what the part ID is for the broken port. If that isn't making sense, feel free to post your save file (if it's stock) and I'll have a look. If you do upload, please let me know which craft is broken.

Cheers,

~Claw

Share this post


Link to post
Share on other sites
  • 0

The answer's a bit complicated, the short answer is all of the above and I think that may be the problem.

It's a station that I've built modularly. It consists of one central ship that has had 3 ships that have been radially docked to it in flight. All three are docked to a non-stock component that has integrated docking ports there are no menu options on this part to allow for undocking, so I think this may be part of the problem. Additionally, one of the 3 ships was built in the VAB as two separate parts connected with two docking ports. I can not undock any of the ports on all of the ships.

I'm thinking my best bet is to just start a new station and design it so that all of the ships connect only using stock docking ports.

Share this post


Link to post
Share on other sites
  • 0

Hmm. Yes, sorry. I don't know about mod parts. If you docked them in flight and the docking ID is showing 0, then yeah, it might be because of the receiving mod component (though I can't say for certain). If you can tell which part the docking port is connected to, you can still skip down to the part where you change the attN. The docking ID is really only needed to help find the other component.

Cheers,

~Claw

Share this post


Link to post
Share on other sites
  • 0

Thank you Claw for that Workaround - the quick and dirty method worked for me. At first I thought it was a KJR issue (I had to reinstall 3.1.1 a couple of weeks ago and forgot to add the dev dll) but after I installed 3.1.2 the issue persisted. It seemed as if only one module of my Space Station was "infected", so I sent up a new Science Lab, docked it with the old one, transferred all my crew to the new Lab, then used your workaround to undock both the old Science Lab from the rest of the station and the new Science Lab from the old one, then deorbited the old one and happily watched it burn up on reentry. After that I discovered I have still the same bug with the new Lab. Some ports on the Station are working, others are not. It's definitely not KJR-related. The fix works, but I don't want to tamper with the quicksave every time I have to undock a ship. This bug is really sucking a lot of fun out of the game.

Share this post


Link to post
Share on other sites
  • 0
Yes, the problem is not isolated to KJR. It also happens in stock, although the exact reason is unknown. I think there was just a bug in KJR that triggered it more often, or maybe caused it directly itself.

In any case, this guide still works for 0.90. One way to find the port is to turn off the crossfeed and search the save file (as outlined in the instructions). You can also set the docking port to "control from here" and use the control id to search for the correct docking port.

Sorry for the delayed response. I was out on an extended trip. If you can give this guide a try, it should hopefully help you out.

Cheers,

~Claw

Another suspect is an error in generated GameEvent events. A few of those are fired every time a ship docks or undocks and if an error occurs at just the wrong time it can halt further code execution in whatever was responsible for calling it.

A prime example of that is the 'spaghetti' craft that strikes people occasionally. If an error happens during GameEvents.onVesselGoOnRails then every part on the vessel that was processed before the error is on rails while the part that it occurred in, and every part afterwards is off rails. (i.e. half the ship is still physics enabled. Which is also why it never happens during a physics time warp)

Share this post


Link to post
Share on other sites
  • 0
Yes, the problem is not isolated to KJR. It also happens in stock, although the exact reason is unknown. I think there was just a bug in KJR that triggered it more often, or maybe caused it directly itself.

In any case, this guide still works for 0.90. One way to find the port is to turn off the crossfeed and search the save file (as outlined in the instructions). You can also set the docking port to "control from here" and use the control id to search for the correct docking port.

Sorry for the delayed response. I was out on an extended trip. If you can give this guide a try, it should hopefully help you out.

Cheers,

~Claw

Hi, I too have this problem but in my case, when I turn off the corssfeed, it does not save it in the save file. I could not find any port with xfeedenable active = true :-/. How does this control id work? What do I look for?

Share this post


Link to post
Share on other sites
  • 0
Hi, I too have this problem but in my case, when I turn off the corssfeed, it does not save it in the save file. I could not find any port with xfeedenable active = true :-/. How does this control id work? What do I look for?

After you turn off the crossfeed, you have to do another quicksave. If you just open the persistence.sfs, if might not have saved unless you force one of the auto-save triggers to occur. So the safest thing is to press MOD+F5 and give it an obvious name.

Cheers,

~Claw

Share this post


Link to post
Share on other sites
  • 0

Hi guys,

It seemd im also affected by one of those can't undock bugs. I tried claws solution but could not check yet if it works.

However a few ideas/questions arose:

1. Why not track the docking port by a changes name Like FIXME-1 or so ?

2. I read on the Internet that it is possible to repair a broken docking port with KAS by removing and reataching. Also could not try this out yet but i made a config file for me. (Source: https://www.reddit.com/r/KerbalSpaceProgram/comments/2oh4yz/i_have_a_fix_for_the_docking_port_bug/)


//##### Fix for the stuck docking issue, can be grapped by eva kerbal and reatached
@PART[dockingPort2]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}

@PART[dockingPortLateral]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}

@PART[dockingPort3]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}

@PART[dockingPort1]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}

@PART[dockingPortLarge]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}

@PART[mk2DockingPort]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}
@PART[docking-25]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}
@PART[SYdocking3m]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}
@PART[SYdocking5m]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}
@PART[trusslrg-docking]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}
@PART[KW3mDockingRing]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}
@PART[B9_Utility_DockingPort_CDP]:FOR[KAS]
{
MODULE
{
name = KASModuleGrab
evaPartPos = (0.0, 0.00, -0.09)
evaPartDir = (0,0,-1)
storable = true
storedSize = 5
attachOnPart = True
attachOnEva = False
attachOnStatic = False
attachSendMsgOnly = False
}
}

I will report back what is working :-)

OK THIS works! So if you dont want to edit the save file just get a kerbal to grab and reattach onto the Ship.

Edited by ManuxKerb

Share this post


Link to post
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
Answer this question...

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