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

Example is not working on MacBook Pro 2023 M2 Max MacOS Sonoma #8950

Open
T-Damer opened this issue Jun 25, 2023 · 5 comments
Open

Example is not working on MacBook Pro 2023 M2 Max MacOS Sonoma #8950

T-Damer opened this issue Jun 25, 2023 · 5 comments
Labels
O-MacOS Specific to the MacOS (Apple) desktop operating system P-Crash A sudden unexpected crash S-Blocked This cannot move forward until something else changes

Comments

@T-Damer
Copy link

T-Damer commented Jun 25, 2023

Bevy version

git checkout latest

Relevant system information

cargo --version
cargo 1.70.0 (ec8a8a0ca 2023-04-25)
SystemInfo { os: "MacOS 14.0 ", kernel: "23.0.0", cpu: "Apple M2 Max", core_count: "12", memory: "64.0 GiB" }
AdapterInfo { name: "Apple M2 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }

Display settings (using built-in Retina):
CleanShot 2023-06-25 at 11 35 51@2x

What you did

Tried setup guide from bevy web-site, it fails to on cargo run --example breakout

What went wrong

It should run an example, but it throws an error, looks like it tries to create too big texture:

cargo run --example breakout
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
     Running `target/debug/examples/breakout`
2023-06-25T08:22:10.737642Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M2 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2023-06-25T08:22:11.003041Z  INFO bevy_winit::system: Creating new window "Bevy App" (0v0)
2023-06-25T08:22:11.025435Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "MacOS 14.0 ", kernel: "23.0.0", cpu: "Apple M2 Max", core_count: "12", memory: "64.0 GiB" }
2023-06-25 11:22:11.125 breakout[12073:99431] CAMetalLayer ignoring invalid setDrawableSize width=4294967295.000000 height=4294967295.000000
2023-06-25T08:22:11.125819Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
thread 'Compute Task Pool (5)' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_texture
      note: label = `main_texture_a`
    Dimension X value 4294967295 exceeds the limit of 16384

', /Users/Damer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.15.1/src/backend/direct.rs:3024:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'Compute Task Pool (5)' panicked at 'A system has panicked so the executor cannot continue.: RecvError', crates/bevy_ecs/src/schedule/executor/multi_threaded.rs:194:60
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /Users/Damer/Downloads/bevy/crates/bevy_tasks/src/task_pool.rs:376:49
thread 'Compute Task Pool (0)' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', crates/bevy_render/src/pipelined_rendering.rs:136:45
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/Damer/Downloads/bevy/crates/bevy_tasks/src/task_pool.rs:376:49

Additional info

Related issue - #4869

@T-Damer T-Damer added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jun 25, 2023
@superdump
Copy link
Contributor

4294967295 is 2^32 - 1. Odd that that happens on an M2 Max and not an M1 Max, as far as I know. I wonder if it’s a reserved value that should have been checked somewhere (e.g. u32::MAX).

@mockersf
Copy link
Member

It's a bug with the beta of next macOS - it works fine with the released macOS

rust-windowing/winit#2876

@mockersf mockersf added O-MacOS Specific to the MacOS (Apple) desktop operating system S-Blocked This cannot move forward until something else changes and removed S-Needs-Triage This issue needs to be labelled labels Jun 25, 2023
@T-Damer
Copy link
Author

T-Damer commented Jul 1, 2023

Current workaround is to use BorderlessFullscreen:

use bevy::window::WindowMode;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins.set(WindowPlugin {
            primary_window: Some(Window {
                mode: WindowMode::BorderlessFullscreen,
                ..default()
            }),
            ..default()
        }))
        .add_startup_system(setup)
        .run();
}

@Selene-Amanita Selene-Amanita added P-Crash A sudden unexpected crash and removed C-Bug An unexpected or incorrect behavior labels Jul 3, 2023
@T-Damer T-Damer changed the title Example is not working on MacBook Pro 2023 M2 Max Example is not working on MacBook Pro 2023 M2 Max MacOS Sonoma Jul 6, 2023
@ptxmac
Copy link
Contributor

ptxmac commented Aug 27, 2023

It's been fixed upstream in wind, so when the next wind is released it should be fixed by just upgrading the dependency.

I also have my own fix by patching the wing event-handler in bevy: ptxmac@edfa4e4

@mockersf
Copy link
Member

a new version of Bevy has been published with a patch for this, run cargo update to get Bevy 0.11.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-MacOS Specific to the MacOS (Apple) desktop operating system P-Crash A sudden unexpected crash S-Blocked This cannot move forward until something else changes
Projects
None yet
Development

No branches or pull requests

5 participants