Skip to content

[BUG] EGL context deconstruction failed #401

@MagiFeeney

Description

@MagiFeeney

Describe the bug

The code runs until the end where an error about EGL context deconstruction is triggered.

To Reproduce

Followed the example provided in the README:

import envpool

pixels = envpool.make(
    "WalkerWalk-v1",
    env_type="gymnasium",
    num_envs=2,
    from_pixels=True,
    frame_stack=3,
    render_width=84,
    render_height=84,
)
obs, info = pixels.reset()
assert obs.shape == (2, 9, 84, 84)
print("successful")

Outputs:

successful
terminate called after throwing an instance of 'std::runtime_error'
  what():  failed to make EGL context current

System info

  • Installation
# Create env
mamba create --name envpool python=3.12 -y

# Install envpool
uv pip install envpool

# Link EGL (Without this, envpool does not recognize EGL)
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGL.so.1:/usr/lib/x86_64-linux-gnu/libEGL.so.1 
  • Python version: 3.12.13

Script for running the test:

env MUJOCO_GL=egl MUJOCO_EGL_DEVICE_ID=0 python test-envpool.py

Additional context

EnvPool does not work out of box for DMC.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have read the documentation (required)
  • I have provided a minimal working example to reproduce the bug (required)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions