bevy: Building the tutorial code with bevy/dynamic on Windows 10 raises error

Bevy version

0.5

Operating system & version

Windows 10 Version Dev (OS Build 21364.1000)

What you did

cargo run --features bevy/dynamic running against the code that is set up as directed on this page of the book.

What you expected to happen

The code would have run exactly the same as if I’d left off --features bevy/dynamic, but compile slower.

What actually happened

The code compiled about as fast but it raises this error:

error: process didn't exit successfully: `target\debug\shodokan.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)

Additional information

The repo in question.

Here is my .cargo/config.toml file (Note: "-Zshare-generics=off"; I did that because I was having same issue from #1110. Setting generics=off seemed to resolve my LNK1189 problem for the time being.):

[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang"
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"]

# NOTE: you must manually install https://github.com/michaeleisel/zld on mac. you can easily do this with the "brew" package manager:
# `brew install michaeleisel/zld/zld`
[target.x86_64-apple-darwin]
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y"]

[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
rustflags = ["-Zshare-generics=off"]

Here is my Cargo.toml:

[package]
name = "shodokan"
version = "0.1.0"
authors = ["Matt DeBoard <matt.deboard@gmail.com>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
# bevy = { version = "0.5", features = ["dynamic"] }
bevy = "0.5"

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 19
  • Comments: 18 (2 by maintainers)

Most upvoted comments

Yep, on Win 11 (day1 release - 21H2) trying to run with dynamic (-Zshare-generics=n) ends the process with

error: process didn't exit successfully: `target\debug\app.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)

Hey guys! any solutions to this problem?

use

bevy = “0.7” instead of

bevy = { version = “0.7”, features = [ “dynamic”] } can solve this problem

Added this issue #2921 for Win11

@thargy I believe the share generics flag should be set to n on Win rustflags = ["-Zshare-generics=n"]