[Merged by Bors] - Fixes minimization crash because of cluster updates.#3369
Closed
StarArawn wants to merge 4 commits intobevyengine:mainfrom
Closed
[Merged by Bors] - Fixes minimization crash because of cluster updates.#3369StarArawn wants to merge 4 commits intobevyengine:mainfrom
StarArawn wants to merge 4 commits intobevyengine:mainfrom
Conversation
mockersf
reviewed
Dec 17, 2021
Use continue instead of return. Co-authored-by: François <[email protected]>
mockersf
approved these changes
Dec 18, 2021
Contributor
|
I can come back with a proper repro later today, but this divide by zero seems to happen in light.rs if a window dimension is <= ~8, so there are some scenarios that still crash with this PR. For one repro, add to bevymark and slowly resize until crash. |
superdump
reviewed
Dec 18, 2021
crates/bevy_pbr/src/light.rs
Outdated
| let window = windows.get(camera.window).unwrap(); | ||
| let screen_size_u32 = UVec2::new(window.physical_width(), window.physical_height()); | ||
| // Don't update clusters if screen size is 0. | ||
| if screen_size_u32 == UVec2::ZERO { |
Contributor
There was a problem hiding this comment.
Would it be more robust to check if either dimension is 0?
Contributor
Author
There was a problem hiding this comment.
I'll try get that changed soon.
Contributor
|
The crash I was seeing seems to be a separate issue with extreme aspect ratios. I'll open another issue later. |
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Dec 20, 2021
# Objective Fixes: #3368 Issue was caused by screen size being: `(0, 0)`. ## Solution Don't update clusters if the screen size is zero. A better solution might be to not render when minimized, but this works in the meantime. Co-authored-by: John <[email protected]>
Contributor
mockersf
pushed a commit
to mockersf/bevy
that referenced
this pull request
Dec 21, 2021
# Objective Fixes: bevyengine#3368 Issue was caused by screen size being: `(0, 0)`. ## Solution Don't update clusters if the screen size is zero. A better solution might be to not render when minimized, but this works in the meantime. Co-authored-by: John <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fixes: #3368
Issue was caused by screen size being:
(0, 0).Solution
Don't update clusters if the screen size is zero. A better solution might be to not render when minimized, but this works in the meantime.