Godot Version
4.6.1
Question
Getting ready to go live and all of a sudden I get this error:
ERROR: Meshes must contain a vertex array, an index array, or both -
It contains ZERO useful information about what mesh is involved - so if I can’t find it, I can’t fix it. How an I track this down? I’ve resorted to making a new version and deleting objects that use meshes and their base components to try to find one thing that stops this error.
Are you creating meshes using ArrayMesh?
no, this is an existing project using eitehr godot primitives or obj / glb files I have imported. The last thing I imported I have deleted completely but this error persists.
git bisect until it disappears. If you don’t use version control then inspect your mesh resources or remove one by one until it’s gone. The last one you removed is the likely culprit.
dont’ use git, I backup frequently. I actually nuked my whole main scene, still getting the error. killed anything that loads anything related to a mesh, still happening.
I can’t believe they’d have an error message telling you something is missing / broken without telling you what it is. that’s worse than a check engine light - it’s like your car telling you “something is wrong” without saying what.
When does the message appear? Are you using any plugins, autoloads or tool scripts?
it appears on load.. when I run, it says this: when I run get this: E 0:00:01:875 mesh_add_surface: Meshes must contain a vertex array, an index array, or both <C++ Error> Condition “!new_surface.index_count && !new_surface.vertex_count” is true. <C++ Source> servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp:433 @ mesh_add_surface() - again with no useful information. everything appears on screen as far as I can tell.
both messages appear twice on load / run. I’ve deleted everything inside the imported and shader folders (I can never delete the whole .godot folder without a permanent crash for some reason). I have on verbose debug, when it shows everything that loads it does not include any errors there
You should be able to delete it without consequences, although best to do it when the engine is not running. So try to do that first.
Every time I’ve tried to do it before it kept the project from even opening, so I always resorted to just deleting folder contents. but since I had nothing to lose, I deleted the whole thing.
Once I did, the verbose logger finally spit it out in red text - at least 1 of the two problem files. Fixed that one and then it showed the 2nd problem one (not sure why it can’t show both at the same time).
Easiest fix was replacing them with the last good version. Funny thing is I haven’t even touched these files in two months since I finished working on them.
So I guess the lesson is that if godot is giving you vague error messages, nuke the .godot folder.
Thanks for your assistance.