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

**URL:** <https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278>\
**Category:** World Creation\
**Tags:** navmesh-bug, unreal-engine, question\
**Created:** [January 11, 2018, 4:17am UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278 "2018-01-11T04:17:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Realgone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Realgone](https://forums.unrealengine.com/u/Realgone)\
**Post date:** [January 11, 2018, 4:17am UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/1 "2018-01-11T04:17:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ClydeFrog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClydeFrog](https://forums.unrealengine.com/u/ClydeFrog)\
**Post date:** [January 11, 2018, 9:53pm UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/2 "2018-01-11T21:53:52Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Realgone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Realgone](https://forums.unrealengine.com/u/Realgone)\
**Post date:** [January 12, 2018, 1:00pm UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/3 "2018-01-12T13:00:44Z")

</div>

thank you!  
you saved my life!

---

<div class="post-metadata">

**Author:** ![dextml](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dextml/32/901220_2.png) [@dextml](https://forums.unrealengine.com/u/dextml)\
**Post date:** [March 27, 2018, 4:39pm UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/4 "2018-03-27T16:39:56Z")

</div>

Save me hours of debugging!

---

<div class="post-metadata">

**Author:** ![Khaliszt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Khaliszt](https://forums.unrealengine.com/u/Khaliszt)\
**Post date:** [April 17, 2018, 9:00am UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/5 "2018-04-17T09:00:38Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![ClydeFrog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClydeFrog](https://forums.unrealengine.com/u/ClydeFrog)\
**Post date:** [April 17, 2018, 1:29pm UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/6 "2018-04-17T13:29:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Khaliszt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Khaliszt](https://forums.unrealengine.com/u/Khaliszt)\
**Post date:** [April 17, 2018, 1:36pm UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/7 "2018-04-17T13:36:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Khaliszt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Khaliszt](https://forums.unrealengine.com/u/Khaliszt)\
**Post date:** [April 17, 2018, 1:37pm UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/8 "2018-04-17T13:37:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ClydeFrog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClydeFrog](https://forums.unrealengine.com/u/ClydeFrog)\
**Post date:** [April 17, 2018, 1:57pm UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/9 "2018-04-17T13:57:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Khaliszt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Khaliszt](https://forums.unrealengine.com/u/Khaliszt)\
**Post date:** [April 17, 2018, 2:15pm UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/10 "2018-04-17T14:15:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bbbbbb951](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bbbbbb951](https://forums.unrealengine.com/u/bbbbbb951)\
**Post date:** [October 23, 2019, 9:05am UTC](https://forums.unrealengine.com/t/navmesh-crash-on-scaling-and-loading-a-scaled-one-in-a-level/414278/11 "2019-10-23T09:05:36Z")

</div>

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 ?
