Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic on shutdown in X11: EGL_BAD_DISPLAY in eglDestroyContext #11742

Closed
rcorre opened this issue Feb 6, 2024 · 6 comments
Closed

Panic on shutdown in X11: EGL_BAD_DISPLAY in eglDestroyContext #11742

rcorre opened this issue Feb 6, 2024 · 6 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-Linux Specific to the Linux desktop operating system P-Crash A sudden unexpected crash

Comments

@rcorre
Copy link

rcorre commented Feb 6, 2024

Bevy version

dd15890

[Optional] Relevant system information

If you cannot get Bevy to build or run on your machine, please include:

cargo 1.75.0
Linux 6.7.3-arch1-2

If your bug is rendering-related, copy the adapter info that appears when you run Bevy.

2024-02-06T12:38:40.591703Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 3080", vendor: 4318, device: 8726, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "545.29.06", backend: Vulkan }

You should also consider testing the examples of our upstream dependencies to help isolate any setup-specific issue:

The following does not have the same issue:

cargo run --bin wgpu-examples boids

I also tried running this winit example with no issue.

What you did

cd bevy/examples
cargo run --example animated_fox --features x11

What went wrong

The example runs fine, but on closing the window I see:

2024-02-06T12:40:59.051614Z ERROR log: EGL 'eglDestroyContext' code 0x3008: EGL_BAD_DISPLAY error: In eglDestroyContext: Invalid EGLDisplay (0x59e18f2fc450)

Additional information

I'm using the dwm window manager, and closing the window using a keyboard shortcut.

[rcorre@midgar examples]$ cargo run --example animated_fox --features x11
    Finished dev [unoptimized + debuginfo] target(s) in 0.15s
     Running `/home/rcorre/src/bevy/target/debug/examples/animated_fox`
2024-02-06T12:40:56.768568Z  INFO bevy_winit::system: Creating new window "App" (0v1)
2024-02-06T12:40:56.768814Z  INFO log: Guessed window scale factor: 1.5833333333333333    
2024-02-06T12:40:56.912495Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 3080", vendor: 4318, device: 8726, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "545.29.06", backend: Vulkan }
Animation controls:
  - spacebar: play / pause
  - arrow up / down: speed up / slow down animation playback
  - arrow left / right: seek backward / forward
  - digit 1 / 3 / 5: play the animation <digit> times
  - L: loop the animation forever
  - return: change animation
2024-02-06T12:40:57.744098Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux rolling Arch Linux", kernel: "6.7.3-arch1-2", cpu: "", core_count: "6", memory: "31.3 GiB" }
2024-02-06T12:40:58.982950Z  INFO bevy_window::system: No windows are open, exiting
2024-02-06T12:40:58.984266Z  INFO bevy_winit::system: Closing window 0v1
2024-02-06T12:40:59.051614Z ERROR log: EGL 'eglDestroyContext' code 0x3008: EGL_BAD_DISPLAY error: In eglDestroyContext: Invalid EGLDisplay (0x59e18f2fc450)
@rcorre rcorre added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Feb 6, 2024
@rparrett rparrett added A-Rendering Drawing game state to the screen P-Crash A sudden unexpected crash O-Linux Specific to the Linux desktop operating system and removed S-Needs-Triage This issue needs to be labelled labels Feb 6, 2024
@BD103
Copy link
Member

BD103 commented Feb 6, 2024

From a brief Google search, it appears this is detected by eglGetError which describes EGL_BAD_DISPLAY as:

EGL_BAD_DISPLAY
An EGLDisplay argument does not name a valid EGL display connection.

I have no idea what that means and I couldn't find any more information online.

@doonv
Copy link
Contributor

doonv commented Feb 7, 2024

I am also experiencing this issue on Kubuntu 23.10.

@doonv
Copy link
Contributor

doonv commented Feb 7, 2024

This is caused by #11660.

@doonv
Copy link
Contributor

doonv commented Feb 7, 2024

May be related to gfx-rs/wgpu#2165.

@doonv
Copy link
Contributor

doonv commented Feb 9, 2024

Looks like #11737 fixed this issue! I can no longer reproduce the issue after this PR.

@rcorre
Copy link
Author

rcorre commented Feb 10, 2024

Confirmed #11737 fixed it for me as well. Thanks for the quick fix!

@rcorre rcorre closed this as completed Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-Linux Specific to the Linux desktop operating system P-Crash A sudden unexpected crash
Projects
None yet
Development

No branches or pull requests

4 participants