Open eldidou opened 1 year ago
I'm unable to reproduce with Linux in a build from commit a574c0296b38d5f786f249b12e6251e562c528cc
Can confirm. I had many duplicated of a model with omni lights (around 100, every model has one omni light) and Godot couldn't change the scene. Instead I was getting VK_ERROR_DEVICE_LOST spam in log. I left some of them (around 8) and it finally worked.
Has happened on 4.2 and 4.3dev5
@romgerman could you provide your system information? I wonder if this issue is related to hardware or if it's due to a driver bug which seems to be the case.
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 Ti Laptop GPU (NVIDIA; 31.0.15.4626) - AMD Ryzen 5 5600H with Radeon Graphics (12 Threads) NVIDIA Driver 546.26
Godot version
4.2.dev5
System information
Godot v4.2.dev5 - Ubuntu 22.04.3 LTS 22.04 - X11 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics (CML GT2) () - Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz (12 Threads)
Issue description
When reloading a scene that instantiates multiple lights and meshes at startup, the game will freeze for a long time, and in some cases it will also crash.
I works well the first time the scene is loaded during the startup, it's only when
reload_current_scene()
orchange_scene_to_file()
is called that the issue is triggered. The (re)loading itself seems fast, but 2~3 frames later there will be a freeze (and possibly a crash).If shadows are enabled on the lights the freeze is longer and there is no crash. If shadows are disabled there is a crash:
The freeze time grows linearly with the the number of meshes multiplied by the number of lights.
It doesn't happen with all meshes, for some it will have no freeze of crash whatsoever. The minimal project contains two meshes, one that triggers the issue, one that doesn't, they are the same simple mesh, just slightly translated.
It happens only in 4.2, not in 4.1. I've also tried with this commit https://github.com/godotengine/godot/pull/80566, but the issue still happens.
Steps to reproduce
reload_current_scene
with a key pressThe second loading of the scene (with
reload_current_scene
) triggers the freeze/crash.Minimal reproduction project
light_model_instantiate_issue.zip