-
Notifications
You must be signed in to change notification settings - Fork 438
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
Interactive Fractal example completely freezes when going full-screen on MacOS #2208
Comments
I'm a game dev who is using Vulkano, and was experiencing the same issue. It happens because Vulkano examples don't follow the Winit recommendations of rendering (it re-renders every time after every single event and starves resources). I tested this way of rendering in all Linux X, Wayland and MacOS: *control_flow = ControlFlow::Poll; // Setting this to 'Wait' skips frames on X.
// ...
WindowEvent::MainEventsCleared => window.request_redraw(),
WindowEvent::RedrawRequested => {
// Rendering begins here
},
// ... EDIT: One may want to add more request_redraw() after the input events, especially if you insist on using ControlFlow::Wait. |
Did #2218 solve your issue as well mayhaps? Seems similar enough. |
@marc0246 Checked out master, on debug this issue persists. Checking on release... |
On release, it still exists. |
@rauba-code I see, thanks. These issues exist only in the interactive fractal and game of life examples for you as well correct? |
Yes, these two permanently freeze. The others freeze only for a second or so when going fullscreen. Freezing and occasional flashing for a second also appears when hovering over the top of a menu bar. They do not lag at all when resizing a window. |
This commit solves the problem of freezing when going fullscreen for MacOS. It was caused because winit may behave unexpectedly when using run_return. Winit crate generally discourages the use of that (see: <https://docs.rs/winit/latest/winit/platform/run_return/trait.EventLoopExtRunReturn.html#tymethod.run_return>). NOTE. This commit only solves the problem for `interactive_fractal` binary, but not the `multi_window_game_of_life` binary.
I fixed the issue for When I finish with |
This commit solves the problem of freezing when going fullscreen for MacOS. It was caused because winit may behave unexpectedly when using run_return. Winit crate generally discourages the use of that (see: <https://docs.rs/winit/latest/winit/platform/run_return/trait.EventLoopExtRunReturn.html#tymethod.run_return>). NOTE. This commit only solves the problem for `interactive_fractal` binary, but not the `multi_window_game_of_life` binary.
…2221) * Updated #2208 This commit solves the problem of freezing when going fullscreen for MacOS. It was caused because winit may behave unexpectedly when using run_return. Winit crate generally discourages the use of that (see: <https://docs.rs/winit/latest/winit/platform/run_return/trait.EventLoopExtRunReturn.html#tymethod.run_return>). NOTE. This commit only solves the problem for `interactive_fractal` binary, but not the `multi_window_game_of_life` binary. * Some display servers (like X.org) are not redrawing for every frame. * Fixed the same bug for example binary. * Remove ControlFlow::Poll (it is the default anyway) in interactive_fractal Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com> * Remove ControlFlow::Poll (it is the default anyway) in multi_window_game_of_life Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com> --------- Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
Thanks for looking into this guys, sorry I was on vacation this past week. I've tested it as well and now everything works as expected! Thank you! <3 |
…rs#2208 (vulkano-rs#2221) * Updated vulkano-rs#2208 This commit solves the problem of freezing when going fullscreen for MacOS. It was caused because winit may behave unexpectedly when using run_return. Winit crate generally discourages the use of that (see: <https://docs.rs/winit/latest/winit/platform/run_return/trait.EventLoopExtRunReturn.html#tymethod.run_return>). NOTE. This commit only solves the problem for `interactive_fractal` binary, but not the `multi_window_game_of_life` binary. * Some display servers (like X.org) are not redrawing for every frame. * Fixed the same bug for example binary. * Remove ControlFlow::Poll (it is the default anyway) in interactive_fractal Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com> * Remove ControlFlow::Poll (it is the default anyway) in multi_window_game_of_life Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com> --------- Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
Issue
Going full-screen on while running the "Interactive Fractal" example freezes the screen in which the application is open (apparently indefinitely). Similar behavior is shown with the "Multi Window Game of Life" (with either window), but that one recovers after a while rendering at a lower resolution than the native one for the monitor.
No error is reported in the terminal where I launched the example, either in debug or release mode. The only solution is to kill the application (luckily I have a second monitor that remains working).
This is what it looks like once the application is frozen (the black parts are the rest of the monitor area, screenshot taken with the system utility):
The text was updated successfully, but these errors were encountered: