Summary
Every time a world with a Recast navmesh is torn down, the log shows this warning. That is each PIE end, each editor quit with a level loaded, and each game exit:
LogCrowdFollowing: Warning: Unable to find RecastNavMesh instance while trying to create UCrowdManager instance
Nothing is actually missing. The crowd manager is being asked to rebuild itself while the navigation system takes it apart.
UNavigationSystemV1::OnBeginTearingDown (Engine/Source/Runtime/NavigationSystem/Private/NavigationSystem.cpp, line 1346) calls CleanUp. CleanUp (line 5191) calls UnregisterNavData for each nav data (line 5236), and only afterwards drops the crowd manager with SetCrowdManager(nullptr) (line 5248). UnregisterNavData (line 2971) removes the nav data from NavDataSet (line 2975), then calls CrowdManager->OnNavDataUnregistered (line 2996).
That handler (Engine/Source/Runtime/AIModule/Private/Navigation/CrowdManager.cpp, line 1377) asks for a replacement with SetNavData(nullptr, /*bFindNewNavDataIfNull=*/true) (line 1385). That runs OnNavMeshUpdate, then CreateCrowdManager (line 897). MyNavData is null, so UpdateNavData searches the set the navmesh was just removed from. It finds nothing, and the UE_CLOGF at line 905 fires.
The effect is harmless, since the crowd manager is dropped a moment later. But every PIE session ends with a warning that says nothing about the project. Reading the code, nothing here depends on the project: any project that keeps the default Crowd Manager Class and has a Recast navmesh should hit it.
Suggested fix: in UNavigationSystemV1::CleanUp, call SetCrowdManager(nullptr) before the loop that unregisters nav data. The crowd is then freed while its navmesh still exists, and no rebuild is attempted. The other option is to skip the replacement search in UCrowdManager::OnNavDataUnregistered while the owning navigation system is cleaning up.
What Type of Bug are you experiencing?
AI
Steps to Reproduce
- In the UE 5.8.3 editor, open a level that has a NavMeshBoundsVolume and a RecastNavMesh. Leave Project Settings > Navigation System > Crowd Manager Class at its default (
/Script/AIModule.CrowdManager). - Start PIE, then stop it.
- Search the Output Log for “Unable to find RecastNavMesh instance”. It appears once, on the same frame as
LogWorld: BeginTearingDown for ....
It also appears when the editor quits with the level loaded, and when a -game run exits.
Expected Result
No warning. The crowd manager is destroyed along with the navigation system, without trying to rebuild against nav data that is being removed.
Observed Result
LogCrowdFollowing: Warning: Unable to find RecastNavMesh instance while trying to create UCrowdManager instance once per world teardown. In one editor session: five PIE sessions, five warnings, each on the BeginTearingDown frame, plus one at editor quit.
In -game runs on the same level: with the default Crowd Manager Class, the warning came 2 times out of 2. With CrowdManagerClass=None, it came 0 times out of 2, and the log had exactly one warning fewer.
Tested on UE 5.8.3 (launcher build, CL 58210709), macOS 27.0.1, Xcode 27.1, Apple Silicon (M5 Pro).
Affects Versions
5.8
Platform(s)
Mac
Additional Notes
Workaround for projects that do not use crowd following: [/Script/NavigationSystem.NavigationSystemV1] CrowdManagerClass=None in DefaultEngine.ini. That stops the crowd manager being created at all. Do not use it with UCrowdFollowingComponent or ADetourCrowdAIController. With no manager, the component turns its crowd simulation off with only a Visual Logger line (SetCrowdSimulationState: “Crowd manager can’t be found, disabling simulation”).
Our navmesh uses RuntimeGeneration=Dynamic. The code path above does not depend on that.
The code is not platform-specific, so Windows and Linux should behave the same, but only Mac was tested. Earlier engine versions were not checked.