shadowmage45 / SSTULabs

Dev repository for testing/unfinished KSP parts/plugins/etc.
Other
62 stars 41 forks source link

SC-GEN-IPA - Petal Adapter and Docking Ports Cause Null-Refs with KJR installed. #298

Closed lynwoodm closed 8 years ago

lynwoodm commented 8 years ago

I was testing the integrated docking ports on the Lander Core pods when the latest build of SSTU came out. I was getting an odd occurrence when I tried to dock two command pods (in this case the Orion/LC3 CMs) off of one launched rocket. When I attempted to dock, at the moment of the docking ports "latching" together, they would end up not docking and the camera focus would shift to Kerbin. But, to correct this, all you needed to do was to go to the space center and return to the orbiting vessels and re-dock and it does so successfully. The mods I had installed were barely minimum of KJR, MJ, Hyperedit and Hanger Extender. Found in this log.

SSTU with KJR.txt

I found this discrepancy in the log at the moment of docking

[LOG 19:39:08.224] SSTUInterstageFairing updating shielding status for module: SSTU-SC-GEN-IPA-N (SSTUTools.SSTUAirstreamShield) :: enabled: False [LOG 19:39:08.232] Updated shielding status, new shielded part count: 0 [LOG 19:39:19.897] Docking to vessel Untitled Space Craft Ship [WRN 19:39:19.901] [PartJoint]: None of the provided nodes was valid! [LOG 19:39:19.903] [PlanetariumCamera]: Focus: Kerbin

Then i had to go back to the space center so I could get control of the vessels in orbit.

I took KJR out and Hanger Extender with the latest test with just MJ and Hyperedit. When I finally got the rocket into orbit and did a docking maneuver, it docked normally. As shown in this log.

SSTU without KJR.txt

Further testing implies that you can launch separate SSTU integrated docking port ships with KJR and can dock without the occurrence happening. And it also doesn't occur with just the docking ports by themselves or with the stock docking ports, just when they are used on the integrated command pods.

Sorry I don't have any pictures or video and had to go into detail by word, but I hope the logs show this

shadowmage45 commented 8 years ago

Have tried out a couple variations of craft to see what is going on...

All tests done with KJR installed:

First test was two SC-C CM's docked to eachother; hyper-edit up, quick-save, quick-load (fixes the HE bug). Undock, then redock; no problems. Quick-load. Undock. Quick-save, quick-load. Redock; no problems.

Second test; SC-C-CM with a LC2 pod inside of a petal-adapter. Same as above; HE to orbit, quick-save, quick load. Decouple top payload/deploy panels. Turn the CSM around and dock to LC2-POD = null-ref spam.


[EXC 18:58:18.988] NullReferenceException
    KerbalJointReinforcement.KJRMultiJointManager.CheckMultiJointBetweenParts (.Part testPart1, .Part testPart2)
    KerbalJointReinforcement.KJRManager.UpdatePartJoint (.Part p)
    KerbalJointReinforcement.KJRManager.RunVesselJointUpdateFunction (.Vessel v)
    KerbalJointReinforcement.KJRManager.OnVesselWasModified (.Vessel v)
    EventData`1[Vessel].Fire (.Vessel data)
    Part.Couple (.Part tgtPart)
    ModuleDockingNode.DockToVessel (.ModuleDockingNode node)
    ModuleDockingNode.<SetupFSM>m__34C ()
    KerbalFSM.RunEvent (.KFSMEvent evt)
    KerbalFSM.updateFSM (KFSMUpdateMode mode)
    KerbalFSM.UpdateFSM ()
    ModuleDockingNode.Update ()

Third test; reloaded the quick-save from test2; decoupled internal payload on the petal adapter, -then- decoupled the CSM from the top; docked to the free-floating LC2-POD, no problems.

Fairly certain this is related to either the petal-adapter or LC-POD parts and not necessarily the docking ports themselves.

Going to try and see if I can duplicate it with other pods/parts and/or try and narrow it down a bit.

lynwoodm commented 8 years ago

That's mostly what I didn't do was quick save/load. I was testing the launch/orbit/docking procedure from the ground up, to see if there would be any problems. Because, I forget to quick save due to if it fails, I usually just start over again from launch. So, yeah, the quick save/load is the same thing as me doing the procedure and it messing up and going to the space center and going back to the vessels in orbit and completing the sequence.

shadowmage45 commented 8 years ago

Have also confirmed that if you decouple the petal adapter top node (deploy) and quick-save / quick-load, the problem does not manifest. (although, the petal-adapter apparently loses its deployed state somehow, or maybe just doesn't update its animation properly..)

Tried using the LC2 pod and the SC-C-CSM with some decouplers to simulate the petal adapter.... no problem with those.

Can you confirm if you have seen this problem when -not- using the petal adapter? And if so, with what combination of parts?

-- Feel free to use Hyper-edit to get things into orbit for testing; just do a quick-save and quick-load afterwards as that appears to fix the hyper-edit related docking bugs.

lynwoodm commented 8 years ago

i can confirm when I do not use the petal adapter, there are no problems. I had launched 2 SSTU Ares I's and an LC2 with tank/Descent Engine on a Delta-type rocket with your fairing base. Rendezvous with every craft and they all docked normally no problems. I even tried docked the LC2 pod with a craft with a stock docking port and it didn't have any problems. Again, I didn't use Hyperedit anything, I launched everything.

I just tested with the stock docking ports, KJR and the petal adapter. I used a MK 1-2 CM with the A series SM and made a stock lander with fuel tank, engine and the mk 2 lander can, all with stock docking ports and SSTU launcher and the petal adapter. Launched into orbit and tried to dock with the lander can, the problem popped back up. So, it's definately the petal adapter and KJR not playing well together KSP Stock Docking Ports Log.txt

And quick save/load does fix the issue regardless if it's hyperedited into orbit or launched. I just choose to emphasize on launching to portrait a person who wouldn't normally use hyperedit to do so.

shadowmage45 commented 8 years ago

Going to investigate the updated KJR dev version over the weekend; there is little to nothing that I can do on my end to solve this problem; the solution will need to come from KRJ.

shadowmage45 commented 8 years ago

Can confirm that this issue is fixed with the dev version of KJR; will just need to wait for ferram to publish a full release after the testing period is over.

shadowmage45 commented 8 years ago

Leaving this one open until KJR is publicly updated, mostly for an FYI / known-issue tracking.

shadowmage45 commented 8 years ago

Updated KJR is availble; closing to keep the issues list clean.