google-deepmind / google-deepmind/mujoco

`mujoco_studio` crashes on Windows + AMD: `wglMakeCurrent` failed (error 2000)

Open
#3,533 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
15.2k
Forks
1.8k
Avg merge
10d 16h
Merged PRs (30d)
25

Description

### Intro

Hi!

I use MuJoCo for a human body simulation project.

### My setup

- MuJoCo 3.12.0 official Windows binary
- Windows 11 (build 26200), x64
- GPU: AMD Radeon RX 6700 XT (no NVIDIA)
- Driver: 32.0.21013.1000, OpenGL 4.6 (25.6.1.250522)

### What's happening? What did you expect?

`mujoco_studio.exe` with the default Filament OpenGL backend crashes on startup:

```
FEngine (64 bits) created at 0000023FDC17B1A0 (threading is enabled)
FEngine resolved backend: OpenGL
[ATI Technologies Inc.], [AMD Radeon RX 6700 XT], [4.6.0 Compatibility Profile Context 25.6.1.250522], [4.60]
Feature level: 3
Active workarounds:
allow_read_only_ancillary_feedback_loop
Backend feature level: 3
FEngine feature level: 1
PanicLog
in makeCurrent:296
reason: wglMakeCurrent() failed. hdc = 00000000620110F2

Windows error code: 2000. (null)
Link error in "mipmapDepth":
- glError=0
- LogInfo="(null)"
Postcondition
in operator():407
reason: OpenGL program mipmapDepth failed to link or compile
```

I expected Studio to open. Error 2000 is `ERROR_INVALID_PIXEL_FORMAT`. The shader error looks secondary (no current GL context).

On the same machine:

- `mujoco_studio.exe --gfx=classic` works
- `simulate.exe` works
- `mujoco_studio.exe --gfx=vulkan` → `Selected backend not supported in this build.`

This is not the AMD `simulate` sidebar bug (#639). Studio never gets a valid context.

SDL creates the window with `SDL_WINDOW_OPENGL` and MSAA (`window.cc`). Filament then builds its context on a dummy window with a different pixel format and calls `wglMakeCurrent` on the SDL window DC. AMD rejects that mismatch.

### Steps for reproduction

1. Unzip MuJoCo 3.12.0 for Windows.
2. Run `bin\mujoco_studio.exe` (no flags).
3. Process aborts with the log above.

### Minimal model for reproduction

Not needed.

### Code required for reproduction

Not needed.

### Confirmations

- [x] I searched the [latest documentation](https://mujoco.readthedocs.io/en/latest/overview.html) thoroughly before posting.
- [x] I searched previous [Issues](https://github.com/google-deepmind/mujoco/issues) and [Discussions](https://github.com/google-deepmind/mujoco/discussions), I am certain this has not been raised before.

Contributor guide

Open the contributing guide

Research direction

Start with window.cc and reproduce the default mujoco_studio.exe launch on the listed Windows AMD setup, comparing it with --gfx=classic. Trace the SDL window and Filament context setup described in the report; done means the default OpenGL backend starts successfully without the wglMakeCurrent error while the existing classic path remains working.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.