-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
When VIEWPORT is set to CAMERA and switched to SizedFullscreen
, PANIC may occur.
#12000
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
P-Crash
A sudden unexpected crash
S-Needs-Investigation
This issue requires detective work to figure out what's going wrong
Comments
hyoi
added
C-Bug
An unexpected or incorrect behavior
S-Needs-Triage
This issue needs to be labelled
labels
Feb 20, 2024
alice-i-cecile
added
A-Rendering
Drawing game state to the screen
P-Crash
A sudden unexpected crash
S-Needs-Investigation
This issue requires detective work to figure out what's going wrong
and removed
S-Needs-Triage
This issue needs to be labelled
labels
Feb 20, 2024
Checked for panic in v0.13.1. |
LuisFigueiredo73
added a commit
to LuisFigueiredo73/bevy
that referenced
this issue
Mar 30, 2024
…o SizedFullscreen, Panic may occur When Viewport is set to Some when adding a Camera, panic occured because while adjusting to SizedFullscreen, the operating system may return a lower size for the window, resulting in panic because the Viewport is bigger than the render target. The fix consist of, if the size is in fact lower than the Viewport size, the Viewport's physical size is updated to the smaller value, avoiding panic. The values returned by the operating system may vary, depending on the device (the values that the person that opened the issue gave for panic occuring were not the same as the ones that caused panic for me).
I changed [dependencies] in Cargo.toml as follows and compiled it, and now the trouble does not occur on my PC. Thank you very much, LuisFigueiredo73 .
|
LuisFigueiredo73
added a commit
to LuisFigueiredo73/bevy
that referenced
this issue
Apr 1, 2024
…o SizedFullscreen, panic may occur When ajusting to SizedFullscreen, the window size might be lower than the viewport size, causing the render target to be smaller than the Viewport. The fix consist of matching the viewport size with the render target size when this is lower, avoiding panic. These lower values may vary depending on the device.
LuisFigueiredo73
added a commit
to LuisFigueiredo73/bevy
that referenced
this issue
Apr 3, 2024
…o SizedFullscreen, panic may occur When viewport is set to the same size as the window on creation, when adjusting to SizedFullscreen, the window may be smaller than the viewport for a moment, which caused the arguments to be invalid. The fix consists of matching the size of the viewport to the size of the window when it is smaller. Also added a test to show that it does not panic.
github-merge-queue bot
pushed a commit
that referenced
this issue
Apr 6, 2024
#12861) # Objective - When viewport is set to the same size as the window on creation, when adjusting to SizedFullscreen, the window may be smaller than the viewport for a moment, which caused the arguments to be invalid and panic. - Fixes #12000. ## Solution - The fix consists of matching the size of the viewport to the lower size of the window ( if the x value of the window is lower, I update only the x value of the viewport, same for the y value). Also added a test to show that it does not panic anymore. ---
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
C-Bug
An unexpected or incorrect behavior
P-Crash
A sudden unexpected crash
S-Needs-Investigation
This issue requires detective work to figure out what's going wrong
Bevy version
v0.13.0, 0.13.1
Relevant system information
What you did
On my PC, I can reproduce PANIC with the following program.
This program first displays an empty window, and then the [SPACE] key toggles between
Windowed
andSizedFullscreen
display.PANIC occurs when WINDOW_WIDTH is 1376.0, and there is no problem when WINDOW_WIDTH is 1366.0.
What went wrong
SizedFullscreen
setting is lower than the original window resolution, the VIEWPORT would result in a validation error and PANIC.The text was updated successfully, but these errors were encountered: