Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

v0.9.2 computer 1 can't see computer 2's volume, can't copy to its volume #264

Open JoCRaM opened 10 years ago

JoCRaM commented 10 years ago

the first node on my ship can see the archive (0) and its volume (1) the seconds node can see the archive (0), its volume (1) and the first nodes volume(2)

while copying files to both volumes works on the second computer, you can't copy files to (1) from the first. - you get a flagrant error:

[LOG 20:14:03.529] Immediate mode error
[LOG 20:14:03.529] System.NullReferenceException: Object reference not set to an instance of an object
  at kOS.ExecutionContext.GetVolume (System.Object volID) [0x00000] in <filename unknown>:0 
  at kOS.CommandCopy.Evaluate () [0x00000] in <filename unknown>:0 
  at kOS.ImmediateMode.Update (Single time) [0x00000] in <filename unknown>:0 
JoCRaM commented 10 years ago

Unable to reproduce? boot race condition?

JoCRaM commented 10 years ago

I wasn't being impatient, I was adding a note that I couldn't reliably reproduce the issue, which suggested it may be a race condition.

It was overly terse - I was tired, I confused here with work -that's the sort of development note I would leave for a team member.

JoCRaM commented 10 years ago

The issue does "self heal" when parts are staged off the vessel.

MaHuJa commented 10 years ago

Ended up here by chance, looked at the code of kOS.ExecutionContext.GetVolume. I'm assuming you were using numbers to refer to them (as you wrote) - and found that only an improper initialization of Volumes should be able to cause an NRE. (If you were using strings, adding nullref to the volumes list can also cause it. Both are not supposed to happen.) I'm guessing you couldn't copy to (2) using the first either. As such, multiple computers may be irrelevant for reproducing this issue. Other than making it more likely to happen in any one attempt.

(And with that, I now have ~30 minutes of c# experience.)