Editor Crash when using Lazy Nav Generation

I am getting the following error when using world composition and Data Gathering Mode for navigation set to Lazy while using nav invokers.

I have tried to copy 1:1 the DefaultEngine settings from the Kite demo but am still getting crashes when opening a level with terrain and a nav bounds volume.

EDIT: Tried using Fixed Pool Size of 1024-4096 and am still getting crashes. HOWEVER, If I set Lazy to Instant and then back again, editor won’t crash until I close and restart it.

MachineId:3FF3E35C49AF8DC84F4322AE9A06D620
EpicAccountId:1f7b0b68b9e94579b591b5da9adaad67

Access violation - code c0000005 (first/second chance not available)

VCRUNTIME140
UE4Editor_Engine!TArray<float,NavMeshMemory::FNavigationMemoryStat>::Append<float,NavMeshMemory::FNavigationMemoryStat>() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\containers\array.h:1790]
UE4Editor_Engine!RecastGeometryExport::ExportHeightFieldSlice() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:572]
UE4Editor_Engine!FRecastGeometryExport::ExportHeightFieldSlice() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:1086]
UE4Editor_Landscape!ULandscapeHeightfieldCollisionComponent::GatherGeometrySlice() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\landscape\private\landscapecollision.cpp:1518]
UE4Editor_Engine!FRecastTileGenerator::DoAsyncGeometryGathering() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:1715]
UE4Editor_Engine!FRecastTileGenerator::DoWork() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:1672]
UE4Editor_Engine!FAsyncTask<FRecastTileGeneratorWrapper>::DoWork() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\async\asyncwork.h:256]
UE4Editor_Engine!FAsyncTask<FRecastTileGeneratorWrapper>::DoThreadedWork() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\async\asyncwork.h:280]
UE4Editor_Core!FQueuedThread::Run() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\hal\threadingbase.cpp:443]
UE4Editor_Core!FRunnableThreadWin::Run() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:74]

What’s your RecastNavMesh.MaxSimultaneousTileGenerationJobsCount? I never got around to making lazy geometry gathering to work with MaxSimultaneousTileGenerationJobsCount > 1.

Setting my MaxSimultaneousTileGenerationJobsCount to 1 fixed the immediate crashing when loading the level.

Navmesh generation is done off the game thread, MaxSimultaneousTileGenerationJobsCount just specifies how many jobs we allow. This shouldn’t have noticeable influence on the game thread, unless you have really big tiles with a lot of geometry in them, and even them it would cache the gather geometry and following updates should be seamless.

Having multiple invokers close to each other doesn’t impact navmesh generation, the invokers are processed beforehand to figure out which tiles need regeneration and only those get requested.

Have you tried using stat navigation to see what’s going on? Or better yet, using UE4 profiling tools?

I had crashes as well, I’m assuming you are using Dynamic nav mesh? If so then here are my setting. I just have a dynamic nav invoker on my AI and everything is AOK.

You’re correct, I had to adjust my tile size and dirty areas update frequency. I did use the profiling tools and it led me to the navigation system. I have it working very well now within PIE. However when I launch I am now getting this error -

MachineId:3FF3E35C49AF8DC84F4322AE9A06D620
EpicAccountId:1f7b0b68b9e94579b591b5da9adaad67

Assertion failed: NavOctreeInstance [File:D:\Build\++UE4+Release-4.13+Compile\Sync\Engine\Source\Runtime\Engine\Private\AI\Navigation\RecastNavMeshGenerator.cpp] [Line: 1783] 



UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:421]
UE4Editor_Engine!FRecastTileGenerator::PrepareGeometrySources() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:1784]
UE4Editor_Engine!FRecastTileGenerator::Setup() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:1641]
UE4Editor_Engine!FRecastNavMeshGenerator::CreateTileGenerator() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:4000]
UE4Editor_Engine!FRecastNavMeshGenerator::ProcessTileTasks() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:4024]
UE4Editor_Engine!FRecastNavMeshGenerator::TickAsyncBuild() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:3383]
UE4Editor_Engine!ANavigationData::TickAsyncBuild() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\ai\navigation\navigationdata.cpp:530]
...

I can make a new answer post if this is unrelated.

Thank you. It was specifically MaxSimultaneousTileGenerationJobsCount needed to be set to 1, and my Tile Size UU needed to be smaller than 10k.

Yes, please.