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

Tests: Remove NavigationRegion3D race condition that fails on CI #90613

Merged

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Apr 13, 2024

As the comment pointed it out, it's a race condition, and evidently no, "it's [not] fine" ;)

It occasionally fails on macOS editor builds with:

./tests/scene/test_navigation_region_3d.h:79: ERROR: CHECK_EQ( navigation_mesh->get_polygon_count(), 0 ) is NOT correct!
  values: CHECK_EQ( 2, 0 )

./tests/scene/test_navigation_region_3d.h:80: ERROR: CHECK_EQ( navigation_mesh->get_vertices().size(), 0 ) is NOT correct!
  values: CHECK_EQ( 4, 0 )

As the comment pointed it out, it's a race condition, and evidently no,
"it's [not] fine" ;)
@akien-mga akien-mga added this to the 4.3 milestone Apr 13, 2024
@akien-mga akien-mga requested a review from a team April 13, 2024 08:23
@akien-mga akien-mga requested a review from a team as a code owner April 13, 2024 08:23
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be interesting to investigate why it fails on macOS specifically (or rather, why it's more likely to fail there)

Alternatively we could comment it out with a FIXME, but this looks good

@akien-mga akien-mga merged commit 2886511 into godotengine:master Apr 13, 2024
16 checks passed
@akien-mga akien-mga deleted the tests-navigation-race-condition branch April 13, 2024 09:35
@AThousandShips
Copy link
Member

AThousandShips commented Apr 17, 2024

There's a similar one in the servers test as well which fails as well:

TEST_CASE("[NavigationServer3D] Server should be able to bake asynchronously") {
NavigationServer3D *navigation_server = NavigationServer3D::get_singleton();
Ref<NavigationMesh> navigation_mesh = memnew(NavigationMesh);
Ref<NavigationMeshSourceGeometryData3D> source_geometry = memnew(NavigationMeshSourceGeometryData3D);
Array arr;
arr.resize(RS::ARRAY_MAX);
BoxMesh::create_mesh_array(arr, Vector3(10.0, 0.001, 10.0));
source_geometry->add_mesh_array(arr, Transform3D());
// Race condition is present below, but baking should take many orders of magnitude
// longer than basic checks on the main thread, so it's fine.
navigation_server->bake_from_source_geometry_data_async(navigation_mesh, source_geometry, Callable());
CHECK(navigation_server->is_baking_navigation_mesh(navigation_mesh));
CHECK_EQ(navigation_mesh->get_polygon_count(), 0);
CHECK_EQ(navigation_mesh->get_vertices().size(), 0);
}

See:
https://github.com/godotengine/godot/actions/runs/8723662714/job/23932573763?pr=74830

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

Successfully merging this pull request may close these issues.

3 participants