-
Notifications
You must be signed in to change notification settings - Fork 437
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
Triangle example panics when minimizing the window #1892
Comments
@jedel1043 I can reaffirm that this is the behavior when minimizing on Windows, which coincidentally is why my new example from yesterday contains the check
I'd be willing to shotgun this into the other examples so they don't crash on minimize. @Rua @AustinJ235 I'm also curious if it makes sense to change the above assert into returning |
It might be more ergonomic to return an error in this case. Basalt has had this check in place for a while now, but from a new user perspective it might be confusing why their program panics. |
I think turning this into a proper error makes sense, and adding it to the other examples. Do you want to make a PR for it? |
@AustinJ235 @Rua Thanks for the quick responses. Curious. The assert statement references VUID-VkSwapchainCreateInfoKHR-imageExtent-01689, but the language of "width and height must both be non-zero" (emphasis theirs) suggests that neither dimension can be zero, whereas the code asserts at least one non-zero dim. Whoops. Will make the appropriate validation and code-sample changes. Cheers |
Issue
Running the triangle example and minimizing the window makes the program crash with the message:
The stacktrace points to the
Swapchain::validate
method as the culprit:vulkano/vulkano/src/swapchain/swapchain.rs
Lines 394 to 396 in 5c6bbe0
System Info
main.rs
file that demonstrates the issue: https://github.com/vulkano-rs/vulkano/blob/master/examples/src/bin/triangle.rsThe text was updated successfully, but these errors were encountered: