# UE5 Game Engine Crash : Assertion failed, Loss of data caused by narrowing conversion

**URL:** <https://forums.unrealengine.com/t/ue5-game-engine-crash-assertion-failed-loss-of-data-caused-by-narrowing-conversion/1761380>\
**Category:** Feedback & Requests\
**Tags:** unreal-engine, crash, UE5, bug-report, Rendering\
**Created:** [March 19, 2024, 1:35am UTC](https://forums.unrealengine.com/t/ue5-game-engine-crash-assertion-failed-loss-of-data-caused-by-narrowing-conversion/1761380 "2024-03-19T01:35:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AtlanticaWorlds](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/atlanticaworlds/32/926144_2.png) [@AtlanticaWorlds](https://forums.unrealengine.com/u/AtlanticaWorlds)\
**Post date:** [March 19, 2024, 1:35am UTC](https://forums.unrealengine.com/t/ue5-game-engine-crash-assertion-failed-loss-of-data-caused-by-narrowing-conversion/1761380/1 "2024-03-19T01:35:00Z")

</div>

I’m currently working on a galaxy-wide game using UE5. The UE 5.3.2 game engine kept crashing when I moved from a planet to one of its moons (not vice versa) or when I entered a different planetary system.

The following is the stack trace I was getting:

```auto
Assertion failed: IntFitsIn<OutType>(In) [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Templates\UnrealTemplate.h] [Line: 163] Loss of data caused by narrowing conversion

UnrealEditor_Renderer!FSceneRenderer::AddViewDependentWholeSceneShadowsForView() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\ShadowSetup.cpp:5198]
UnrealEditor_Renderer!FSceneRenderer::CreateDynamicShadows() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\ShadowSetup.cpp:5786]
UnrealEditor_Renderer!FGatherShadowPrimitivesPrepareTask::DoTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\ShadowSetup.cpp:4724]
UnrealEditor_Renderer!TGraphTask<FGatherShadowPrimitivesPrepareTask>::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:150]
UnrealEditor_Core!LowLevelTasks::FScheduler::TryExecuteTaskFrom<LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue,&LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue::DequeueLocal,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]

```

In order to resolve this issue I had to change the Shadow Map Method from “Virtual Shadow Maps” to “Shadow Maps.”

 ![ue5_shadow_maps](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/6/926711987e37065f8c7ce0dda864c84f7df8ac63.png)

It looks like VSMs were in beta in UE 5.0:  
[UE 5 Docs: Virtual Shadow Maps](https://docs.unrealengine.com/5.0/en-US/virtual-shadow-maps-in-unreal-engine/)

---

<div class="post-metadata">

**Author:** ![GCasalis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GCasalis](https://forums.unrealengine.com/u/GCasalis)\
**Post date:** [September 25, 2024, 9:15pm UTC](https://forums.unrealengine.com/t/ue5-game-engine-crash-assertion-failed-loss-of-data-caused-by-narrowing-conversion/1761380/2 "2024-09-25T21:15:29Z")

</div>

For me, this assert was making the editor fail to launch, on UE5.3.2  
This “Virtual Shadow Maps” setting can be disabled in the “DefaultEngine.ini”

`r.Shadow.Virtual.Enable=0`

@AtlanticaWorlds thank you so much for this, I would have never found this solution 😅

---

<div class="post-metadata">

**Author:** ![AtlanticaWorlds](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/atlanticaworlds/32/926144_2.png) [@AtlanticaWorlds](https://forums.unrealengine.com/u/AtlanticaWorlds)\
**Post date:** [December 16, 2024, 3:30pm UTC](https://forums.unrealengine.com/t/ue5-game-engine-crash-assertion-failed-loss-of-data-caused-by-narrowing-conversion/1761380/3 "2024-12-16T15:30:03Z")

</div>

I had the same problem in UE 5.4.4, did a Google search and found my own solution again, which worked. Haha.

---

<div class="post-metadata">

**Author:** ![LieutLest](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LieutLest](https://forums.unrealengine.com/u/LieutLest)\
**Post date:** [January 10, 2025, 1:55pm UTC](https://forums.unrealengine.com/t/ue5-game-engine-crash-assertion-failed-loss-of-data-caused-by-narrowing-conversion/1761380/4 "2025-01-10T13:55:29Z")

</div>

Hey, was your solution the same as above?

---

<div class="post-metadata">

**Author:** ![thuynder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thuynder](https://forums.unrealengine.com/u/thuynder)\
**Post date:** [January 24, 2025, 3:23pm UTC](https://forums.unrealengine.com/t/ue5-game-engine-crash-assertion-failed-loss-of-data-caused-by-narrowing-conversion/1761380/5 "2025-01-24T15:23:00Z")

</div>

This is not a solution, this is opting out of a feature. There is still an error with VSM causing that crash, then, it just turns off VSM.

---

<div class="post-metadata">

**Author:** ![Bruce\_ruoyu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bruce\_ruoyu](https://forums.unrealengine.com/u/Bruce_ruoyu)\
**Post date:** [August 18, 2025, 9:19pm UTC](https://forums.unrealengine.com/t/ue5-game-engine-crash-assertion-failed-loss-of-data-caused-by-narrowing-conversion/1761380/6 "2025-08-18T21:19:12Z")

</div>

Thank u so much it works! Love from 2025
