Project

General

Profile

Bug #26942

Strut Connectors used in EVA construction mode disconnect for unknown reasons

Added by [email protected] almost 4 years ago. Updated over 3 years ago.

Status:
New
Severity:
Low
Assignee:
-
Category:
EVA
Target version:
-
Start date:
12/29/2020
% Done:

0%

Version:
Platform:
Windows
Expansion:
Breaking Ground, Core Game, Making History
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

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.

persistent.sfs (3.7 MB) persistent.sfs [email protected], 12/29/2020 01:21 PM
20201229101608_1.jpg (186 KB) 20201229101608_1.jpg Print shot before leaving the station [email protected], 12/29/2020 01:22 PM
20201229101646_1.jpg (191 KB) 20201229101646_1.jpg Print shot before leaving the station [email protected], 12/29/2020 01:22 PM
20201229101655_1.jpg (193 KB) 20201229101655_1.jpg Print shot before leaving the station [email protected], 12/29/2020 01:22 PM
20201229101803_1.jpg (206 KB) 20201229101803_1.jpg Print shot after leaving the station [email protected], 12/29/2020 01:22 PM
20201229101809_1.jpg (202 KB) 20201229101809_1.jpg Print shot after leaving the station [email protected], 12/29/2020 01:22 PM
20201229101840_1.jpg (204 KB) 20201229101840_1.jpg Print shot after leaving the station [email protected], 12/29/2020 01:22 PM
20201229101927_1.jpg (264 KB) 20201229101927_1.jpg Notice that some cables closer to the middle disconnect, while some farther ones don't [email protected], 12/29/2020 01:27 PM
55532
55533
55534
55535
55536
55537
55538

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:

  1. launch a rover, drive it away to clear the runway
  2. launch a command module with an engineer with a strut
  3. have the engineer walk to the rover and connect the strut to it somewhere
  4. 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.

Also available in: Atom PDF