Navmesh crash on scaling and loading a scaled one in a level

Hello
i have a problem with navmesh bounds volume. when i create a navmesh everything is ok. but when i want to scale it engine crashes.also when i open a level with navmesh bound in it engine crashes. my engine version is 4.18 and i have compiled it with VS15.5.2 .

here is my crash report:
LoginId:eb9b9f414831ed89982d76b2ee8d8a97
EpicAccountId:0bc95d2f281e4c33b03f5b7c6a34296c

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

UE4Editor_Navmesh!dtNavMesh::connectClusterLink() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\navmesh\private\detour\detournavmesh.cpp:1278]
UE4Editor_Navmesh!dtNavMesh::connectExtLinks() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\navmesh\private\detour\detournavmesh.cpp:1021]
UE4Editor_Navmesh!dtNavMesh::addTile() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\navmesh\private\detour\detournavmesh.cpp:1772]
UE4Editor_Engine!FRecastNavMeshGenerator::AddGeneratedTiles() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:3769]
UE4Editor_Engine!FRecastNavMeshGenerator::ProcessTileTasks() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:4164]
UE4Editor_Engine!FRecastNavMeshGenerator::TickAsyncBuild() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\engine\private\ai\navigation\recastnavmeshgenerator.cpp:3453]
UE4Editor_Engine!UNavigationSystem::Tick() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\engine\private\ai\navigation\navigationsystem.cpp:876]
UE4Editor_Engine!UWorld::Tick() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\engine\private\leveltick.cpp:1359]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\editor\unrealed\private\editorengine.cpp:1459]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\editor\unrealed\private\unrealedengine.cpp:396]
UE4Editor!FEngineLoop::Tick() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\launch\private\launchengineloop.cpp:3296]
UE4Editor!GuardedMain() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\armin\ue4.18\unreal.engine.v4.18.1.source\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
kernel32
ntdll

Hi, I had a similar issue and looked around and found the following (and tested that it stopped the crash):

In your:
“Engine\Source\Runtime\Navmesh\Public\Detour\DetourAlloc.h” you need to change the parameter types from int to unsigned int:

on line 178
change: inline const T& operator[](int i) const { return m_data[i]; }
to: inline const T& operator[](unsigned int i) const { return m_data[i]; }

line 184
change: inline T& operator[](int i) { return m_data[i]; }
to: inline T& operator[](unsigned int i) { return m_data[i]; }

Hope this helps!

thank you!
you saved my life!

Save me hours of debugging!

Had same trouble with this but in a gitHub version of 4.19. Do you think this same solution will work? and most importantly, does it have any impact on building or designing to make this change? greets!

Hi, from what I understand the navmesh issue was a compiler issue. I’m also currently using the GitHub version of 4.19 and that specific issue has been resolved (my compiler version is VS Community 2017 ver. 15.5.6). You might want to check that first so you won’t even need to make the change.
However, in the case that you do make the change - I found that there was no impact at all on designing and/or building after making the change.

Hi Clyde. Thanks for the answer! i think you might be right. I had a trepidant build through github this time because i had VS15 and somehow it mixed around things and searched for VS17… ended up installing 17 but very probably things go a bit slightly w r o n g haha. Greets! Will try.

Just one more quick thing, what made you think it’s a compiler error? Could be a good deduction!

I made a simple project using a floor and one navmesh - I saw that there was no issue using the downloaded version of the engine. Then I built the same simple project using the GitHub source and boom, it crashed. I knew that both myself and Epic are using the same source - but I had no clue what compiler version they used. After I saw that changing parameter types (int/uint) resolved the issue, well, that just screams compiler/linker problem.

Good, good. I understand. Well… have a great day!! Thanks!

Hi,Clyde.I meet the same problem after open my old project. No matter 4.22 or 4.23, the problem still exist.Since i’m using the download engine from Epic Games Launcher, not the compile version from github . So do you know how to fix it through a download engine ?