ARISE-Initiative / robomimic

robomimic: A Modular Framework for Robot Learning from Demonstration
MIT License
655 stars 201 forks source link

Error messages upon env deletion #97

Closed StoneT2000 closed 1 year ago

StoneT2000 commented 1 year ago

When creating an environment then rendering (rgb or human viewer) I seem to always get a verbose error output at the end as so

Created environment with name Lift
Action size is 7
Exception ignored in: <function MjRenderContext.__del__ at 0x7feb2adfa700>
Traceback (most recent call last):
  File "/home/stao/work/external/robosuite/build/__editable__.robosuite-1.4.1-py3-none-any/robosuite/utils/binding_utils.py", line 199, in __del__
    self.gl_ctx.free()
  File "/home/stao/work/external/robosuite/build/__editable__.robosuite-1.4.1-py3-none-any/robosuite/renderers/context/egl_context.py", line 149, in free
    EGL.eglMakeCurrent(EGL_DISPLAY, EGL.EGL_NO_SURFACE, EGL.EGL_NO_SURFACE, EGL.EGL_NO_CONTEXT)
  File "/home/stao/mambaforge/envs/rfcl-robomimic/lib/python3.9/site-packages/OpenGL/error.py", line 230, in glCheckError
    raise self._errorClass(
OpenGL.raw.EGL._errors.EGLError: EGLError(
        err = EGL_NOT_INITIALIZED,
        baseOperation = eglMakeCurrent,
        cArguments = (
                <OpenGL._opaque.EGLDisplay_pointer object at 0x7feb29130640>,
                <OpenGL._opaque.EGLSurface_pointer object at 0x7feb2aeb7240>,
                <OpenGL._opaque.EGLSurface_pointer object at 0x7feb2aeb7240>,
                <OpenGL._opaque.EGLContext_pointer object at 0x7fea4856dc40>,
        ),
        result = 0
)
Exception ignored in: <function EGLGLContext.__del__ at 0x7feb2adfa550>
Traceback (most recent call last):
  File "/home/stao/work/external/robosuite/build/__editable__.robosuite-1.4.1-py3-none-any/robosuite/renderers/context/egl_context.py", line 155, in __del__
    self.free()
  File "/home/stao/work/external/robosuite/build/__editable__.robosuite-1.4.1-py3-none-any/robosuite/renderers/context/egl_context.py", line 149, in free
    EGL.eglMakeCurrent(EGL_DISPLAY, EGL.EGL_NO_SURFACE, EGL.EGL_NO_SURFACE, EGL.EGL_NO_CONTEXT)
  File "/home/stao/mambaforge/envs/rfcl-robomimic/lib/python3.9/site-packages/OpenGL/error.py", line 230, in glCheckError
    raise self._errorClass(
OpenGL.raw.EGL._errors.EGLError: EGLError(
        err = EGL_NOT_INITIALIZED,
        baseOperation = eglMakeCurrent,
        cArguments = (
                <OpenGL._opaque.EGLDisplay_pointer object at 0x7feb29130640>,
                <OpenGL._opaque.EGLSurface_pointer object at 0x7feb2aeb7240>,
                <OpenGL._opaque.EGLSurface_pointer object at 0x7feb2aeb7240>,
                <OpenGL._opaque.EGLContext_pointer object at 0x7fea4856dc40>,
        ),
        result = 0
)

Any idea what causes this? Doesn't break anything but it would be nice to be able to not have this popup each time.

amandlek commented 1 year ago

Duplicate of https://github.com/ARISE-Initiative/robomimic/issues/56 - unfortunately this seems to be coming from MuJoCo itself. While annoying, it does not affect any functionality in the code, and can be safely ignored.