-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix u32 overflow when window is resize #21365
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
Merged
alice-i-cecile
merged 2 commits into
bevyengine:main
from
topkg:fix-usize-panic-after-window-resize
Oct 4, 2025
Merged
Fix u32 overflow when window is resize #21365
alice-i-cecile
merged 2 commits into
bevyengine:main
from
topkg:fix-usize-panic-after-window-resize
Oct 4, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alice-i-cecile
approved these changes
Oct 3, 2025
ickshonpe
approved these changes
Oct 4, 2025
Contributor
ickshonpe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
beicause
pushed a commit
to beicause/bevy
that referenced
this pull request
Oct 6, 2025
# Objective bevy v0.17.1, archlinux + i3wm. `cargo run --example 2d_viewport_to_world` ``` thread 'Compute Task Pool (1)' (470531) panicked at /home/go/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/glam-0.30.8/src/u32/uvec2.rs:1071:23: attempt to subtract with overflow note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Encountered a panic in system `2d_viewport_to_world::controls`! Encountered a panic in system `bevy_app::main_schedule::FixedMain::run_fixed_main`! Encountered a panic in system `bevy_time::fixed::run_fixed_main_schedule`! Encountered a panic in system `bevy_app::main_schedule::Main::run_main`! ``` ## Solution Consider window resize。 ## Testing no panic. ---
tigregalis
pushed a commit
to tigregalis/bevy
that referenced
this pull request
Oct 7, 2025
# Objective bevy v0.17.1, archlinux + i3wm. `cargo run --example 2d_viewport_to_world` ``` thread 'Compute Task Pool (1)' (470531) panicked at /home/go/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/glam-0.30.8/src/u32/uvec2.rs:1071:23: attempt to subtract with overflow note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Encountered a panic in system `2d_viewport_to_world::controls`! Encountered a panic in system `bevy_app::main_schedule::FixedMain::run_fixed_main`! Encountered a panic in system `bevy_time::fixed::run_fixed_main_schedule`! Encountered a panic in system `bevy_app::main_schedule::Main::run_main`! ``` ## Solution Consider window resize。 ## Testing no panic. ---
mate-h
pushed a commit
to mate-h/bevy
that referenced
this pull request
Oct 22, 2025
# Objective bevy v0.17.1, archlinux + i3wm. `cargo run --example 2d_viewport_to_world` ``` thread 'Compute Task Pool (1)' (470531) panicked at /home/go/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/glam-0.30.8/src/u32/uvec2.rs:1071:23: attempt to subtract with overflow note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Encountered a panic in system `2d_viewport_to_world::controls`! Encountered a panic in system `bevy_app::main_schedule::FixedMain::run_fixed_main`! Encountered a panic in system `bevy_time::fixed::run_fixed_main_schedule`! Encountered a panic in system `bevy_app::main_schedule::Main::run_main`! ``` ## Solution Consider window resize。 ## Testing no panic. ---
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Rendering
Drawing game state to the screen
A-Windowing
Platform-agnostic interface layer to run your app in
C-Bug
An unexpected or incorrect behavior
C-Examples
An addition or correction to our examples
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
bevy v0.17.1, archlinux + i3wm.
cargo run --example 2d_viewport_to_worldSolution
Consider window resize。
Testing
no panic.