Skip to content

[4.4.1] NavigationServer3D.map_force_update no longer synchronizing map #104671

Description

@dougVanny

Tested versions

Not reproducible in: v4.3.stable.mono.official [77dcf97]
Reproducible in: v4.4.1.stable.mono.official [49a5bc7]

System information

Godot v4.4.1.stable.mono - Windows 10 (build 19045) - Single-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 32.0.15.6109) - Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz (4 threads)

Issue description

After calling NavigationServer3D.map_force_update in a freshly created NavigationMap, it remains in an unsynchronized state, leading to subsequent calls failing

    NativeCalls.cs:7188 @ Godot.Vector3 Godot.NativeCalls.godot_icall_2_816(nint, nint, Godot.Rid, Godot.Vector3*): NavigationServer navigation map query failed because it was made before first map synchronization.
	NavigationServer 'map_changed' signal can be used to receive update notifications.
	NavigationServer 'map_get_iteration_id()' can be used to check if a map has finished its newest iteration.
  <C++ Source>  modules/navigation/nav_map.cpp:193 @ get_closest_point()
  <Stack Trace> NativeCalls.cs:7188 @ Godot.Vector3 Godot.NativeCalls.godot_icall_2_816(nint, nint, Godot.Rid, Godot.Vector3*)
                NavigationServer3D.cs:301 @ Godot.Vector3 Godot.NavigationServer3D.MapGetClosestPoint(Godot.Rid, Godot.Vector3)

Steps to reproduce

  • Create a new Navigation Map through NavigationServer3D.map_create
  • Setup that Navigation map with calls such as NavigationRegion3D.set_navigation_map
  • Call NavigationServer3D.map_force_update
  • Call NavigationServer3D.map_get_iteration_id and check if return is different from 0

Or, with the MRP, simply open and run the project

Minimal reproduction project (MRP)

✔️ PASS - Godot 4.3: navigationserver3d.mapforceupdate-bug 4.3.zip

FAIL - Godot 4.4.1: navigationserver3d.mapforceupdate-bug 4.4.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions