bevyengine / bevyengine/bevy

Crash w/ features `bevy_sprite` and `bevy_dev_tools` w/o `bevy_text`

Open
#21,851 1 comment 0 reactions 0 assignees View on GitHub
A-Text C-Bug D-Straightforward I-Crash S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version and features

- `0.17.2`, `main` (33a48a9e)
- `default-features = false, features = ["bevy_sprite", "bevy_dev_tools"]`

## Relevant system information

- `cargo 1.93.0-nightly (2d4fa1395 2025-11-12)`
- Windows 11

## What you did

```rs
fn main() -> AppExit {
App::new().add_plugins(DefaultPlugins).run()
}
```

## What went wrong

The app crashes with the following error (`debug` feature enabled for error message):
```
Encountered an error in system `bevy_sprite::text2d::update_text2d_layout`: Parameter `Res<'_, Assets>` failed validation: Resource does not exist
If this is an expected state, wrap the parameter in `Option` and handle `None` when it happens, or wrap the parameter in `If` to skip the system when it happens.
4: bevy_ecs::error::bevy_error::impl$1::from
at C:\Users\yarde\.cargo\git\checkouts\bevy-50d7e162b728c6c6\33a48a9\crates\bevy_ecs\src\error\bevy_error.rs:115
5: bevy_ecs::system::system::impl$3::from
at C:\Users\yarde\.cargo\git\checkouts\bevy-50d7e162b728c6c6\33a48a9\crates\bevy_ecs\src\system\system.rs:450
6: core::result::impl$28::from_residual,bevy_ecs::system::system_param::SystemParamValidationError,enum2$ >
at C:\Users\yarde\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\result.rs:2189
7: bevy_ecs::system::system::System::run_without_applying_deferred,alloc::alloc::
at C:\Users\yarde\.cargo\git\checkouts\bevy-50d7e162b728c6c6\33a48a9\crates\bevy_ecs\src\system\system.rs:135
note: Some "noisy" backtrace lines have been filtered out. Run with `BEVY_BACKTRACE=full` for a verbose backtrace.

Encountered a panic in system `bevy_sprite::text2d::update_text2d_layout`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
```

## Additional information

Does not crash when:
- removing either feature, or
- enabling the `bevy_text` feature

Contributor guide

Open the contributing guide

Research direction

Start with the minimal App reproduction using only the `bevy_sprite` and `bevy_dev_tools` features, then inspect the `bevy_sprite::text2d::update_text2d_layout` system named in the error. Trace why it requires `Assets` without `bevy_text`; done means the same feature combination runs without crashing while the reported behavior remains valid when `bevy_text` is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.