Open Braxtogoo opened 10 months ago
I see this happening to me a lot more when using Free() instead of QueueFree() on objects that have MeshInstance3Ds.
Still reproducible in 4.3 stable.
Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 (NVIDIA; 32.0.15.5599) - Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 Threads)
Tested versions
System information
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3742) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)
Issue description
I get an error somewhat inconsistently when running a headless server. The most common way I've found to trigger it is to have no mesh instances, create one, then delete it. This will result in the following error.
ERROR: Parameter "m" is null. at: mesh_get_surface_count (servers/rendering/dummy/storage/mesh_storage.h:110)
It rarely triggers when there are more meshes in the scene as well but less consistently. The problem is not related to multiplayer but rather the fact that the game is running headless.
The mesh also has to come from an instanced scene containing a MeshInstance3D, simply creating a new MeshInstance3D and destroying it will not cause the error. This doesn't not seem game breaking so far, however it does make server logs pretty messy at times.
Steps to reproduce
-Create an empty scene. -Create a scene containing a MeshInstance3D. -Attach a script to your empty scene that instantiates the scene containing the the MeshInstance3D, then destroys it. -Make the empty scene your main scene. -Build your project -Run the project with the "--headless" command line argument.
Minimal reproduction project (MRP)
(How to see the error.) -Open project. -Build project with "Export With Debug" checked. -Run the project from the console with: "Headless Mesh Error.console.exe" --headless
(Make sure not to run "Headless Mesh Error.exe" directly or you'll encounter another bug I found while making this MRP, #86813)
-Enter the command 'create' -Enter the command 'delete' -The error should appear. (Enter the command 'force-error' at any time to let the game automatically force the error to show.)
Headless_Mesh_Error.zip