Game crashes when full screen and vsync on for specific hardware

Godot Version

4.4.1 custom build using these flags:

target=“template_release”
debug_symbols=“no”
production=“yes”
optimize=“size”
lto=“full”

vulkan=“no” #disables the vulkan driver (used in forward+/mobile renderers)
use_volk=“no” #disables more vulkan stuff
openxr=“no” #disables virtual reality/augmented reality stuff
minizip=“no” # disables ZIP archive support

module_bmp_enabled = “no”
module_enet_enabled = “no”
module_hdr_enabled = “no”
module_mbedtls_enabled = “no”
module_minimp3_enabled = “no”
module_mobile_vr_enabled = “no”
module_multiplayer_enabled = “no”
module_noise_enabled = “no”
module_openxr_enabled = “no”
module_raycast_enabled = “no”
module_svg_enabled = “no”
module_theora_enabled = “no” # plays video
module_webrtc_enabled = “no”
module_websocket_enabled = “no”
module_webxr_enabled = “no”
module_zip_enabled = “no”

Question

My game runs fine and I’ve had many users with no issues, even on Steam Deck (which it wasn’t originally made for). However I have one user that is experiencing a game crash when vsync and full-screen are turned on. They say the game gradually slows down to 1 fps and crashes but they’ve got solid hardware. Turning vsync off and full-screen off fixes those issues. Any ideas?

Here’s a log output from the start of the game:

— System Information Report —
OS: Windows (10.0.26100) - en_GB
CPU: 12th Gen Intel(R) Core™ i9-12900F (24 Cores)
GPU: NVIDIA - NVIDIA GeForce RTX 3080 Ti (Other - always other for OpenGL rendering)
Rendering: Gl Compatibility (3.3.0 NVIDIA 576.80)
Available RAM: 17746 / 32609 MB
VRAM Usage: 174 MB
Display: (1920, 1080) @ 239.96 Hz (1.00x Scale)
Godot Version: 4.4.1.stable (Debug: false)

And some info on what’s used:
2D game using tilemap layers, navigation layers, navigation obstacles, GPUParticles2D, a few shader globals and it uses the compatibility renderer.

Got another report of similar behavior:

  • Vsync on to limit FPS at monitor refresh rate of 240hz
  • Exclusive fullscreen

— System Information Report —
OS: Windows (10.0.26100) - de_DE
CPU: 12th Gen Intel(R) Core™ i7-12700KF (20 Cores)
GPU: NVIDIA - NVIDIA GeForce RTX 3070 (Other - always other for OpenGL rendering)
Rendering: Gl Compatibility (3.3.0 NVIDIA 581.29)
Available RAM: 17650 / 32616 MB
VRAM Usage: 201 MB
Display: (2560, 1440) @ 239.96 Hz (1.00x Scale)
Godot Version: 4.4.1.stable (Debug: false)

Behavior experienced is low FPS after a few mins unless playing in windowed mode.

So limited the frame rate to 60fps and that seems to have solved the issue. I’m guessing the frame rate was below the 250hz refresh rate on the monitors and that the game couldn’t keep up causing the eventual spike in lag and eventual crash.

You should probably post an issue on the bug tracker.

The thing is, though, I would have expected it to drop frames if it couldn’t keep up, not slow down. Maybe something screwy is going on with the physics update?

That’s what I originally thought would happen too, but users experienced something else.

Is that still the expected behavior if it was CPU limited and not GPU limited?

Either way, what I’d expect is that the CPU and GPU are feeding a set of frame buffers, and the GPU is taking the latest “ready” frame buffer and displaying it. The system should display the last complete frame until another is available, which means in either case it would drop frames, not slow down.

Are you maybe doing something involving rendering to a texture? If there were some sort of recursive thing going on, that might explain it.

It’s also possible it’s an NVidia driver bug, but with only two samples, given NVidia has ~90% of the market for game GPUs on PC, it’s hard to call that a smoking gun.

It may also be some weird interaction between the high frame rate of the display and the physics update? I’m just speculating, though.

Hard to say without the system to test on. The game doesn’t really have any complicated physics, mostly just detecting if the player character has collided with collectable items.

Physics itself is limited to 60fps and 8 physics steps per frame. 0.5 physics jitter, physics interpolation off, and enable object picking on.

There’s no lighting or other stuff being used.

Biggest CPU load is when shaders compile (had like 700 trees that each needed to sway at their own time so needed a duplicated material), but that should be just a one-time cost and the game runs fine even on Steam Deck.

So getting another report from someone using different hardware now about a memory leak. It seems to be only affecting this specific user though. Searching hasn’t come up with any driver/hardware issues though. Any ideas?

— System Information Report —
OS: Windows (10.0.26100) - en_US
CPU: AMD Ryzen 7 7700 8-Core Processor (16 Cores)
GPU: NVIDIA - NVIDIA GeForce RTX 5070 (Other - always other for OpenGL rendering)
Rendering: Gl Compatibility (3.3.0 NVIDIA 581.57)
Available RAM: 17469 / 31849 MB
VRAM Usage: 105 MB
Display: (1920, 1080) @ 60.00 Hz (1.00x Scale)
Godot Version: 4.4.1.stable (Debug: false)

Interestingly, this one seems to be 1080p @ 60Hz.

Are you doing much with shaders?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.