godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.11k stars 21.18k forks source link

Error emitted to output every time QuadMesh has been applied to MeshInstance #25613

Closed Chaosus closed 4 years ago

Chaosus commented 5 years ago

Godot version: 3.1 beta 3

OS/device including version: Win10

Issue description: This emitted to output every time you apply a QuadMesh to MeshInstance :

drivers/gles3/rasterizer_storage_gles3.cpp:3756 - Condition ' surface->index_array_len == 0 ' is true. returned: PoolVector<uint8_t>()

Steps to reproduce: Just create and apply QuadMesh to MeshInstance - it will correctly created but with the error I described above

ankitpriyarup commented 5 years ago

I noticed this issue appears only once. Removing and re-adding the same quad mesh doesn't show the error again. Also, reopening the saved scene with quad mesh in a mesh instance gives the error for the first time again removing and re-adding works fine.

BastiaanOlij commented 5 years ago

Looks like a timing issue to me, QuadMesh (and most other similar classes) will not build the mesh right away in case you change some of the dimensions. So it is possible when you assign QuadMesh to the MeshInstance and it attempts to copy the mesh data into the render driver there is no data yet to copy.

Once it gets to the end of the script and handles the queued event it will build the mesh and all will be well.

So the message is correct but otherwise harmless

akien-mga commented 4 years ago

Seems fixed in the current master branch.