# Nanite Landscape crash when building it

**URL:** <https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392>\
**Category:** World Creation\
**Tags:** unreal-engine, UE5, Landscape, Nanite\
**Created:** [October 11, 2023, 3:00pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392 "2023-10-11T15:00:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [October 11, 2023, 3:00pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/1 "2023-10-11T15:00:23Z")

</div>

Hello,

I’ve experienced a nanite crash under 5.3.1, happening 100% of the time :

- Turn on Nanite on the landscape
- Click on build data or rebuild data

```auto
Assertion failed: Pair != nullptr [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Map.h] [Line: 671]

UnrealEditor_Landscape!ALandscapeProxy::ExportToRawMeshDataCopyNew() [D:\build\++UE5\Sync\Engine\Source\Runtime\Landscape\Private\LandscapeEdit.cpp:4187]
UnrealEditor_Landscape!ALandscapeProxy::ExportToRawMeshDataCopy() [D:\build\++UE5\Sync\Engine\Source\Runtime\Landscape\Private\LandscapeEdit.cpp:3853]
UnrealEditor_Landscape!`ULandscapeNaniteComponent::InitializeForLandscapeAsync'::`2'::<lambda_1>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\Landscape\Private\LandscapeNaniteComponent.cpp:209]
UnrealEditor_Landscape!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),0> >::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:1265]
UnrealEditor_Core!`LowLevelTasks::FTask::Init<`FTaskGraphCompatibilityImplementation::QueueTask'::`5'::<lambda_1> >'::`11'::<lambda_1>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\Fundamental\Task.h:499]
UnrealEditor_Core!LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask * __cdecl(bool),48>::TTaskDelegateImpl<`LowLevelTasks::FTask::Init<`FTaskGraphCompatibilityImplementation::QueueTask'::`5'::<lambda_1> >'::`11'::<lambda_1>,0>::CallAndMove() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\Fundamental\TaskDelegate.h:171]
UnrealEditor_Core!LowLevelTasks::FTask::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\Fundamental\Task.h:627]
UnrealEditor_Core!LowLevelTasks::FScheduler::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:172]
UnrealEditor_Core!LowLevelTasks::FScheduler::TryExecuteTaskFrom<LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue,&LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue::DequeueGlobal,0>() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:350]
UnrealEditor_Core!LowLevelTasks::FScheduler::WorkerMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:378]
UnrealEditor_Core!UE::Core::Private::Function::TFunctionRefCaller<`LowLevelTasks::FScheduler::CreateWorker'::`2'::<lambda_1>,void __cdecl(void)>::Call() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Templates\Function.h:480]
UnrealEditor_Core!FThreadImpl::Run() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\Thread.cpp:69]
UnrealEditor_Core!FRunnableThreadWin::Run() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:149]

```

I’ve tried many thing to fix it :

- Removing Materials
- Transfering the landscape heightmap/material to a whole new landscape (this is working until i’m re-importing weight paint)
- turning off many option.

---

<div class="post-metadata">

**Author:** ![Astrotronic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/astrotronic/32/1194566_2.png) [@Astrotronic](https://forums.unrealengine.com/u/Astrotronic)\
**Post date:** [October 11, 2023, 4:22pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/2 "2023-10-11T16:22:52Z")

</div>

Hello Aherys,

I was unable to reproduce this in 5.3.1

1. Created a new ‘Basic’ level
2. Open Landscape tool and created a landscape with default settings
3. Enabled ‘Enable Nanite’ on the Landscape
4. Tried ‘Build Data’ and ‘Rebuild Data’ after sculpting in both Landscape Mode and Selection Mode.

It sounds like weight-painting is required for this crash?

Please consider expanding upon the repro steps and submitting a [bug report](https://www.unrealengine.com/en-US/support/report-a-bug).

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [October 12, 2023, 3:48am UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/3 "2023-10-12T03:48:06Z")

</div>

Hello Astrotronic,

Yes, weight painting is required for this.  
I’ve attached a bunch of heightmap :

 ![BL_Heightmap](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/5/aa5c2193ef75d091973f1563de5307c1453ac847.jpeg)  
 ![Forest](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/e/5ae29bc8f83b2549887392e1822a7f4cf0d9a2c8.jpeg)  
 ![burned](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/4/0e47551fe4a89992d484ada9b2e144d58525e3d7.png)  
 ![dead](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/8/4387fb340eabb760056f3b83e27c56d02cf0b5f8.png)  
 ![dirt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/a/bcafd5bbbb4f8c4794432ebef223026407c66731.png)  
 ![dirtquarry](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/c/13c9f97fce3107b7762fd7a5954701c887298d82.png)  
 ![stoneQuarry](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/b/7bb2f711bd72b9d5df7e17b690aa08703154edac.png)  
 ![moss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/7/087296b1c047ece4b437b0420da1de3530ab7efc.png)  
 ![puddle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/7/b17549396b28d96e3f1e311383208ac5c2689a0c.png)  
 ![removefoliage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/2/b/a2b00bf9f01c947943bd9aba1c9124f05b2b070b.png)  
 ![shrub](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/2/592eac17be9a510a413cc41c33e3f6a7ca474394.png)

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [October 12, 2023, 3:49am UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/4 "2023-10-12T03:49:00Z")

</div>

![Visibility](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/9/3/193cdf4be5c9eb226e2445daae4c740ad8ccbfac.png)  
 ![stones](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/7/b676d3f118662892dcb3d198430c9a360e68f702.png)

When those heightmap are set on the landscape, then build with nanite, this where the crash occure.

---

<div class="post-metadata">

**Author:** ![Marius\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Marius\_1](https://forums.unrealengine.com/u/Marius_1)\
**Post date:** [October 15, 2023, 10:08pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/5 "2023-10-15T22:08:20Z")

</div>

I have the same problem. Enable Nanite, click Build Data and it says "Building Nanite Landscape Mesh (0 of 256). Sits at 0% for about 5 minutes and then UE 5.3.1 just shuts down back to desktop.

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [October 16, 2023, 9:04am UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/6 "2023-10-16T09:04:43Z")

</div>

Yep, exactly same issue (it’s just not 256 mesh for me, but 4)

---

<div class="post-metadata">

**Author:** ![TheRealBiomes](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/therealbiomes/32/1017675_2.png) [@TheRealBiomes](https://forums.unrealengine.com/u/TheRealBiomes)\
**Post date:** [October 17, 2023, 12:03pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/7 "2023-10-17T12:03:04Z")

</div>

How big is the landscape? 8K landscapes are known to pretty much be a guaranteed crash, but haven’t had issues with smaller ones.

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [October 17, 2023, 2:59pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/8 "2023-10-17T14:59:36Z")

</div>

2km square, 1009x1009 resolution.

And the crash doesn’t really look like any kind of memory/vram limitation, it’s just a tpair misscatching.

---

<div class="post-metadata">

**Author:** ![TheRealBiomes](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/therealbiomes/32/1017675_2.png) [@TheRealBiomes](https://forums.unrealengine.com/u/TheRealBiomes)\
**Post date:** [October 18, 2023, 12:52pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/9 "2023-10-18T12:52:43Z")

</div>

Weird, converting less than 8k landscapes works perfectly fine for me and a lot of others it seems. Maybe validate your engine install or try in a new project? I assume you have tried another landscape to see if it’s specific to that actor?

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [October 18, 2023, 4:36pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/10 "2023-10-18T16:36:11Z")

</div>

No, it’s not coming from the the engine, and yes, a new project will work : it’s as mentionned coming from the weight paint.

---

<div class="post-metadata">

**Author:** ![Manking-1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Manking-1](https://forums.unrealengine.com/u/Manking-1)\
**Post date:** [October 31, 2023, 10:29am UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/11 "2023-10-31T10:29:34Z")

</div>

Same issue. Crash 5.3.1 when activate Nanite on Landscape and save or build.

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [November 8, 2023, 5:43pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/12 "2023-11-08T17:43:55Z")

</div>

Unfortunately, 5.3.2 didn’t fix the issue.

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [November 8, 2023, 6:56pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/13 "2023-11-08T18:56:58Z")

</div>

Not sure, but seem to be the visibility mask and flagged to be resolved for 5.4 :

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-194086)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

---

<div class="post-metadata">

**Author:** ![decksounds13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@decksounds13](https://forums.unrealengine.com/u/decksounds13)\
**Post date:** [November 22, 2023, 11:44am UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/14 "2023-11-22T11:44:52Z")

</div>

> [@Marius\_1](#):
>
> ave the same problem. Enable Nanite, click Build Data and it says "Building Nanite Landscape Mesh (0 of 256). Sits at 0% for about 5 minutes and then UE 5.3.1 just shuts down back to desktop.

I am getting the same crash.

---

<div class="post-metadata">

**Author:** ![Alsyn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alsyn](https://forums.unrealengine.com/u/Alsyn)\
**Post date:** [November 28, 2023, 4:47pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/15 "2023-11-28T16:47:36Z")

</div>

You can use the cvar (console command) : landscape.nanite.marchingsquarevisibility=false.  
Epic changed the algorithm to export Landscapes to raw meshes, but the new algorithm is unstable. This cvar will rollback to the previous algorithm.  
There is a fix on Epic’s main branch (they also removed the old algorithm and the cvar), but it isn’t really trivial to integrate. But it is very likely to be fixed properly for 5.4.

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [December 7, 2023, 11:54am UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/16 "2023-12-07T11:54:19Z")

</div>

That godtiers dude.

---

<div class="post-metadata">

**Author:** ![Kasper\_Bjerby](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kasper\_Bjerby](https://forums.unrealengine.com/u/Kasper_Bjerby)\
**Post date:** [March 8, 2024, 3:02pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/17 "2024-03-08T15:02:21Z")

</div>

It does work, you just need around 200 gb of “ram” for a 8k map, and with ram i don’t mean you actually need to have it as real ram, a big enough pagefile also works (google how to increase your windows pagefile size), it took me around 90 minutes, where my computer is totally unresponsive for the first 30 minutes, cause it is filling up the ram/pagefile, in the next 30 minutes the progress bar start to move slowly and you can use your computer a bit, this is where it takes the info it stored in the ram/pagefile and use it, then you also have to save the project to disk and that is another 30 minutes… Don’t know why they made that way, it’s very stupid to not take it in chunks and try to store it all in memory at once, but if you have the harddrive space (don’t have to be your default drive or a fast one) and the patience, it can be done… Just increase your pagefile (and if use a pagefile on another drive than the default one, set the one on the default one to a fixed size also, cause it uses that one first and if your system disk is small, it is going to fill it completely, and that will also make your system less responsive), go do something else while it works and only build nanite when your are done with your landscape 😃 Ohh and also, it does not clear up your memory and pagefile properly after it is done, so you also have to restart the computer after to get it fully back

---

<div class="post-metadata">

**Author:** ![kurylo3d](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kurylo3d/32/1150889_2.png) [@kurylo3d](https://forums.unrealengine.com/u/kurylo3d)\
**Post date:** [March 25, 2024, 9:28pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/18 "2024-03-25T21:28:10Z")

</div>

unfortunately crash remains with unreal 5.4 beta… 8k terrain. No materials… just used a height map form real world data to create some terrain without even sculpting anything. Trying to make it a nanite mesh and then build data for freezes the computer for a while and then crashes.

---

<div class="post-metadata">

**Author:** ![kurylo3d](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kurylo3d/32/1150889_2.png) [@kurylo3d](https://forums.unrealengine.com/u/kurylo3d)\
**Post date:** [March 25, 2024, 11:35pm UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/19 "2024-03-25T23:35:01Z")

</div>

I tried enabling 200 additional gb of ram on a 2nd hard drive paging file… Didnt work… after a long time at 0% with an unuseable computer… it crashes unreal…

---

<div class="post-metadata">

**Author:** ![kurylo3d](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kurylo3d/32/1150889_2.png) [@kurylo3d](https://forums.unrealengine.com/u/kurylo3d)\
**Post date:** [March 27, 2024, 12:12am UTC](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392/20 "2024-03-27T00:12:09Z")

</div>

alright i got it working. The solution is to convert the scene into a world partition scene. This will break up the landscape into 1 landscape with multiple areas split up per world partition grid. Then you unload them all… load them in by sections and build… do several at a time… they save the others so they dont have to be rebuild as you gradually reveal more nad more. And build more and more.

[Next page](https://forums.unrealengine.com/t/nanite-landscape-crash-when-building-it/1329392.md?page=2)
