# Crash on UE4Editor-Navmesh.dll

**URL:** <https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941>\
**Category:** C++\
**Tags:** workaround, win64, unreal-engine, crash, UE4, CPP, question\
**Created:** [December 11, 2017, 7:07am UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941 "2017-12-11T07:07:42Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyeongho\_Park](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kyeongho\_Park](https://forums.unrealengine.com/u/Kyeongho_Park)\
**Post date:** [December 11, 2017, 7:07am UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/1 "2017-12-11T07:07:42Z")

</div>

### Reproduced with:

- `Visual Studio 2017(15.5.1)`
- `UE 4.18.1-release`
- `Development Editor, Win64`

### I've built UE by myself without any problem,
but if I try to cook a sample project it crashes on:  

- `UnrealEngine\Engine\Source\Runtime\Navmesh\Private\Detour\DetourNavMesh.cpp: line 1278`

### I debugged it and found out the cause of crash:

- The compiler does wrong at conversion from `int` to `uint64`.

## My current workaround is,

in `UnrealEngine\Engine\Source\Runtime\Navmesh\Public\Detour\DetourAlloc.h, line 178 and 183`:

UE 4.18.1-release official:

```
inline T& operator[](int i) { return m_data[i]; }

```

My custom fix:

```
inline T& operator[](unsigned int i) { return m_data[i]; }

```

* * *

Is there any better solution for this?

---

<div class="post-metadata">

**Author:** ![ArneSikstrom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ArneSikstrom](https://forums.unrealengine.com/u/ArneSikstrom)\
**Post date:** [December 11, 2017, 4:48pm UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/2 "2017-12-11T16:48:20Z")

</div>

I can confirm that the workaround also works in UE 4.17.2 with VS 15.5.1.

Probably the same problem as in [https://answers.unrealengine.com/questions/734371/recast-navmesh-crash.html](https://answers.unrealengine.com/questions/734371/recast-navmesh-crash.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8e19b3a9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8e19b3a9](https://forums.unrealengine.com/u/anonymous_user_8e19b3a9)\
**Post date:** [December 12, 2017, 2:40am UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/3 "2017-12-12T02:40:18Z")

</div>

great job Kyeongho!

I patched my engine from your solution.  
Then I could avoid clashing! 🙂

I think the perfect solution of this issue that remove all embedded integer types (ex. unsignd int)from engine code.  
Then rewirte code with ue4 coding standard types(ex uint32).

thanks.

---

<div class="post-metadata">

**Author:** ![Ben\_Zeigler](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben\_Zeigler](https://forums.unrealengine.com/u/Ben_Zeigler)\
**Post date:** [December 12, 2017, 10:55pm UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/4 "2017-12-12T22:55:17Z")

</div>

We’re looking into this internally at Epic and we are able to reproduce. This appears to be a bug in the visual studio compiler update included in 15.5 and we are investigating possible solutions.

---

<div class="post-metadata">

**Author:** ![Ben\_Zeigler](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ben\_Zeigler](https://forums.unrealengine.com/u/Ben_Zeigler)\
**Post date:** [December 19, 2017, 5:50pm UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/5 "2017-12-19T17:50:15Z")

</div>

We have confirmed this is a bug on Microsoft’s side and they are working to fix it in the next update of Visual Studio 2017. In the meantime your two options are to install the visual studio 2015 toolset and use that ([http://landinghub.visualstudio.com/visual-cpp-build-tools](http://landinghub.visualstudio.com/visual-cpp-build-tools)) or to install an older version of the 2017 compiler toolset and force it to use that ([Side-by-side minor version MSVC toolsets in Visual Studio 2017 - C++ Team Blog](https://blogs.msdn.microsoft.com/vcblog/2017/11/15/side-by-side-minor-version-msvc-toolsets-in-visual-studio-2017/)). If you have both 2015 and 2017 installed it will use the 2017 IDE but the 2015 compiler, which works fine.

---

<div class="post-metadata">

**Author:** ![Rui\_Zhang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rui\_Zhang](https://forums.unrealengine.com/u/Rui_Zhang)\
**Post date:** [December 19, 2017, 10:04pm UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/6 "2017-12-19T22:04:41Z")

</div>

Hi Kyeongho,

I’m a developer on the Microsoft C++ compiler team. Per the discussion in this thread, your issue looks the same one tracked by the following link. But as I don’t see a standalone repro from your report, I can’t help confirm on my end. Please don’t hesitate to share if you have one. FYI, we will release the bug fix of the following issue in VS2017 15.6 Preview 2 and VS 2017 15.5.3.

> **[Developer Community](https://developercommunity.visualstudio.com/content/problem/163751/vs2017-155-c-compiler-generates-incorrect-code.html)**
>
> Developer Community

Also, for future reference, I encourage you to report any suspected compiler issue through on the following website which we are actively monitoring.

> **[Developer Community](https://developercommunity.visualstudio.com/spaces/62/index.html)**
>
> Developer Community

Thanks,

Rui Zhang

Microsoft Visual C++ Team

---

<div class="post-metadata">

**Author:** ![Kyeongho\_Park](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kyeongho\_Park](https://forums.unrealengine.com/u/Kyeongho_Park)\
**Post date:** [December 19, 2017, 11:48pm UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/7 "2017-12-19T23:48:09Z")

</div>

Good to see the fix with Visual Studio 2017 15.5.3 and 15.6 .

---

<div class="post-metadata">

**Author:** ![acxsasx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@acxsasx](https://forums.unrealengine.com/u/acxsasx)\
**Post date:** [December 20, 2017, 1:31am UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/8 "2017-12-20T01:31:44Z")

</div>

Thank you for this!

The second link does not work, you have some extra characters on the end of it …

> **[Side-by-side minor version MSVC toolsets in Visual Studio 2017](https://devblogs.microsoft.com/cppblog/side-by-side-minor-version-msvc-toolsets-in-visual-studio-2017/)**
>
> We’ve been delivering improvements to Visual Studio 2017 more frequently than ever before. Since its first release in March we’ve released four major updates to VS2017 and are currently previewing the fifth update, VS2017 version 15.5. The MSVC...

---

<div class="post-metadata">

**Author:** ![Zhi\_Kang\_Shao](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zhi\_Kang\_Shao](https://forums.unrealengine.com/u/Zhi_Kang_Shao)\
**Post date:** [January 2, 2018, 6:56pm UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/9 "2018-01-02T18:56:13Z")

</div>

Kyeongho Park thank you for investigating and fixing this. I encountered this today after switching from VS2015 to VS2017 and your post saved me a lot of time.

---

<div class="post-metadata">

**Author:** ![Kyeongho\_Park](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kyeongho\_Park](https://forums.unrealengine.com/u/Kyeongho_Park)\
**Post date:** [January 11, 2018, 5:16am UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/10 "2018-01-11T05:16:31Z")

</div>

I verified this issue is not reproduced any more with VS 2017 15.5.3 .

---

<div class="post-metadata">

**Author:** ![Kyeongho\_Park](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kyeongho\_Park](https://forums.unrealengine.com/u/Kyeongho_Park)\
**Post date:** [January 11, 2018, 5:17am UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/11 "2018-01-11T05:17:16Z")

</div>

I verified this issue is not reproduced any more with VS 2017 15.5.3 .

---

<div class="post-metadata">

**Author:** ![Rui\_Zhang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rui\_Zhang](https://forums.unrealengine.com/u/Rui_Zhang)\
**Post date:** [January 11, 2018, 4:38pm UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/12 "2018-01-11T16:38:10Z")

</div>

Thanks for the confirmation. It’s great to know the issue is resolved.

Thanks,  
Rui Zhang  
Microsoft Visual C++ Team

---

<div class="post-metadata">

**Author:** ![Uno1982](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/uno1982/32/982436_2.png) [@Uno1982](https://forums.unrealengine.com/u/Uno1982)\
**Post date:** [August 9, 2018, 11:25pm UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/13 "2018-08-09T23:25:11Z")

</div>

By chance has this issue returned in 4.19.2 with latest vs2017? 15.7.6

 ![250048-nav.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/e/cee3d794cf4699e4f061ad424f4a72f3d786f5da.png)

This happened after updating my project to 4.19.2 from 4.18.3. My game packages without issue on 4.18.3 but gets crashes on map load in 4.19.2. I’ve removed the landscape and AI from the game figuring maybe something was causing the navigation generation to error. Currently I’m going through the map trying to eliminate mesh objects from the nav mesh bounds hoping I can find a needle in a haystack (bad mesh) that might be causing it.

---

<div class="post-metadata">

**Author:** ![Uno1982](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/uno1982/32/982436_2.png) [@Uno1982](https://forums.unrealengine.com/u/Uno1982)\
**Post date:** [August 12, 2018, 4:26am UTC](https://forums.unrealengine.com/t/crash-on-ue4editor-navmesh-dll/411941/14 "2018-08-12T04:26:30Z")

</div>

FOUND IT!!! The SEDAN TEST VEHICLE in a navmesh in 4.19.2 causes this.
