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

Crashing if run under Wayland. #27

Open
SolidStateDj opened this issue May 10, 2024 · 1 comment
Open

Crashing if run under Wayland. #27

SolidStateDj opened this issue May 10, 2024 · 1 comment

Comments

@SolidStateDj
Copy link

Running bevy_iced under Wayland will cause a crash.

thread '<unnamed>' panicked at src/render.rs:116:70:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in exclusive system `bevy_render::renderer::render_system`!
thread 'Compute Task Pool (9)' panicked at /home/dj/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.13.2/src/pipelined_rendering.rs:49:67:
called `Result::unwrap()` on an `Err` value: RecvError
thread '<unnamed>' panicked at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/thread/local.rs:260:26:
cannot access a Thread Local Storage value during or after destruction: AccessError
fatal runtime error: failed to initiate panic, error 5
zsh: IOT instruction (core dumped)  cargo run --example basic

The code tested is the basic.rs example provided, however, all other examples exhibit the exact same behavior.

Additionally, this occurs both when using the officially cloned repo, and when adding bevy_iced = {git = "https://github.com/tasgon/bevy_iced"} as a dependency to a separate project. Furthermore, all of the suggested compile time optimizations provided by Bevy have been tested and make no difference.

This has been tested on the exact same system under X11, and on a separate MacOS machine which both worked as expected.

I speculate that extracted_window.swap_chain_texture_view.as_ref().unwrap() is trying to gain information that it does not have access to under Wayland.

@badcodecat
Copy link

badcodecat commented May 24, 2024

I can reproduce this.
Although in a different, more complex project (multiple buttons, translated text, various rows and columns) everything works fine on wayland (both with and without the bevy/wayland feature).

UPDATE: after changing unrelated code, my other project now does not work

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

No branches or pull requests

2 participants