Open virtuald opened 4 years ago
because that's what fork does on linux? -- though I thought it was supposed to be copy on write?
I'm pretty sure it is, but I presume Linux reserves additional memory space so you don't randomly OOM by simply writing to your "existing" memory.
This user is importing rev, ctre, numpy, and lots of things, and my belief is that when we do a subprocess.run it's copying the entire process memory space (because that's what fork does on linux? -- though I thought it was supposed to be copy on write?), and failing to do so.
A workaround is to put the cameraserver launch at the beginning of the robot.py before anything else is imported. A bit of a hack, but it works. Need to think about a better way to address this.