Bug #26942
Strut Connectors used in EVA construction mode disconnect for unknown reasons
0%
Description
I am building a space station and in its current size it is in need of structural reinforcements. When I try to place Strut connectors around the station, some of them disconnect from their end points after I leave the station for Tracking Station or the Space Center. I can't see a pattern to the cables that disappear.
I'm leaving my save file for testing. The station is named Kerbin Space Station and is close to a synchronous orbit around Kerbin.
History
#1 Updated by dok_377 almost 4 years ago
Can confirm. Struts just disconnect after the scene reload with no traceable or reproducible cause.
Only have this in the console when clicking the first part of the strut:
[LOG 15:23:27.190] [CompoundPart]: Part: CompoundPart craftID: 4290482420 No target found with craftID: 4294415250
[LOG 15:23:27.190] [CompoundPart]: Part: CompoundPart craftID: 4290482420 No target found with craftID: 4294415938
[LOG 15:23:27.190] [CompoundPart]: Part: CompoundPart craftID: 4290482420 No target found with craftID: 4292408738
[LOG 15:23:27.190] [CompoundPart]: Part: CompoundPart craftID: 4290482420 No target found with craftID: 4294414562
[LOG 15:23:27.216] [CompoundPart]: Part: CompoundPart craftID: 0 No target found with craftID: 4294079290
#2 Updated by dok_377 almost 4 years ago
It might have something to do with the craft you trying attach struts to. I can only attach struts normally to the original craft I launched an engineer kerbal with. If I try to do that with the same kerbal, but different craft - struts disappear after the reload. Only a few struts stayed. Very strange.
#3 Updated by dpirch over 3 years ago
The bug is still present in 1.11.2.
#4 Updated by dpirch over 3 years ago
This seems to happen when the strut is from a different launch than the target part it connects to (the second-click part).
To reproduce this:
- launch a rover, drive it away to clear the runway
- launch a command module with an engineer with a strut
- have the engineer walk to the rover and connect the strut to it somewhere
- save and reload -> the strut is not connected anymore.
Apparently the target part is identified by its cid in the save file, but in docked vessels the cid may not be unique (for example when launching the same ship twice and docking them), so the game probably looks for a part which also has the same mid as the strut... which was ok before there was an EVA construction mode because all parts from the same launch (including struts stored in containers) have the same mid. But now we can add a strut with a different mid, which will result in something like this:
PART { name = Mark2Cockpit cid = 4293887110 uid = 2609479683 mid = 561745801 ... PART { name = strutConnector cid = 4293534200 uid = 3183770596 mid = 1311823345 ... PARTDATA { tgt = 4293887110 ...
When loading this, it logs
"[CompoundPart]: Part: CompoundPart craftID: 4293534200 No target found with craftID: 4293887110"
to Player.log and the strut isn't connected anymore. After editing the save file and changing the mid of the strut to that of the target part, it loads correctly.
#5 Updated by xmnovotny over 3 years ago
It's 4 months without response from KSP team even there was all investigated and the cause was found.
So I had to learn how KSP mods works and fix this annoying bug myself.
You can download it here: https://github.com/xmnovotny/KSP-CModuleLinkedMeshFix
Thanks to dpirch for finding easy way how to fix it.
#6 Updated by odin over 3 years ago
Interesting.
I'd noticed that there was a link between the vessels being launched together and struts sticking to them, but the problem (and solution) seems to be simpler than I'd expected. It seems odd that this bug isn't getting more traction.
#7 Updated by lhervier over 3 years ago
The problem is that struts are referencing their target part using a CraftID (instead of - for example - the FlightId) in their "tgt" attribute. At runtime, KSP will then use the strut's MissionID and the tgt to find the target. It works well even when a vessel is docked to another instance of itself.
But with EVA Construction Mode, this produces the described bug because you can link a strut to a part that does not have the same MissionID. But that's not enough...
It seems that there is also a problem when adding parts stacked in the same inventory location.
On the newly attached part, the game will :
- Set a MissionID to "0" (it seems that it only set the MissionID on struts... with the wrong value, ok)
- Keep the CraftID of the part present in the inventory location
So, when adding two parts from the same inventory location, they will have the same CraftID and MissionID.
And now, if you try to link a strut to this new part, this will fail, because the MissionID/CraftID couple associated with the part is not unique.
Before seeing your plugin, I made one myself which takes into account the two facets of the problem. But mine is not solving the problem in existing savegames...
xmnovotny Maybe you can complete your plugin ? If I have time, I may send you a pull request.
Here is my version of the plugin : https://github.com/lhervier/KSP-Bug26942Fix
#8 Updated by kaa253 over 3 years ago
This bug is also confirmed for 1.12.1 Linux version. It is presumably present in all KSP versions.
Now that Kerbal Joint Reinforcement mod isn't working on account of the Dock Rotate function this bug is game breaking. Reloading a space station with all the EVA struts disconnected just invites in the shake-to-destruction Kraken.
Thanks xmnovotny for your plugin.
#9 Updated by dpirch over 3 years ago
Seems to be fixed in 1.12.2!
The changelog says "Fix compound parts losing their connections when edited in EVAConstruction mode with dropped parts."
I can't reproduce the problem anymore with the steps from my comment #4. In the save file struts now have a "tpersID" value referencing the target's persistentId, which likely solves the problem.