Skip to content
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

Fullscreened debug builds of projects sometimes freeze temporarily shortly after starting #77378

Closed
NotDaze opened this issue May 23, 2023 · 1 comment · Fixed by #79016
Closed

Comments

@NotDaze
Copy link

NotDaze commented May 23, 2023

Godot version

v4.0.3.stable.official [5222a99]

System information

Windows 11, Intel i7-9750H, NVIDIA GeForce RTX 2060 (Driver Version 528.79)

Issue description

When the window is set to fullscreen, running a project in the debugger will sometimes freeze for several seconds or more.

Freezes appear to last a minimum of 2 to 15 seconds. After that point, clicking the window will cause it to flicker and then resume functioning normally. Tabbing out of the window and then back in can also unfreeze it, possibly faster than just waiting and clicking. The window will not unfreeze if you don't click or tab out.

  • The freezes occur a very specific amount of time after the project starts running - almost exactly 0.3 seconds.
  • Freezes have an estimated 25-30% chance of occurring.
  • The freeze is not visual-only, all the program logic will stop and then pick up where it left off when the window unfreezes.
  • The delta parameter of _process does not reflect the freeze. For example, I had a freeze that lasted 20 seconds. There were a handful of frames with high deltas (in the 0.1-0.15 range) but nowhere near 20 seconds.
  • Exported versions of projects do not appear to be affected.
  • It's not clear if this applies to all projects.
  • It's likely windows-only.

Other notes:

  • Once, while trying to reproduce this bug, my entire system froze and I had to restart with the power button.
  • While preparing my MRP, I deleted icon.svg. This appeared to fix the freezes (somehow). I also started getting the following error, which may be related to the freezing stopping: load_image: Error opening file 'res://icon.svg'.
  • I restored icon.svg and deleted it again, and after that I couldn't reproduce the bug even after restoring it again. Definitely seems like it's related somehow.
  • Exclusive Fullscreen produces the same results.

Edit: Deleting icon.svg in my original project (NOT the MRP) did not fix the issue there (and caused the same load_image error). There are no other svg files in the project, but there are some .png files. May be related to image files in general.

Steps to reproduce

  1. Open the MRP and run it several times, closing if the window doesn't freeze.
  2. Generally within about five tries, the freeze will occur.

Minimal reproduction project

FullscreenFreeze2.zip

@NotDaze NotDaze changed the title Fullscreened debug builds of projects freeze temporarily shortly after starting Fullscreened debug builds of projects sometimes freeze temporarily shortly after starting May 23, 2023
@Lielay9
Copy link
Contributor

Lielay9 commented Jun 14, 2023

It seems that the display/window/size/mode - Fullscreen is treated as an Exclusive fullscreen when run from the editor. The main window still reports to being Fullscreen (get_window().mode == 3) but that doesn't seem to be the case as setting run/window_placement/rect to Force Fullscreen gets rid of the usual hitches when alt-tabbing. That would also explain why

* Exclusive Fullscreen produces the same results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants