Bug #28196
1m Docking Ports Stop Working Occasionally
0%
Description
Win-64, all DLC, no mods, latest updates
This is an older bug which just appeared again. I rarely see it, but is has caused some real headaches.
As far as I can tell, this only happens on the normal 1m size ports, not the inline port or the jr. or sr. sizes.
Once in a while, a docking port stops working. I think it's related to EVA construction. Once this happens, I can move the port where I want it, but it will fail to magnetically attract the target port when it gets close, and will fail to connect even if your docking approach is perfect.
I once had to swap out a docking port on the fuel hauling ship at my mining site so the tanker rover could dock with it, and I've also had a port like this just "die" on the side of a space station, and had to deal with useless ports until I de-orbited that section of it. And now just today I've been struggling to dock a spent SRB to a ship. The first docking port works fine when I attach my tug ship to it, but when I bring it back to another ship and try to dock it to that ship, the second port won't react at all and I've now spent over 400 monoprop trying to get this done until I'm totally sure this is a bug and not just me failing at the game. And I'm usually really efficient with docking. I normally use more like 20 monoprop for a ship of that size...
The only workaround I know for this is to swap out the ports with another from somewhere else.
History
#1 Updated by Anth12 over 3 years ago
Did you try changing scenes? (Go to KSC screen and back?
#2 Updated by Deepspeed over 3 years ago
Yes, I have even reloaded the game and tried over several days of in-game time every time this has happened. It took me a while to realize what was happening.
To update the most recent one, I put another docking port right next to the dud port on that booster and was able to dock with it very easily using the new port. It was a "bad" port just as I thought.
These were radially attached ports and possibly all put on with EVA construction (but maybe not.)
Another note, that most recent bad port worked fine when I stuck it on the exhaust end of the thumper booster, but stopped working when I swapped it to a radial attachment for better transport arrangement.
I've seen this happen on both the normal clampotron and the the similar 1m airlock ports now that I think about it. But not the larger or smaller models.
#3 Updated by Deepspeed over 3 years ago
Once this happens, it stays "dead" even if I move the port to other places with an engineer. My best guess is that the variable which sets the port to the non-attractive, undockable mode which it uses just after undocking gets flipped to the "on" setting accidentally and is not reset properly during eva construction, rendering it useless.
Basically, I think you probably need better preset value checking/resetting and error handling for part variables during eva construction. This is also basically what causes the strut disconnect bugs.
#4 Updated by Anth12 over 3 years ago
No the Strut disconnect bug is related to part IDs. The strut will disconnect from the part of a craft that it didn't originally belong to. Different to this I am pretty sure
Do you have a quick save to show me this docking port issue? I cant replicate it.
I tried radial and node attachments and it still docked and undocked properly.
I swapped the docking ports and had them on the two different crafts. still no problem
#5 Updated by Anth12 over 3 years ago
- File screenshot164.png screenshot164.png added
We are talking about this docking port right?
Its definitely having some issues but they connect everytime. So I definitely need more information
#6 Updated by Deepspeed over 3 years ago
- File Main 3.sfs Main 3.sfs added
I've never shared saves, but I'll try to upload it for you. Let me know if you need something more.
A way to reproduce may be having a port attached to an end of something, and then moving it to a radial attachment with EVA construction.
The booster with the bad port in this save can be found on the side of a ship called "nuclear cupola". It has two radially attached ports. The good port is docked to the ship and the other radial port is a dud. The port on the end of the booster is also fine. You may have to use hacks to move it to LKO for testing. Maneuvers are a pain. It's a derpy ship without struts attached.
Also, I meant the strut bug is caused by a failure to whitewash part variables when moving things in EVA construction, same as the docking port thing seem to be. The details are technically different, but I think they are the same general type of problem.
#7 Updated by Deepspeed over 3 years ago
I just realized this may actually be caused by moving the docking port just after undocking from it, while the two recently disconnected ports are still within the range where they would be "dead" on purpose to prevent accidental re-docking. I'll bet if the variable for the port being turned off isn't reset before the port is removed by the engineer, it won't be reset when the port is reattached to a place out of range of the port it was recently undocked from, leaving it permanently off with no further checks to reset that variable and change it to the functioning state.
This always happens when I'm in the process of docking, rearranging, and re-docking to things while designing/tweaking docking port setups, so it makes sense that I grab the ports just after undocking when I'm not happy with the placement. I guess I don't always back away from the ports after undocking.
This kind of logic hang can also happen in transistor circuits when a circuit loses power while a transistor switch is in a state the circuit wasn't designed for it to start in. When the circuit is restarted, the transistor will be "stuck" in that flipped state with no way flip itself back to the starting state, leaving the circuit "bricked". You have to manually discharge the relevant capacitor to fix it, then redesign the circuit to handle this eventuality. In this case, you probably have to "manually" reset the variable that sets the docking port to the "off" state each time it is attached to something.
#8 Updated by Anth12 over 3 years ago
- File screenshot165.png screenshot165.png added
Well...thats something.
I wonder what the nullref has got to do with. Not sure if I have ever seen that happen. going from timewarp to normal (physics) is causing an issue
#9 Updated by Anth12 over 3 years ago
Yeah something is definitely screwed up on that craft. I will do some more testing later on.
#10 Updated by Deepspeed over 3 years ago
I've managed to replicate it. If you go to my Kerbin Station in that save and bring the engineer to the ladder of the ship with the mk2 capsule and s4 tank, you can do it too. Enter construction mode from the ladder, have her decouple the ship, then have her instantly move the port on the station a few feet to the side, then back the ship up a few meters and try to dock.
It took two tries, but the port I just moved is dead. I made sure to move it before the ships separated far enough to reactivate the ports.
#11 Updated by Deepspeed over 3 years ago
That craft does have much more thrust than the maneuver nodes show, so the burn times are always way off and I'm not sure why. (Actually I think they're not picking up the rear cluster of engines in the calculations due to the other docking port bug I mentioned in another report recently). But aside from that, the front half of the craft is ancient and has worked great.
But that unused radial docking port on the booster is definitely dead, regardless of what causes the nullref.
#12 Updated by ChewieRolo over 3 years ago
I think I might be having the same issue. When you right click the dead docking port, does it have the option to "Undock" even though it's not docked to anything? That's what I'm seeing.
#13 Updated by Cookie over 3 years ago
Beside incompatibility due to different sizes,"unresponsive" docking ports are unfortunately not uncommon - visible in the KSP.log as NullReferenceException: Object reference not set to an instance of an object
The reasons must lie somewhere in the code, but the log-files don't help much in that case.
The symptoms, though, these are visible, as oftentimes theModuleDockingNode
of a pocking port hasn't the correct state
(logged in the latest savefile [mostly the persistent.sfs] in the nodes "..Game->Flighstate->Vessel {name = Your vessel's name
}->Module {name = ModuleDockingNode
}:
- idle:
Ready
- within docking distance:
Acquire
for the active ship's docking port &Acquire (dockee)
for the target - connected: one side [mostly the former active docking port]
docked (docker)
& counterpartdocked (dockee)
- already attached in the VAB/SPH:
PreAttached
Only in the states Ready
& PreAttached
in the docking port PART
's MODULE
named ModuleDockingNode
the variable dockUId = 0
,
else the mentioned dockUId
has the value of the uid
-variable of the targeted/connected to docking port PART
.
Currently I know no other way than editing savefiles to solve this bug. Best quicksave when both docking ports are in close proximity and then re-load.
As workaround, to manually editing save-files, try the KML - persistent file editor[https://forum.kerbalspaceprogram.com/index.php?/topic/133971-win-kml-persistence-file-editor/], which recognizes problematic/insconsistent part attributes (e.g. of docking ports) and repairs them - it's also possible to edit values manually as the editor has a nice GUI and search function.
Sometimes you need to repeat these steps, so best use some form of notepad to copy&paste the uIDs of the docking ports.
If nothing helps (although mentioned state
and dockUid
are correct), and if you use the mod "KIS/KAS" you can also try to "force" the ports together with two winches and connectors.