# UE5 - VirtualTextureAllocator crash when building lighting with GPULightmass

**URL:** <https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258>\
**Category:** Rendering\
**Tags:** Lightmass, building-lighting, light-build, unreal-engine, UE5-0, question\
**Created:** [April 14, 2022, 1:22pm UTC](https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258 "2022-04-14T13:22:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ozykz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ozykz/32/1194601_2.png) [@Ozykz](https://forums.unrealengine.com/u/Ozykz)\
**Post date:** [April 14, 2022, 1:22pm UTC](https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258/1 "2022-04-14T13:22:44Z")

</div>

I am getting the following error in UE5 when trying to build lighting:  
Ensure condition failed: Index \<= 0x8000 [File:D:\build++UE5\Sync\Engine\Source\Runtime\Renderer\Private\VT\VirtualTextureAllocator.cpp] [Line: 113]

This seems to happen when my scene is above a certain size. Unfortunately it’s only about 30% of what I was able to build in UE4.

Interestingly enough, this seems to happen even when I uncheck all the virtual texturing checkboxes in the project settings.

Any suggestions? This currently is the only thing holding my project back from transitioning to UE5.

---

<div class="post-metadata">

**Author:** ![Ozykz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ozykz/32/1194601_2.png) [@Ozykz](https://forums.unrealengine.com/u/Ozykz)\
**Post date:** [April 14, 2022, 1:29pm UTC](https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258/2 "2022-04-14T13:29:55Z")

</div>

Things I’ve tried so far:

Disabled texture streaming options in project settings:  
Increased r.VT.PoolSizeScale

---

<div class="post-metadata">

**Author:** ![Ozykz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ozykz/32/1194601_2.png) [@Ozykz](https://forums.unrealengine.com/u/Ozykz)\
**Post date:** [April 20, 2022, 5:01pm UTC](https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258/3 "2022-04-20T17:01:25Z")

</div>

Crash still occurs in UE5-Main as of April 20. In fact, it’s worse. A scene I could build lighting for in 5.0 does not build in V5.1, with the same crash errors.

---

<div class="post-metadata">

**Author:** ![Ozykz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ozykz/32/1194601_2.png) [@Ozykz](https://forums.unrealengine.com/u/Ozykz)\
**Post date:** [April 28, 2022, 1:46pm UTC](https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258/4 "2022-04-28T13:46:06Z")

</div>

I upgraded to a 3090 and I am now able to build much larger levels, however I’m still getting the same crash when the level gets too large. When I had the crash task manager showed 16GB out of 24GB of VRAM being used.

Haven’t tried 5.1/ue5-main with the 3090, but I imagine if it’s like the results I was getting with my 3080, it will probably crash earlier than it is in 5.0, but I’ll give it the benefit of the doubt until 5.1 actually comes out.

---

<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:** [July 17, 2023, 8:39am UTC](https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258/5 "2023-07-17T08:39:39Z")

</div>

Hello did you manage to find a solution ?

---

<div class="post-metadata">

**Author:** ![angelman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@angelman](https://forums.unrealengine.com/u/angelman)\
**Post date:** [July 17, 2023, 7:43pm UTC](https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258/6 "2023-07-17T19:43:38Z")

</div>

According to a thread on UDN the issue maybe related to the number of pages required. Unreal stores this as a 16bit number and is running out of space. Ideally it should be 32bit. Fix is to modify the source code… which is not ideal.

---

<div class="post-metadata">

**Author:** ![Ozykz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ozykz/32/1194601_2.png) [@Ozykz](https://forums.unrealengine.com/u/Ozykz)\
**Post date:** [July 18, 2023, 3:06pm UTC](https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258/7 "2023-07-18T15:06:08Z")

</div>

This sounds likely.

I’ve been relying on a lighting trick/workaround that allows me to use sublevels with built lighting, so I have not tried baking large levels recently.

---

<div class="post-metadata">

**Author:** ![ZulCul](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZulCul](https://forums.unrealengine.com/u/ZulCul)\
**Post date:** [November 7, 2025, 12:51pm UTC](https://forums.unrealengine.com/t/ue5-virtualtextureallocator-crash-when-building-lighting-with-gpulightmass/528258/8 "2025-11-07T12:51:14Z")

</div>

Are there any easier solutions than this? Maybe there are any console commands or something else which can help?
