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

Loading multiple scenes with thread create wrong mesh problem #40954

Closed
TokageItLab opened this issue Aug 1, 2020 · 3 comments
Closed

Loading multiple scenes with thread create wrong mesh problem #40954

TokageItLab opened this issue Aug 1, 2020 · 3 comments

Comments

@TokageItLab
Copy link
Member

TokageItLab commented Aug 1, 2020

Godot version:

3.2.2

OS/device including version:

Mac 10.15.3
Windows 10

Issue description:

When loading multiple scenes with thread, sometimes an empty mesh is created in ready() of the scene.
The first time you press the button in sample project's main scene, you'll get an error in the console.

[Error]
 mesh_surface_get_primitive_type: Index p_surface = 0 is out of bounds (mesh->surfaces.size() = 0).

But after that, pressing the button will no longer give you an error, as if the cache has been resolved.
I've heard that thread loading will be improved in 4.0, will this issue be resolved as well?

Steps to reproduce:
Run and press button in sample project (bg_mesh.zip) main scene.
スクリーンショット 2020-08-02 5 03 03

Minimal reproduction project:

bg_mesh.zip

@TokageItLab
Copy link
Member Author

TokageItLab commented Aug 2, 2020

The sample project updated. If make waiting between wait_to_finish() to add_child() in main thread, loaded scene's mesh is created correctly (sample scene button right). But I think that's an odd behavior that is not accurate.

bg_mesh_v2.zip

@Calinou
Copy link
Member

Calinou commented Aug 2, 2020

I believe this will be resolved by #40764.

I've heard that thread loading will be improved in 4.0, will this issue be resolved as well?

See #36640.

@TokageItLab
Copy link
Member Author

Probably this is old issue, I will post a new issue if there are more problems.

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

No branches or pull requests

3 participants