bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
33.57k stars 3.26k forks source link

0.13 error (in desc) but v 0.12 works #13066

Open JasonPaulGithub opened 2 months ago

JasonPaulGithub commented 2 months ago

Bevy version

The release number or commit hash of the version you're using. 0.12.1 - This version works. 0.13.0 - Does not work. Terminal shown below.

[Optional] Relevant system information

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

What you did

I tried to run the Bevvy examples for version 0.13.. but no luck. Everything runs fine on Bevvy Version: 0.12.1 I have the latest drivers.

What went wrong

C:/Users/user/.cargo/bin/cargo.exe run --color=always --package jasons_caravan --bin jasons_caravan
Finished dev [unoptimized + debuginfo] target(s) in 1.05s
Running `target\debug\jasons_caravan.exe`
2024-04-22T16:46:17.914135Z  INFO bevy_winit::system: Creating new window "App" (0v1)
2024-04-22T16:46:19.304258Z ERROR wgpu_hal::vulkan::instance: enumerate_adapters: A return array was too small for the result    
thread 'main' panicked at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.13.2\src\renderer\mod.rs:141:10:
Unable to find a GPU! Make sure you have installed required drivers!
stack backtrace:
    0: std::panicking::begin_panic_handler at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panicking.rs:647
    1: core::panicking::panic_fmt at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\panicking.rs:72
    2: core::panicking::panic_display at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\panicking.rs:196
    3: core::panicking::panic_str at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\panicking.rs:171
    4: core::option::expect_failed at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\option.rs:1988
    5: enum2$<core::option::Option<wgpu::Adapter> >::expect<wgpu::Adapter> at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\option.rs:894
    6: bevy_render::renderer::initialize_renderer::async_fn$0 at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.13.2\src\renderer\mod.rs:138
    7: bevy_render::impl$3::build::async_block$0 at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.13.2\src\lib.rs:292       
    8: futures_lite::future::block_on::closure$0<tuple$<>,enum2$<bevy_render::impl$3::build::async_block_env$0> > at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\futures-lite-2.3.0\src\future.rs:99     
    9: std::thread::local::LocalKey<core::cell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> > >::try_with<core::cell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> >,futures_lite::future::block_on::closure_env$0<tuple$<>,enum2$<bevy_render: at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\thread\local.rs:286
    10: std::thread::local::LocalKey<core::cell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> > >::with<core::cell: :RefCell<tuple$<parking::Parker,core::task::wake::Waker> >,futures_lite::future::block_on::closure_env$0<tuple$<>,enum2$<bevy_render::imp at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\thread\local.rs:262
    11: futures_lite::future::block_on<tuple$<>,enum2$<bevy_render::impl$3::build::async_block_env$0> > at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\futures-lite-2.3.0\src\future.rs:78     
    12: bevy_render::impl$3::build at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.13.2\src\lib.rs:312       
    13: bevy_app::app::impl$5::add_boxed_plugin::closure$0 at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\app.rs:657
    14: core::ops::function::FnOnce::call_once<bevy_app::app::impl$5::add_boxed_plugin::closure_env$0,tuple$<> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:250
    15: core::panic::unwind_safe::impl$23::call_once<tuple$<>,bevy_app::app::impl$5::add_boxed_plugin::closure_env$0> at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\panic\unwind_safe.rs:272
    16: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<bevy_app::app::impl$5::add_boxed_plugin::closure_env$0>,tuple$<> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:554
    17: hashbrown::map::make_hash<alloc::string::String,core::hash::BuildHasherDefault<ahash::fallback_hash::AHasher> >
    18: std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<bevy_app::app::impl$5::add_boxed_plugin::closure_env$0> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:518
    19: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<bevy_app::app::impl$5::add_boxed_plugin::closure_env$0>,tuple$<> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panic.rs:142
    20: bevy_app::app::App::add_boxed_plugin at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\app.rs:657
    21: bevy_app::plugin_group::PluginGroupBuilder::finish at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\plugin_group.rs:182 
    22: bevy_app::plugin::sealed::impl$1::add_to_app<bevy_internal::default_plugins::DefaultPlugins> at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\plugin.rs:147       
    23: bevy_app::app::App::add_plugins<bevy_app::plugin::sealed::PluginGroupMarker,bevy_internal::default_plugins::DefaultPlugins> at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\app.rs:756
    24: jasons_caravan::main at .\src\main.rs:9
    25: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:250
    26: core::hint::black_box at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\hint.rs:334 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. error: process didn't exit successfully: `target\debug\jasons_caravan.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Process finished with exit code -1073741819 (0xC0000005)
Brezak commented 2 months ago

Could you please surround the stack trace with triple backtics ``` instead of single backtics ` so it formats better.

Manually formated version in the meantime:


`C:/Users/user/.cargo/bin/cargo.exe run --color=always --package jasons_caravan --bin jasons_caravan Finished dev [unoptimized + debuginfo] target(s) in 1.05s Running` target\debug\jasons_caravan.exe`2024-04-22T16:46:17.914135Z 
INFO bevy_winit::system: Creating new window "App" (0v1) 2024-04-22T16:46:19.304258Z ERROR wgpu_hal::vulkan::instance: enumerate_adapters: A return array was too small for the result thread 'main' panicked at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.13.2\src\renderer\mod.rs:141:10:
    Unable to find a GPU! Make sure you have installed required drivers! stack backtrace:
        0: std::panicking::begin_panic_handler at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panicking.rs:647
        1: core::panicking::panic_fmt at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\panicking.rs:72
        2: core::panicking::panic_display at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\panicking.rs:196
        3: core::panicking::panic_str at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\panicking.rs:171
        4: core::option::expect_failed at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\option.rs:1988
        5: enum2$<core::option::Option<wgpu::Adapter> >::expect<wgpu::Adapter> at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\option.rs:894
        6: bevy_render::renderer::initialize_renderer::async_fn$0 at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.13.2\src\renderer\mod.rs:138 
        7: bevy_render::impl$3::build::async_block$0 at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.13.2\src\lib.rs:292 
        8: futures_lite::future::block_on::closure$0<tuple$<>,enum2$<bevy_render::impl$3::build::async_block_env$0> > at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\futures-lite-2.3.0\src\future.rs:99 
        9: std::thread::local::LocalKey<core::cell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> > >::try_with<core::c ell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> >,futures_lite::future::block_on::closure_env$0<tuple$<>,enum2$<bevy_render: at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\thread\local.rs:286 
        10: std::thread::local::LocalKey<core::cell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> > >::with<core::cell: :RefCell<tuple$<parking::Parker,core::task::wake::Waker> >,futures_lite::future::block_on::closure_env$0<tuple$<>,enum2$<bevy_render::imp at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\thread\local.rs:262 
        11: futures_lite::future::block_on<tuple$<>,enum2$<bevy_render::impl$3::build::async_block_env$0> > at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\futures-lite-2.3.0\src\future.rs:78 
        12: bevy_render::impl$3::build at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.13.2\src\lib.rs:312 
        13: bevy_app::app::impl$5::add_boxed_plugin::closure$0 at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\app.rs:657 
        14: core::ops::function::FnOnce::call_once<bevy_app::app::impl$5::add_boxed_plugin::closure_env$0,tuple$<> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:250 
        15: core::panic::unwind_safe::impl$23::call_once<tuple$<>,bevy_app::app::impl$5::add_boxed_plugin::closure_env$0> at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\panic\unwind_safe.rs:272 
        16: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<bevy_app::app::impl$5::add_boxed_plugin::closure_env$0>,tuple$<> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:554 
        17: hashbrown::map::make_hash<alloc::string::String,core::hash::BuildHasherDefault<ahash::fallback_hash::AHasher> > 
        18: std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<bevy_app::app::impl$5::add_boxed_plugin::closure_env$0> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:518 
        19: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<bevy_app::app::impl$5::add_boxed_plugin::closure_env$0>,tuple$<> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panic.rs:142 
        20: bevy_app::app::App::add_boxed_plugin at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\app.rs:657 
        21: bevy_app::plugin_group::PluginGroupBuilder::finish at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\plugin_group.rs:182 
        22: bevy_app::plugin::sealed::impl$1::add_to_app<bevy_internal::default_plugins::DefaultPlugins> at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\plugin.rs:147 
        23: bevy_app::app::App::add_plugins<bevy_app::plugin::sealed::PluginGroupMarker,bevy_internal::default_plugins::DefaultPlugins> at C:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_app-0.13.2\src\app.rs:756 
        24: jasons_caravan::main at .\src\main.rs:9 25: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> > at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:250 26: core::hint::black_box at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\hint.rs:334 note: Some details are omitted, run with`RUST_BACKTRACE=full`for a verbose backtrace. error: process didn't exit successfully:`target\debug\jasons_caravan.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Process finished with exit code -1073741819 (0xC0000005)
james7132 commented 2 months ago

This looks like your GPU cannot be found, either because the supported hardware level is not available, or because your drivers are not up to date. Could you provide some more information there?

JasonPaulGithub commented 2 months ago

I would assume it's not a hardware or driver issue because Bevvy works just fine on version 0.12. If works for 0.12 but not on 0.13 then perhaps the fix would be a matter of finding out what's changed? Hope that helps.

Brezak commented 2 months ago

What GPU do you have in your computer? If you don't have a discrete GPU what CPU do you use?

alexniver commented 2 months ago

there is a bug with wgpu 0.19, Validation limits are too high

my old computer works fine with wgpu 0.18, but can't work with wgpu on 0.19 Failed to find an appropriate adapter.

bevy 0.12 use wgpu 0.18 bevy 0.13 use wgpu 0.19

kitamiq commented 2 months ago

Sounds very similar to the issue we had at #11992. No idea why the author of that issue closed it, one somewhat questionable temporary workaround to this was found, but the problem was never actually resolved. @JasonPaulGithub does the workaround of switching wgpu's backend from vulkan (default) to GL as mentioned in #11992 help you?

JasonPaulGithub commented 2 months ago

@Brezak acer nitro 5 gaming laptop:

@kitamiq I have looked into my settings and I could change things around (not 100% sure if I'm doing it right) but I'm happy to get things working with bevvy version 0.12 for now.

Could a quick fix include these steps in the error message?

- update drivers
- change Vulcan to GL
- try earlier version