Description
Bevy version
0.12.1
Issue does not occur in 0.9.1
Relevant system information
If you cannot get Bevy to build or run on your machine, please include:
cargo --version
: cargo 1.75.0 (1d8b05cdd 2023-11-20)
OS: Windows 10
What you did
When providing FPS metrics for this issue involving multithreaded executor running slowly for lots of systems (SystemA::<0>
, SystemA::<1>
, etc), I was told in the Discord to run my code with LTO for most-accurate metrics.
What went wrong
When enabling lto = true
, cargo run --release
fails with "exit code: 0xc0000005, STATUS_ACCESS_VIOLATION". This does not occur in Bevy version 0.9.1. I was able to do lto = true
in 0.9.1 with no issues (was testing Scheduler V2 vs V3 for the related issue).
I believe the root cause is the generic systems.
Additional information
I have shared a stripped-down version of my generic systems code focusing on this issue in the lto_issue
branch of my BevyLotsOfSystems Github package. The code is for Bevy 0.12.1, will publish separate branch with 0.9.1 working.
Need to compile in --release
with how the Cargo.toml are set up.
EDIT: lto_issue_0.9.1
has the working 0.9.1 code with LTO enabled