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 in wgpu-hal #79

Open
toyota-corolla0 opened this issue Jun 1, 2024 · 7 comments
Open

Panic in wgpu-hal #79

toyota-corolla0 opened this issue Jun 1, 2024 · 7 comments
Labels

Comments

@toyota-corolla0
Copy link

Nix dev environment on Debian 12:

user@debian:~/dev/harbor$ just run
RUST_LOG=harbor=debug,iced_wgpu=error,wgpu_core=error,info cargo run 
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.53s
     Running `target/debug/harbor`
 INFO  winit::platform_impl::platform::x11::window > Guessed window scale factor: 1.5
 WARN  wgpu_hal::gles::egl                         > EGL_MESA_platform_surfaceless not available. Using default platform
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-hal-0.19.4/src/gles/egl.rs:789:88:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: Recipe `run` failed on line 8 with exit code 101
@TonyGiorgio
Copy link
Contributor

Is this on the latest commit? 9717d09

@toyota-corolla0
Copy link
Author

Is this on the latest commit? 9717d09

Just confirmed, yes

@echennells
Copy link

I'm getting the same on ubuntu 24.04, using X11.

@TonyGiorgio
Copy link
Contributor

TonyGiorgio commented Jun 1, 2024

It could be X11 then. The nix dependencies include wayland but more work needs to go into it to work on X. We'll work on this as we can. It's hard to target every environment and also make it easy to self build in nix.

If you have enough developer dependencies installed on your local machine, it should be trivial to build it yourself outside of Nix. But that's very highly dependent on you solving your own developer environment.

@echennells
Copy link

I was able to get it running by installing this package. https://github.com/nix-community/nixGL

Specifically I installed it by doing:
nix-channel --add https://github.com/nix-community/nixGL/archive/main.tar.gz nixgl && nix-channel --update

And then ran:
nixGL just run

I was able to figure that out by following this post https://discourse.nixos.org/t/egl-program-is-unusable-when-built-with-nix/5976 , I don't know enough about wgpu-hal, egl, or nix to know exactly what's going on but seems to work.

@TonyGiorgio
Copy link
Contributor

I was able to get it running by installing this package. https://github.com/nix-community/nixGL

Specifically I installed it by doing:
nix-channel --add https://github.com/nix-community/nixGL/archive/main.tar.gz nixgl && nix-channel --update

And then ran:
nixGL just run

I was able to figure that out by following this post https://discourse.nixos.org/t/egl-program-is-unusable-when-built-with-nix/5976 , I don't know enough about wgpu-hal, egl, or nix to know exactly what's going on but seems to work.

Great find! Hopefully there's a way to put that straight into the nix flake directly.

@EthnTuttle
Copy link

nix develop
nix-channel --add https://github.com/nix-community/nixGL/archive/main.tar.gz nixgl && nix-channel --update
nix-env -iA nixgl.auto.nixGLDefault
nixGL just run

This sequence did it from me. thnx @echennells for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants