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

Examples crash on Windows Nvidia Vulkan #11673

Closed
fazil47 opened this issue Feb 3, 2024 · 5 comments
Closed

Examples crash on Windows Nvidia Vulkan #11673

fazil47 opened this issue Feb 3, 2024 · 5 comments
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@fazil47
Copy link

fazil47 commented Feb 3, 2024

Bevy version

main

System information

  • Rust 1.75
  • Windows 11
 AdapterInfo { name: "NVIDIA GeForce GTX 1650", vendor: 4318, device: 8081, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "551.23", backend: Vulkan }

What you did

I tried to run an example.

What went wrong

It crashed.

Additional information

Trace:

error[E0277]: the trait bound `render_asset::_::InternalBitFlags: color::_::_serde::Serialize` is not satisfied
   --> crates\bevy_render\src\render_asset.rs:70:14
    |
53  | / bitflags::bitflags! {
54  | |     /// Defines where the asset will be used.
55  | |     ///
56  | |     /// If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be
...   |
70  | |     #[derive(Serialize, TypePath, Deserialize, Hash, Clone, Copy, PartialEq, Eq, Debug)]
    | |              ^^^^^^^^^ the trait `color::_::_serde::Serialize` is not implemented for `render_asset::_::InternalBitFlags`
...   |
74  | |     }
75  | | }
    | |_- required by a bound introduced by this call
    |
    = help: the following other types implement trait `color::_::_serde::Serialize`:
              bool
              char
              isize
              i8
              i16
              i32
              i64
              i128
            and 256 others
note: required by a bound in `serialize_newtype_struct`
   --> C:\Users\fazil\.cargo\registry\src\index.crates.io-6f17d22bba15001f\serde-1.0.195\src\ser\mod.rs:900:12
    |
894 |     fn serialize_newtype_struct<T: ?Sized>(
    |        ------------------------ required by a bound in this associated function
...
900 |         T: Serialize;
    |            ^^^^^^^^^ required by this bound in `Serializer::serialize_newtype_struct`
    = note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `render_asset::_::InternalBitFlags: Deserialize<'_>` is not satisfied
  --> crates\bevy_render\src\render_asset.rs:53:1
   |
53 | / bitflags::bitflags! {
54 | |     /// Defines where the asset will be used.
55 | |     ///
56 | |     /// If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be
...  |
74 | |     }
75 | | }
   | |_^ the trait `Deserialize<'_>` is not implemented for `render_asset::_::InternalBitFlags`
   |
   = help: the following other types implement trait `Deserialize<'de>`:
             bool
             char
             isize
             i8
             i16
             i32
             i64
             i128
           and 238 others
   = note: this error originates in the macro `__declare_public_bitflags` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `render_asset::_::InternalBitFlags: Deserialize<'_>` is not satisfied
    --> crates\bevy_render\src\render_asset.rs:53:1
     |
53   | / bitflags::bitflags! {
54   | |     /// Defines where the asset will be used.
55   | |     ///
56   | |     /// If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be
...    |
74   | |     }
75   | | }
     | |_^ the trait `Deserialize<'_>` is not implemented for `render_asset::_::InternalBitFlags`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               bool
               char
               isize
               i8
               i16
               i32
               i64
               i128
             and 238 others
note: required by a bound in `next_element`
    --> C:\Users\fazil\.cargo\registry\src\index.crates.io-6f17d22bba15001f\serde-1.0.195\src\de\mod.rs:1726:12
     |
1724 |     fn next_element<T>(&mut self) -> Result<Option<T>, Self::Error>
     |        ------------ required by a bound in this associated function
1725 |     where
1726 |         T: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `SeqAccess::next_element`
     = note: this error originates in the macro `__declare_public_bitflags` which comes from the expansion of the macro `bitflags::bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
error: could not compile `bevy_render` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
@fazil47 fazil47 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Feb 3, 2024
@alice-i-cecile alice-i-cecile added S-Needs-Investigation This issue requires detective work to figure out what's going wrong and removed S-Needs-Triage This issue needs to be labelled labels Feb 3, 2024
@alice-i-cecile
Copy link
Member

This looks like it might be a Cargo caching error. Does this persist after cargo update + cargo clean?

@Connor-McMillin
Copy link
Contributor

I had this same issue today on Windows 10 after being away from Bevy for a while. cargo update + cargo clean resolved it

@fazil47
Copy link
Author

fazil47 commented Feb 4, 2024

Of the examples I tried only the ssao example works after doing cargo update + cargo clean. @Connor-McMillin can you try running the transmission example? I'm getting this error:

error: process didn't exit successfully: `target\debug\examples\transmission.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

@Connor-McMillin
Copy link
Contributor

Connor-McMillin commented Feb 4, 2024

Transmission worked fine for me

My specs:

Rust 1.75
Windows 10 Pro

2024-02-04T04:08:42.783991Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 3080", vendor: 4318, device: 8726, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "546.33", backend: Vulkan }
2024-02-04T04:08:44.458054Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 10 Pro", kernel: "19045", cpu: "", core_count: "6", memory: "15.9 GiB" }

@fazil47
Copy link
Author

fazil47 commented Feb 10, 2024

It's a rust issue rust-lang/rust#33434

@fazil47 fazil47 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests

3 participants