You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "robot.py", line 59, in createObjects
wpilib.CameraServer.launch()
File "/usr/local/lib/python3.8/site-packages/wpilib/cameraserver.py", line 83, in launch
proc = subprocess.Popen(
File "/usr/local/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.8/subprocess.py", line 1637, in _execute_child
self.pid = _posixsubprocess.fork_exec(
OSError: [Errno 12] Cannot allocate 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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: