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

Plugin causes crash on Windows 10: (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION) #60

Open
EkremDincel opened this issue Sep 27, 2024 · 1 comment

Comments

@EkremDincel
Copy link

EkremDincel commented Sep 27, 2024

Minimal example that invokes the error:

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(bevy_framepace::FramepacePlugin); // Not adding the plugin solves the problem
}

Error message (there is no stacktrace or panic message even if debug is enabled):

error: process didn't exit successfully: `D:\Artifacts\rust_target\fast-debug\bevy_demo.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Adapter information:

AdapterInfo { name: "NVIDIA GeForce RTX 3060 Laptop GPU", vendor: 4318, device: 9504, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "560.94", backend: Vulkan }

Active toolchain is rustc 1.83.0-nightly (0ee7cb5e3 2024-09-10).

Below is the cargo.toml configuration I used:

[package]
name = "bevy_demo"
version = "0.1.0"
edition = "2021"

[dependencies]
bevy = { version = "0.14.2", features = ["dynamic_linking"] }
bevy_framepace = "0.17.1"

log = { version = "*", features = ["max_level_debug", "release_max_level_warn"] }


[profile.dev]
opt-level = 1

[profile.dev.build-override]
opt-level = 3

[profile.release.build-override]
opt-level = 3

[profile.dev.package."*"]
opt-level = 3

[profile.fast]
inherits = "release"
strip = true
lto = true
codegen-units = 1
panic = "unwind"

[profile.fast-debug]
inherits = "release"
split-debuginfo = "off"
debug = true
strip = false
lto = true
codegen-units = 1
panic = "unwind"

And this is the .cargo/config.toml:

[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
rustflags = [
  "-Zthreads=0",
]

Note: the crash happens only in the fast or fast-debug profile. The debug profile works without any problems.

@EkremDincel
Copy link
Author

EkremDincel commented Sep 27, 2024

I came across similar issues with the same exit code for bevy in the internet but I am only experiencing the issue while using this plugin. I can render things just fine if I don't add the plugin.

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

1 participant