Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MeshDataTool.create_from_surface() : Index r[i] is out of bounds #85622

Closed
VirgilusGalacticus opened this issue Dec 1, 2023 · 1 comment
Closed
Labels

Comments

@VirgilusGalacticus
Copy link

Godot version

v4.2 stable

System information

Godot v4.2.stable - Windows 10.0.22621 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4060 Laptop GPU (NVIDIA; 31.0.15.2887) - 13th Gen Intel(R) Core(TM) i7-13700H (20 Threads) - Android 13

Issue description

Hello everyone,
I wanted to implement that : https://www.youtube.com/watch?v=4DFpLnEnKFk&t=293s
I found an issue when I wanted to use the MeshDataTool.create_from_surface() function. My code works perfectly on local debugging on my PC but when I tried to deploy/debug on my mobile it throwed:

`
E 0:00:03:0197 UVPosition.gd:19 @ set_mesh(): Index r[i] = 65534 is out of bounds (vcount = 24).

scene/resources/mesh_data_tool.cpp:73 @ create_from_surface() UVPosition.gd:19 @ set_mesh() SetUVPositionMesh.gd:4 @ _ready() `

image

I also tried to test with the version 4.1.1 and had the same issue

If someone has a workaround for this issue or can help me
Thanks in advance

Steps to reproduce

  1. Create a node and attach a script
  2. Script:func _ready(): var mesh = ArrayMesh.new() mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, BoxMesh.new().get_mesh_arrays()) var mdt = MeshDataTool.new() mdt.create_from_surface(mesh, 0) print(mdt.get_edge_count())
  3. Test in local : OK (edge count 30)
  4. Test with distance debugg on mobile : KO (error + edge count 0)

You can use your own mesh it will always be the same.

Minimal reproduction project

Or use the following projet (4.2):
MeshDataToolTest.zip

@bitsawer
Copy link
Member

bitsawer commented Dec 1, 2023

Thanks for the report. This is probably a duplicate of #75599 or some of its variants, the PR fixing it (#84852) should hopefully be in the next 4.2.x patch relese. I'm closing this as duplicate, but feel free to comment or reopen this issue if the bug has not been fixed by that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants