dm_control: mujoco.FatalError: Offscreen framebuffer is not complete, error 0x8cdd
I’m getting this error while using the EGL rendering backend:
mujoco.FatalError: Offscreen framebuffer is not complete, error 0x8cdd
The error is rare (but still fatal for a long job) so not sure if I can provide a script to reproduce. I believe this might be a known issue though? Thanks so much!
The full traceback:
result = self.run_episode()
File "/acme/environment_loop.py", line 94, in run_episode
timestep = self._environment.reset()
File "/acme/wrappers/base.py", line 55, in reset
return self._environment.reset()
File "/acme/wrappers/single_precision.py", line 40, in reset
return self._convert_timestep(self._environment.reset())
File "/dm_control/composer/environment.py", line 339, in reset
return self._reset_attempt()
File "/dm_control/composer/environment.py", line 349, in _reset_attempt
self._recompile_physics_and_update_observables()
File "/dm_control/composer/environment.py", line 243, in _recompile_physics_and_update_observables
self._observation_updater.reset(self._physics_proxy, self._random_state)
File "/dm_control/composer/observation/updater.py", line 165, in reset
enabled.observation_callable())
File "/dm_control/composer/observation/observable/mjcf.py", line 266, in get_observation
pixels = physics.render(
File "/dm_control/mujoco/engine.py", line 216, in render
camera = Camera(
File "/dm_control/mujoco/engine.py", line 695, in __init__
if self._physics.contexts.mujoco is not None:
File "/dm_control/mujoco/engine.py", line 526, in contexts
self._make_rendering_contexts()
File "/dm_control/mujoco/engine.py", line 512, in _make_rendering_contexts
mujoco_context = wrapper.MjrContext(self.model, render_context)
File "/dm_control/mujoco/wrapper/core.py", line 606, in __init__
ptr = ctx.call(mujoco.MjrContext, model.ptr, font_scale)
File "/dm_control/_render/executor/render_executor.py", line 138, in call
return func(*args, **kwargs)
mujoco.FatalError: Offscreen framebuffer is not complete, error 0x8cdd
(EnvironmentLoop pid=593400) Exception ignored in: <function MjrContext.__del__ at 0x149e24064280>
(EnvironmentLoop pid=593400) Traceback (most recent call last):
(EnvironmentLoop pid=593400) File "/dm_control/mujoco/wrapper/core.py", line 636, in __del__
(EnvironmentLoop pid=593400) self.free()
(EnvironmentLoop pid=593400) File "/dm_control/mujoco/wrapper/core.py", line 624, in free
(EnvironmentLoop pid=593400) ptr = self.ptr
(EnvironmentLoop pid=593400) File "/dm_control/mujoco/wrapper/core.py", line 614, in ptr
(EnvironmentLoop pid=593400) return self._ptr()
(EnvironmentLoop pid=593400) AttributeError: 'MjrContext' object has no attribute '_ptr'```
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 27 (20 by maintainers)
Thank you @vaxenburg for sharing the script to reproduce the problem. In this particular case, I suspect that this is caused by the first call
initialized some EGL resources, while
inherit the resources (which it shouldn’t) as a subprocess (because by default python
forks). When the subprocess start to initialize EGL again, something bad happened.I was able to get rid of the issue in your particular case, by switching start method of
multiprocessingtospawn,Here is a complete self-contained snippet that, for me, consistently errors with
mujoco.FatalError: Offscreen framebuffer is not complete, error 0x8cddThis one, on all machines:
| NVIDIA-SMI 525.60.13 Driver Version: 525.60.13 CUDA Version: 12.0 |No updates on my end. I’m still having this problem…