Context
Projects can turn on the project setting bDoFullyAsyncNavDataGathering to execute navigation mesh building tasks on worker threads. Some of these tasks will access the NavOctree, whose lifetime is managed by UNavigationSystemV1.
Problem
When the user exits the application, UNavigationSystemV1::CleanUp() will immediately execute on the GameThread which destroys the NavOctree and null its reference to it. Navigation tasks may still be executing on other threads and they are not prepared for the NavOctree to be destroyed while the task is running. This is a race condition that can result in null pointer access from the worker thread running the nav task. A licensee has provided one worker thread callstack where this happened.
check(NavSys.GetNavOctree()); FPlatformProcess::Sleep(5.0f); check(NavSys.GetNavOctree());
Callstack of null pointer access (non-GameThread, fatal):
FNavigationOctree::DemandLazyDataGathering (NavigationOctree.cpp:76)
FNavigationDataHandler::DemandLazyDataGathering (NavigationDataHandler.cpp:585)
UNavigationSystemV1::DemandLazyDataGathering (NavigationSystem.cpp:3352)
FRecastTileGenerator::GatherNavigationDataGeometry (RecastNavMeshGenerator.cpp:2092)
FRecastTileGenerator::GatherGeometryFromSources (RecastNavMeshGenerator.cpp:1945)
FRecastTileGenerator::DoWork (RecastNavMeshGenerator.cpp:1875)
FAsyncTaskBase::DoWork (AsyncWork.h:288)
FAsyncTaskBase::DoThreadedWork (AsyncWork.h:312)
Example callstack where NavOctree got nulled before (GameThread, non-fatal):
UnrealEditor-NavigationSystem.dll!UNavigationSystemV1::CleanUp(const FNavigationSystem::ECleanupMode Mode) Line 5054 C++
UnrealEditor-NavigationSystem.dll!UNavigationSystemV1::OnBeginTearingDown(UWorld * World) Line 1271 C++
[External Code]
UnrealEditor-UnrealEd.dll!UEditorEngine::TeardownPlaySession(FWorldContext & PieWorldContext) Line 690 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::EndPlayMap() Line 344 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2475 C++
UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 546 C++
UnrealEditor.exe!FEngineLoop::Tick() Line 5872 C++
[Inline Frame] UnrealEditor.exe!EngineTick() Line 69 C++
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
How does UMG set overlapping layouts?
What method is used to fill polygonal regions when drawing spline mesh at run time?
Delay nodes occasionally don't fire the "Completed" output in a nativized build
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How does TextureRenderTarget2D get TArray<uint8> type data?
How to properly terminate the DoWork thread function in FAsyncTask?
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-238822 in the post.
0 |
Component | UE - AI - Navigation |
---|---|
Affects Versions | 5.4.4 |
Target Fix | 5.5.3 |
Fix Commit | 39186272 |
---|
Created | Jan 14, 2025 |
---|---|
Resolved | Jan 14, 2025 |
Updated | Jan 27, 2025 |