ERROR: Offscreen framebuffer is not complete, error 0x8cdd

Discussion in 'Support requests' started by Yusuke Urakami, May 2, 2019.

  1. Thank you for your great work. I am not sure this is a pure Mujoco problem but I guess it is Mujoco's rendering issume. Also, I couldn't find any good reference on internet (https://github.com/openai/mujoco-py/issues/357) so let me ask you for help.

    I am running Multi-agent reinforcement learning (Distributed PPO) using pytorch multiprocess.
    My training frequently stopped during the training by the following errors.
    - ERROR: Offscreen framebuffer is not complete, error 0x8cdd
    - ERROR: Shadow framebuffer is not complete, error 0x8cdd

    Environment info
    - Using Mujoco2.0, Ubuntu 16.04, python3.6, mujoco-py 2.0.2.2
    - Running training on GPU server with headless mode. (Using DISPLAY=:0, running Xorg)
    - Currently running on one GPU so rendering happening only on this.

    Since my state space includes img, each worker (currently 2 workers in total) is rendering the img through mujoco-py's MjSim rendering function (https://github.com/openai/mujoco-py...6783d61fc382c58bf885/mujoco_py/mjsim.pyx#L131) as self.sim.render(camera_name='head', width=128, height=128, depth=False)

    I suspect that rendered images are filling up the buffer space. Have you ever heard or guess where this error come from?

    Thank you in advance!

    Yusuke
     
    Last edited: May 2, 2019
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    OpenGL error code 0x8CDD means "Unsupported Framebuffer Operation". The error checks are in the MuJoCo function mjr_makeContext which prepares the rendering context. It is not due to filling up buffer space. My guess is that whatever OpenGL implementation you are using does not support framebuffer objects. Headless mode is supposed to use EGL, because the regular video drivers (X11-based) are not installed. Are you using EGL? Do you ever get any images in your environment?

    The code sample record.cpp in the MuJoCo distribution can be used to test headless rendering independent of the python wrapper. So try that next. If it fails, the problem is with your OpenGL/EGL driver installation. If it works, that means the python wrapper is doing something that breaks on your system. I am not using that wrapper and will not be able to help you if the problem is there. But I believe many people have used headless rendering by now, so this is something peculiar about your setup.
     
  3. Thank you Emo for your reply!
    I've successfully avoided causing this error by stop making mujoco_env.viewer object for each training period. Mujoco-py makes new windows everytimes when I make viewer object by calling "_get_viewer()" https://github.com/openai/gym/blob/...0b0f459a53/gym/envs/mujoco/mujoco_env.py#L131 . And seems like this windows is filling up the framebuffer and ended up in this errors. I was creating viewer to render the image on Mujoco but recently I have stopped using viewer but switched to Unity rendering and the problem never happened again.