NRE detaching and reattaching part with FAR
Brusura opened this issue · 5 comments
When you detach and reattaching a part there are many NRE
Tested on:
KSP 1.1.2
KIS 1.2.9
FAR 15.6.3
ModuleManager.2.6.24
Steps to replicate:
- Go in SPH , add Pod with a structural fuselage, and a solar panel
- launch detach the solar panel and attach it on the pod
Ferram already said that is something related on how KIS create and destroy part in this post:
Output_log.txt
output_log.txt
craft file
Auto-Saved Ship.zip
Looks like you've provided enough data for reproducing the problem. Though, for now I don't have time to start working on the issue. If you could investigate the issue from the code perspective it would help a lot. First thing we need to know is the exact code line that throws NRE.
WIsh I could do that, but my programming skills are long forgotten sigh , I suppose I should start from installing unity 5 °_° grab both mod source and run some debugging tool dunno if I can do that I'll see
Well, after all it's not exactly KIS issue. I'd say its triggered by KIS but the issue itself in the FAR. When moving part KIS does decouple/couple of the moving part in the same frame. FAR reacts on the vessel change event and tries to start tracking a new vessel from the moving part. Which, of course, fails since there is no such vessel at the moment.
Need to figure out how to better deal with it. Probably the safest solution would be checking for vessel existence in FAR. On the other hand, I was going to let moving part hanging detaching for at least one fixed update to have it properly deinitialized but it's not that straightforward.