• 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
The claw bug hunt was completed a few weeks ago, and that one seems to be successfully squashed. :D

Well what do you know! Installing the Klaw fix apparently managed to fix the whole shebang. Thanks a million! Seriously, your fixes should be like, the most stickied thing on the forums. Keep on rocking!

Rune. SO happy. :)

Share this post


Link to post
Share on other sites
  • 0
Well what do you know! Installing the Klaw fix apparently managed to fix the whole shebang. Thanks a million! Seriously, your fixes should be like, the most stickied thing on the forums. Keep on rocking!

Rune. SO happy. :)

Correction to myself. It stopped the weird camera bug happening, and allows me to undock everything (which I could already do). Turns out that the "can't dock afterwards, and undock option still available" bug is still present with its full force. Just so it might help somebody, tough, I have a good handle on it already: the departing ships, apparently, thinks that it is docked with itself. Just remove any DOCKED VESSEL sub-modules it might have on that port (you will notice it says it is docked to itself), change the status of the port to "Ready" at the top of the docking module, and any dockUID to 0. Don't ask me why that happens, tough, the only thing that I can tell you is that something in the station is truly rotten, since it always happens when you dock stuff to it, even freshly-spawned stuff. The fix works every time, though, so I'm going with it.

Rune. I'm getting good at quick savefile edits.

Edited by Rune

Share this post


Link to post
Share on other sites
  • 0

Ah yeah, the docking port and claw bugs are separate things. Even though I know these docking port bugs happen and I've fixed a fair number myself, I still don't know what triggers them... :(

Rune. I'm getting good at quick savefile edits.

Yeah, after some practice it becomes fairly easy. Although it's a slight bit unfortunate how often it has to happen, it's nice that it's often fixable.

Cheers!

~Claw

Share this post


Link to post
Share on other sites
  • 0
Ah yeah, the docking port and claw bugs are separate things. Even though I know these docking port bugs happen and I've fixed a fair number myself, I still don't know what triggers them... :(

They might be related, actually. After all, I'm pretty confident I turned that VB station into such a buggy mess by docking stuff that was itself docked to probes with engaged Klaws. Perfect for replicating the undock bug, tough, did you manage to reproduce in your install?

Anyhow, the way I see it now, the game fumbles on the logic that dictates the new states of the ports after a change (that's why the undocked ship thinks it has docked to itself). And the Klaws after all have different logic, docking with "only one side". From my "I actually don't know how the game does this", that makes a lot of sense, when the game rebuilds the ships with the new docking modules upon docking, it handles the modules for the Klaws in such a way that it messes up the logic chain for the rest of the modules for the ports in some way that allows that connection (even tough the camera bugs out and you have to return to the space center view), but will result in corrupted ports when any others undock.

Rune. Maybe that is a direction to look at? Does that make any sense?

Share this post


Link to post
Share on other sites
  • 0

Squad does know about these bugs, right? It would be great if they got them fixed for version 1.1.

Share this post


Link to post
Share on other sites
  • 0

is this a docking bug or something else? i can launch two crafts separately and leave them in orbit ok. next i dock them and go back to the VAB. when i try to switch back to the docked craft, one of them shoots off into space and the other sticks in orbit at 0m/s

Share this post


Link to post
Share on other sites
  • 0
is this a docking bug or something else? i can launch two crafts separately and leave them in orbit ok. next i dock them and go back to the VAB. when i try to switch back to the docked craft, one of them shoots off into space and the other sticks in orbit at 0m/s

Sounds like something else. I would start a new thread and upload some pics and/or your log file. Sounds like it's possibly some sort of clipping bug interacting badly with the docking ports, but can't really say anything for sure without more info.

Cheers,

~Claw

Share this post


Link to post
Share on other sites
  • 0
Squad does know about these bugs, right?

Who knows? Squads feedback on the public bugtracker is minimal at best, and non-existent on these forums. So your guess is as good as mine.

I'd sure like to see some of these old bugs squashed, but considering the '0.23.5' in the thread title and the fact that this is still a live one, I'm not particularly optimistic.

Share this post


Link to post
Share on other sites
  • 0

I've got a problem. My ports undock, but the two craft can't seem to get away from each other. They just stay connected and I can't pull them apart.

123nxgl.jpg

Physically removing the ports with KIS doesn't fix it either, they just stick together like they're still connected.

Edited by Mitchz95

Share this post


Link to post
Share on other sites
  • 0
I've got a problem. My ports undock, but the two craft can't seem to get away from each other. They just stay connected and I can't pull them apart.

http://oi62.tinypic.com/123nxgl.jpg

Physically removing the ports with KIS doesn't fix it either, they just stick together like they're still connected.

Well... I solved my docking port issues by learning to check their status in the savefile, then comparing the situation of functional docking ports, then fixing the bugged ones so they showed the same. Important stuff to look for: the status of the port, the Id of the "docker" and "dockee", and the fact that the dockee has a special module telling it what is docked to it. One of those things is bugged out, I'm pretty sure. Hint to find you port in the mess that a savefile is: with the docking alignment indicator mod, you can change the name of a port to something easy to look for. And back up your save!

Rune. That might be a tad complicated, but it's the best that I've got.

Share this post


Link to post
Share on other sites
  • 0

Turns out undocking, then going to the space center and back solved the problem. Thanks. :)

Share this post


Link to post
Share on other sites
  • 0

Thanks for the help Claw, got my refinery undocked from my lab :)

Edit: I have found that in 1.0.4 I can quicksave, or quicksave using a specific name, leave KSP running and open that save, edit it, load it in KSP, and undock. It has become an easy process using shortcuts, and a frequent one due to using mod docking ports from OPT and B9 that seem to love this bug. No idea if it is common, but my latest SSTO science lab with stock and 2 types of mod docking ports seems to lose ability to undock on every port every time I dock now. Not sure if it part of the fix or the original issue expanding.

Details:

The SSTO has stock Clampotrons in a cargo bay, 2 B9 surface mount shielded docking ports (the square flat ones), and an OPT J inline docking port which has a Clampotron that extends out of the center of a Clampotron Sr. docking port to make it a dual function port. This is where it started...

At first it was just an OPT J inline docking port, which has both Clampotron and Clampotron Sr. docking ports. This one was bugged from docking a clampotron to it. I could click 'undock', retract the OPT J docking port into its shell, and the docked ship would not be selectable 'no nearby craft...'. I would find it is still one ship, with the docked ship hanging outside a closed aircraft bay with a docking port retracted inside, as if it had never undocked.

Looking in the save file, the stock Clampotron docked to the J inline docking port appeared to be assigned to the Clampotron Sr part of the J Port, not the smaller clampotron part it was visually attached to in game. However I used the fix without switching the data fields and it allowed undocking.

I retracted the Clampotron on the J Port leaving the Clampotron Sr still active, and docked a larger stock Clampotron Sr to the larger docking node and it is bugged as well.

So now 2 B9 shielded docking ports on the craft are bugged, they worked fine before I tried to use the J inline port, now they bug out and wont undock. They to will retract the port and leave the docked ship, still docked, hanging in space where the retracted port was before. Fortunately I have streamlined the fix to a few clicks, and I know right where the ports are in the sfs now that I have been there a few times.

Feels like it has something to do with animation modules... all the ports bugging out on me are using animation for covers. It seems like it propagated as well, to parts that were working previously, possibly through some function of the animation module writing to the sfs? Not sure how this all works, but I got some 'gut feelings' about suspicious circumstances.

So, not a huge deal, working around it. For me saving in game, editing that save, and reloading it, do not require exiting the game. So that is all pretty quick. still, when I land the SSTO the crew have voted to burn it next to the runway due to all the hassles :o

Edited by interface

Share this post


Link to post
Share on other sites
  • 0

So I just got hit with this issue.
This is in 1.0.5.1028, running Kerbal Engineer Redux, Kerbal Alarm Clock, Docking Alignment and Transfer Window Planner.

I just launched a massive station (DSS) off to Duna (four attempts) reverting to a save each time. It was mostly about getting the fuel load right.

Once I got it out of Kerbin SOI, I did a manual save and then switched back to my space station (KSS) orbiting Kerbin.
I docked the autonomous fuel tank that I had been running between the DSS and KSS and then did a quick save.

And then, I tried to release the grappling drone from the KSS and nothing happened. It was still attached. "Release" from the contextual menu was gone but it still acted as part of the station. 
I did a quick load, same.
I restarted KSP, same.
I then decided I would dock with the drone (docking ports on either side of it) and pull it off.
That's when I discovered that all docking ports of all the craft docked to the station acted the same. Right-click, "Undock" and nothing.
I also discovered that my manual save post-DSS launch didn't actually get saved. Fortunely, I did have one quick save that I've been working on to fix this.

I had never gone into the save files before. So this was a learning experience.

Search revealed posts by Claw and roscoe_jones regarding the issues in 0.23.5 and 0.24.

Once I understood parts of the save file, my problem was simpler.

The DSS ports were fine. This was just on the KSS. Every docked pair lost their pairing ("state = Docked (docker)" & "state = Docked (dockee)") and reverted to "state = Ready". The grappling drone's GrappleNode did the same. 

 

                    name = ModuleGrappleNode
                    isEnabled = True
                    stagingEnabled = True
                    state = Ready
                    dockUId = 834702479

 

            PART
            {
                name = dockingPort2
                cid = 4293320786
                uid = 3518090815    <- Had to find Part.uid 1565750046 which had MODULE.ModuleDockingNode.dockUId 3518090815 and changed its state to "Docked (dockee)"
                mid = 3223882772
                launchID = 144
                parent = 6
                position = -2.84053385257721E-07,-2.41715669631958,2.53406381607056
                rotation = 0.7071052,-0.001546118,0.001546407,-0.7071052
                mirror = 1,1,1
                symMethod = Radial
                istg = 0
                dstg = 0
                sqor = -1
                sepI = 3
                sidx = -1
                attm = 0
                srfN = srfAttach, -1
                attN = top, -1
                attN = bottom, 151
                mass = 0.05
                temp = 112.390777343596
                tempExt = 112.393421897299
                tempExtUnexp = 239.754657632191
                expt = 0.5
                state = 0
                connected = True
                attached = True
                flag = Squad/Flags/default
                rTrf = dockingPort2
                modCost = 0
                EVENTS
                {
                }
                ACTIONS
                {
                }
                PARTDATA
                {
                }
                MODULE
                {
                    name = ModuleDockingNode
                    isEnabled = True
                    crossfeed = True
                    stagingEnabled = False
                    state = Docked (docker) <-- Changed from "Ready"
                    dockUId = 1565750046
                    dockNodeIdx = 0

Finding the pairs was the laborious part. Using the crossfeed status change was pointless for me because all the ports on the station had switched states.

So the abbreviated version is: (1) find the DOCKEDVESSEL that won't undock, (2) find the docking pairs and (3) change the pair's states to "Docked (docker)" and "Docked (dockee)"

		PART
		{
			name = dockingPort2
			...
(2)			uid = (part number of the docking port)
			...
			MODULE
			{
				name = ModuleDockingNode
				...
(3)				state = Needs to be "Docked (docker)" and the other "Docked (dockee)"
(2)				dockUId = (part number of the other docking port)
				...
				EVENTS
				{
				...
				}
				ACTIONS
				{
				...
				}
(1)				DOCKEDVESSEL
				{
					vesselName = 

An easy fix after FOUR HOURS of full immersion into the structure of the save file.

Why this happened is still a mystery. 

Edited by cjdunn

Share this post


Link to post
Share on other sites
  • 0

I'm trying to use the Quick and Dirty method (which has always worked for me in the past) but am running into a problem. The example code in your post says there are two attN lines, the first of which I'm supposed to change. But in my quicksave.sfs, there's only one of them and changing it doesn't fix anything. Also, how do I know whether to use "top" or "bottom"? I'm trying to undock a shielded port from a normal Clamp-o-tron port, by the way.

EDIT: So it looks like the problem is that the shielded port isn't designed to have stuff attached in the VAB, so tricking it that way won't work. Is there a way to trick it somehow?

EDIT2: Got it to work by editing the file and changing it to a standard port, then did the Quick fix.

Edited by Mitchz95

Share this post


Link to post
Share on other sites
  • 0

Looks like some still do it the old way. I was able to "fix" this issue without reloading, though this solution only helpful for manned crafts.

  1. Install KAS/KIS
  2. Switch to craft, Click 'undock' button on working dock port.
  3. Get an engineer (equipped with a screwdriver) close to the joint, hold attach/detach button (default 'H') and click on the malfunctioning docking port.

Always works as clock for me. Can illustrate if you ask.

Edited by z3dd
spelling

Share this post


Link to post
Share on other sites
  • 0

This has got to be one of the most frustrating bugs in the game.  Right now I have an expedition orbiting Gilly.  It's a dozen or so modules, any of which are connected to two or three other modules with clampotron Sr's.  All are nonfunctional.  This is a huge save file, too, so it is taking a lot of digging to figure out exactly which docking ports are buggered up and how.  If I hadn't already had a lot of practice fixing this bug again and again (thanks, Claw!) this would be just miserable, but at least I've got a bit of a clue.

Nonetheless, there are so many ports affected that I actually need a spreadsheet to keep track of all the uids and dockuids.  Something that should be trivial is turning into a marathon, just to be able to continue for this expedition.  There is another vessel orbiting Mun which I have given up on completely over the same issue; I just renamed it the Boneyard and send unneeded scrap to dock there.

If this is a mod issue, the only mod cjdunn and I have in common is Kerbal Alarm Clock.  That seems an unlikely culprit.

That leaves a problem with the game, or the game engine itself.  Interface's idea about the animation modules is probably something in the game engine.  But it isn't all the animation modules.

I first had a problem with the Gilly expedition after getting a little impatient and trying to undock something before the snow had cleared on the images of the Kerbals.  The period while there is snow on their faces is probably being used to load all the relevant scene information into memory, beyond what is required to show the scene.  That is, the part of the game engine responsible for rendering the scene does its job really fast, but structuring the ship into a physics engine framework takes more time.  Internally, the game doesn't have the same representation as we see in the SFS file; the game engine has to fill in the blanks in various templates and sort of build up a local SFS file on the fly.  The animation covers up that time.  This is all purely a guess, but based on how I would go about solving the same problem.

Continuing that guess: if the process of putting together that local SFS file is interrupted by undocking something, the game engine gets confused about the docking ports it has loaded but not yet filled in the blank for 'state'.  After that, the null entry gets replaced with Ready as a default and all hell breaks loose.

It would be really nice to have a script that could digest an SFS file and find all instances of ModuleDockingNode with state = Ready and dockUId >0 and fix them. I have a whole bunch of missions enroute, some like the Jool mission with a crapton of connected subvessels, and manually digging through a 25 Mb sfs file is not my idea of a fun time playing KSP/

Share this post


Link to post
Share on other sites
  • 0

Ever since I posted that guess above, I decided to test it.  I started a new game on a completely unmodded version of ksp 1.0.5.1028.  Man, I miss Kerbal Alarm Clock something fierce.  Anyhow, I'm now at day 266 and have nearly built up a station in Minmus orbit big enough to test my idea.

I realize that if I'm right this problem will probably disappear with Unity 5 or the 64 bit version coming out in 1.1.  If so, good, I'm determined to find the source of this bug anyhow.  I'm a little OCD and it's liquiding me off.  I'm just posting this here so that others don't have to waste their time doing the same thing.

edit: I actually laughed out loud to see that my very mild swear word had been censored.  Liquiding is my new second-favorite pseudoswear after "shut the front door".  As you were.

Edited by edrobotguy

Share this post


Link to post
Share on other sites
  • 0

So, year 1 day 422 and the bug has not appeared on this unmodded version, try though I might.  I did switch to 1.1x64 shortly after it came out; who could resist the speed increase?  Some of my orbital stations exceeded 900 parts at times.

So, either this bug is indeed due to a mod, or was eliminated in the switch to Unity 5 and the 64 bit version of the game.  Right now I've completely filled the tech tree just by exploring Mun and Minmus, and I'm itching to add some mods.

Share this post


Link to post
Share on other sites
  • 0

We also did a couple changes to the code which (hopefully) eliminated this bug. One can hope! :D

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.