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

physics-scenes example crashes on M3 Macbook Pro #17

Closed
dreness opened this issue Jan 2, 2024 · 3 comments
Closed

physics-scenes example crashes on M3 Macbook Pro #17

dreness opened this issue Jan 2, 2024 · 3 comments

Comments

@dreness
Copy link

dreness commented Jan 2, 2024

At da69f74 on main, the physics-scenes example crashes. The other examples work fine.

% RUST_BACKTRACE=full cargo run --package physics-scenes
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/physics-scenes`
2024-01-02T02:08:42.801295Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M3 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2024-01-02T02:08:42.882087Z  INFO bevy_prototype_debug_lines: Loaded 2d debug lines plugin.
2024-01-01 18:08:43.113 physics-scenes[48678:542943] CAMetalLayer ignoring invalid setDrawableSize width=4294967295.000000 height=4294967295.000000
2024-01-02T02:08:43.114471Z ERROR log: Handling wgpu errors as fatal by default    
thread 'Compute Task Pool (7)' panicked at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.14.2/src/backend/direct.rs:2403:5:
wgpu error: Validation Error

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

...

Full backtrace
 % RUST_BACKTRACE=full cargo run --package physics-scenes
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/physics-scenes`
2024-01-02T02:08:42.801295Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M3 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2024-01-02T02:08:42.882087Z  INFO bevy_prototype_debug_lines: Loaded 2d debug lines plugin.
2024-01-01 18:08:43.113 physics-scenes[48678:542943] CAMetalLayer ignoring invalid setDrawableSize width=4294967295.000000 height=4294967295.000000
2024-01-02T02:08:43.114471Z ERROR log: Handling wgpu errors as fatal by default    
thread 'Compute Task Pool (7)' panicked at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.14.2/src/backend/direct.rs:2403:5:
wgpu error: Validation Error

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


stack backtrace:
   0:        0x102819d68 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb1669d376cd16fb9
   1:        0x1028292d8 - core::fmt::write::hfb70cbdb2260ac51
   2:        0x102810390 - std::io::Write::write_fmt::h70ee144642a582c5
   3:        0x102819ba4 - std::sys_common::backtrace::print::h404168d6289bebbe
   4:        0x1028089ac - std::panicking::default_hook::{{closure}}::hcad9841f2663dad9
   5:        0x102808704 - std::panicking::default_hook::he7ca7c46dc216a28
   6:        0x102808e70 - std::panicking::rust_panic_with_hook::h501076dcf33dacb0
   7:        0x10281a230 - std::panicking::begin_panic_handler::{{closure}}::h0665b0808da4d87c
   8:        0x102819f70 - std::sys_common::backtrace::__rust_end_short_backtrace::h6d7b13146df55e47
   9:        0x102808c08 - _rust_begin_unwind
  10:        0x1028de82c - core::panicking::panic_fmt::h5de4b603c189570c
  11:        0x101c546a4 - wgpu::backend::direct::default_error_handler::h3e1383525fa748a7
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.14.2/src/backend/direct.rs:2403:5
  12:        0x101c56ea0 - core::ops::function::Fn::call::h95c29fb9c2c907f5
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/core/src/ops/function.rs:79:5
  13:        0x101c94978 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h5a6583d55ff492ac
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/alloc/src/boxed.rs:2021:9
  14:        0x101c54400 - wgpu::backend::direct::ErrorSinkRaw::handle_error::h6731ccb9e9f5761d
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.14.2/src/backend/direct.rs:2389:17
  15:        0x101c49744 - wgpu::backend::direct::Context::handle_error::h31f8fa20f18289f9
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.14.2/src/backend/direct.rs:254:9
  16:        0x101c51d90 - <wgpu::backend::direct::Context as wgpu::Context>::device_create_texture::h42f0f98d425d9373
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.14.2/src/backend/direct.rs:1511:13
  17:        0x101c6a538 - wgpu::Device::create_texture::hadb5b634f865c837
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.14.2/src/lib.rs:2227:17
  18:        0x1019cde14 - bevy_render::renderer::render_device::RenderDevice::create_texture::h661c3b59f8a80b2c
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.9.1/src/renderer/render_device.rs:146:28
  19:        0x1019ff770 - bevy_render::texture::texture_cache::TextureCache::get::hea22b842024e63a0
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.9.1/src/texture/texture_cache.rs:69:31
  20:        0x101a05f34 - bevy_render::view::prepare_view_targets::{{closure}}::h1958241b61e411a8
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.9.1/src/view/mod.rs:318:32
  21:        0x101a7ac48 - hashbrown::map::Entry<K,V,S,A>::or_insert_with::h096f6a60b910a7bf
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.12.3/src/map.rs:4955:50
  22:        0x101a05cd0 - bevy_render::view::prepare_view_targets::hf2c3937748cb6d7d
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.9.1/src/view/mod.rs:304:37
  23:        0x1019a4bdc - core::ops::function::FnMut::call_mut::he54be079962af05e
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/core/src/ops/function.rs:166:5
  24:        0x1019e0c78 - core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::hae8e2389b93c4fcf
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/core/src/ops/function.rs:294:13
  25:        0x1019334bc - <Func as bevy_ecs::system::function_system::SystemParamFunction<(),Out,(F0,F1,F2,F3,F4,F5,F6),()>>::run::call_inner::h57d0b6ef94e6f43e
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.9.1/src/system/function_system.rs:579:21
  26:        0x1019d8b54 - <Func as bevy_ecs::system::function_system::SystemParamFunction<(),Out,(F0,F1,F2,F3,F4,F5,F6),()>>::run::hcd52d5c3573a11b1
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.9.1/src/system/function_system.rs:582:17
  27:        0x101927d84 - <bevy_ecs::system::function_system::FunctionSystem<In,Out,Param,Marker,F> as bevy_ecs::system::system::System>::run_unsafe::hc0db86fb1beded8d
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.9.1/src/system/function_system.rs:409:19
  28:        0x1026126c8 - bevy_ecs::schedule::executor_parallel::ParallelExecutor::prepare_systems::{{closure}}::h13b4a9b70129efd9
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.9.1/src/schedule/executor_parallel.rs:218:26
  29:        0x102612b98 - bevy_ecs::schedule::executor_parallel::ParallelExecutor::prepare_systems::{{closure}}::h5bfbf590785a0b4c
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.9.1/src/schedule/executor_parallel.rs:258:21
  30:        0x102630f4c - async_executor::Executor::spawn::{{closure}}::hdfa4cbb3b1266823
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.8.0/src/lib.rs:158:20
  31:        0x1025d742c - async_task::raw::RawTask<F,T,S,M>::run::{{closure}}::hf23cf1932558c3ad
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.6.0/src/raw.rs:557:21
  32:        0x1025ffca4 - core::ops::function::FnOnce::call_once::h7cc89f464ed7f259
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/core/src/ops/function.rs:250:5
  33:        0x1025fe990 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::he32a6723fbf46413
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/core/src/panic/unwind_safe.rs:271:9
  34:        0x1025ecec4 - std::panicking::try::do_call::h2d946a89c4001790
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/panicking.rs:504:40
  35:        0x1025f65a4 - ___rust_try
  36:        0x1025ec954 - std::panicking::try::h07006ee77041e0d1
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/panicking.rs:468:19
  37:        0x102616c74 - std::panic::catch_unwind::hb2d4a5c927fce741
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/panic.rs:142:14
  38:        0x1025d45e8 - async_task::raw::RawTask<F,T,S,M>::run::hab3b8f2dfb55b0fc
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.6.0/src/raw.rs:556:23
  39:        0x102793d18 - async_task::runnable::Runnable<M>::run::h5af269914de72c69
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.6.0/src/runnable.rs:784:18
  40:        0x10276f510 - async_executor::Executor::run::{{closure}}::{{closure}}::h3a84072c6a193c74
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.8.0/src/lib.rs:254:21
  41:        0x102773148 - <futures_lite::future::Or<F1,F2> as core::future::future::Future>::poll::hac72a0107de4bd16
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-2.1.0/src/future.rs:449:33
  42:        0x10276f0fc - async_executor::Executor::run::{{closure}}::hb0acf0e4358d38a2
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.8.0/src/lib.rs:261:32
  43:        0x10276d66c - futures_lite::future::block_on::{{closure}}::ha6a95303cb5c8439
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-1.13.0/src/future.rs:89:27
  44:        0x10277ff94 - std::thread::local::LocalKey<T>::try_with::hcae0fdbfeac146fe
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/thread/local.rs:270:16
  45:        0x10277f6e8 - std::thread::local::LocalKey<T>::with::hda32c7a134385ccc
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/thread/local.rs:246:9
  46:        0x10276d500 - futures_lite::future::block_on::h09620a6cb2474edb
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-lite-1.13.0/src/future.rs:79:5
  47:        0x10277d998 - bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::{{closure}}::{{closure}}::hd0ffaf4e8677c42a
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_tasks-0.9.1/src/task_pool.rs:128:37
  48:        0x1027756e4 - std::panicking::try::do_call::hada33e1e715ddeb4
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/panicking.rs:504:40
  49:        0x1027784d8 - ___rust_try
  50:        0x1027755c8 - std::panicking::try::hf0c6f97b7be6a25c
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/panicking.rs:468:19
  51:        0x10277f5dc - std::panic::catch_unwind::h88aba44acb1e79cd
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/panic.rs:142:14
  52:        0x10277d81c - bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::{{closure}}::h934cef5b7eb24c09
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_tasks-0.9.1/src/task_pool.rs:122:43
  53:        0x10277f8a0 - std::thread::local::LocalKey<T>::try_with::h15c632ac059fa864
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/thread/local.rs:270:16
  54:        0x10277f658 - std::thread::local::LocalKey<T>::with::h689688937fb80522
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/thread/local.rs:246:9
  55:        0x10277d79c - bevy_tasks::task_pool::TaskPool::new_internal::{{closure}}::{{closure}}::h96d4ac382bc9312c
                               at /Users/andre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_tasks-0.9.1/src/task_pool.rs:120:25
  56:        0x102778958 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc0063aa738ced126
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/sys_common/backtrace.rs:154:18
  57:        0x102775384 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h33aa4fcb22f5efd5
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/thread/mod.rs:529:17
  58:        0x1027788d4 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::he7a39c47987e755e
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/core/src/panic/unwind_safe.rs:271:9
  59:        0x102775668 - std::panicking::try::do_call::h5a62fb3f575abce8
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/panicking.rs:504:40
  60:        0x1027784d8 - ___rust_try
  61:        0x102775528 - std::panicking::try::h90e289fdc379b615
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/panicking.rs:468:19
  62:        0x102775218 - std::panic::catch_unwind::hbedc8a95052e4156
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/panic.rs:142:14
  63:        0x102775218 - std::thread::Builder::spawn_unchecked_::{{closure}}::h12acf89870fdc88f
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/std/src/thread/mod.rs:528:30
  64:        0x102779220 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h3b14b45ea70ec493
                               at /private/tmp/rust-20231125-5509-twux35/rustc-1.74.0-src/library/core/src/ops/function.rs:250:5
  65:        0x1028131ec - std::sys::unix::thread::Thread::new::thread_start::h58a34509e897fb4d
  66:        0x1898e6034 - __pthread_joiner_wake

FWIW, https://particular.rs/demos/physics-scenes/ works.

Cheers :)

@Canleskis
Copy link
Owner

This looks like it is related to this bevyengine/bevy#8950. The physics-scenes example runs on Bevy 0.9.1 whereas the other ones are updated to 0.12.1.
Thanks for the heads-up! That means I probably want to update that example too.

@Canleskis
Copy link
Owner

Canleskis commented Jan 2, 2024

I updated the physics-scenes to use Bevy 0.12 on the main branch, can you tell me if this fixed the crash for you?

@dreness
Copy link
Author

dreness commented Jan 3, 2024

Yep physics-scenes no longer crashes. Thanks!

@dreness dreness closed this as completed Jan 3, 2024
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