Crash with LargeWorldRenderPosition.cpp?

Hi,
I have migrated my project from UE4 to UE5, and it compiles.
But when i try to run the game PIE, the editor crashes with the following message:

"Ensure condition failed: false [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Misc\LargeWorldRenderPosition.cpp] [Line: 52] "

Line 52 in the mentioned cpp is checking some matrix origin against a max origin, no idea what this is.

Any one had a similar problem ?

Thanks
Cedric

Try running it in the debugger and it will break on the ensure and you can inspect the call stack and variable values, it might give you a clue as to what is causing it.

(I think there were some changes to do with large worlds between UE4-UE5 that might be relevant.)

Thanks, but unfortunately the call stack doesn’t help.
The process never seems to go through my code.
It only goes from kernel32.dll to various Unreal dlld (UnrealEditorRenderer.dll, UnrealEditor-RenderCore.dll, UnrealEditorCore.dll…). I don’t get any other info.
The Visual Studio viewport says that the UnrealEdirotCore.pdb is not loaded.
I guess i have to install the debugging symbols from the launcher, i’ll try that.

So i have installed the debug symbols and now i have the details of where the errors occur in each dll:
https://imgur.com/a/Se2Vq4d
But i can’t debug UE4, i don’t know anything about the code for large worlds.

Hmm, i though a screenshot on imgur would be more readable but it’s not.
So here’s the whole callstack in case it speaks to someone.

[Inline Frame] UnrealEditor-Core.dll!CheckMatrixInTileOffsetRange::__l5::<lambda_bf857f8983deb50331a0b9f7ccb0b143>::operator()() Line 52 C++
[Inline Frame] UnrealEditor-Core.dll!CheckMatrixInTileOffsetRange(const UE::Math::TMatrix &) Line 52 C++
[Inline Frame] UnrealEditor-Core.dll!FLargeWorldRenderScalar::MakeToRelativeWorldMatrixDouble(const UE::Math::TVector) Line 69 C++
UnrealEditor-Core.dll!FLargeWorldRenderScalar::MakeToRelativeWorldMatrix(const UE::Math::TVector Origin, const UE::Math::TMatrix & ToWorld) Line 64 C++
UnrealEditor-Renderer.dll!FDeferredDecalPS::SetParameters(FRHICommandList & RHICmdList, const FViewInfo & View, const FMaterialRenderProxy * MaterialProxy, const FDeferredDecalProxy & DecalProxy, const float FadeAlphaValue) Line 97 C++
UnrealEditor-Renderer.dll!DecalRendering::SetShader(FRHICommandList & RHICmdList, FGraphicsPipelineStateInitializer & GraphicsPSOInit, unsigned int StencilRef, const FViewInfo & View, const FTransientDecalRenderData & DecalData, EDecalRenderStage DecalRenderStage, const UE::Math::TMatrix & FrustumComponentToClip) Line 398 C++
UnrealEditor-Renderer.dll!AddDeferredDecalPass::__l2::void (unsigned int, unsigned int, EDecalRenderTargetMode)::__l2::(FRHICommandList & RHICmdList) Line 509 C++
UnrealEditor-Renderer.dll!TRDGLambdaPass<FDeferredDecalPassParameters,void (FRHICommandList &)>::Execute(FRHIComputeCommandList & RHICmdList) Line 564 C++
UnrealEditor-RenderCore.dll!FRDGBuilder::ExecutePass(FRDGPass * Pass, FRHIComputeCommandList & RHICmdListPass) Line 2447 C++
UnrealEditor-RenderCore.dll!FRDGBuilder::DispatchParallelExecute::__l9::(ENamedThreads::Type __formal, const TRefCountPtr & MyCompletionGraphEvent) Line 2277 C++
[Inline Frame] UnrealEditor-RenderCore.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &)>::operator()(ENamedThreads::Type <Params_0>, const TRefCountPtr &) Line 676 C++
[Inline Frame] UnrealEditor-RenderCore.dll!TFunctionGraphTaskImpl<void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &),0>::DoTaskImpl(TUniqueFunction<void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &)> &) Line 1469 C++
[Inline Frame] UnrealEditor-RenderCore.dll!TFunctionGraphTaskImpl<void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &),0>::DoTask(ENamedThreads::Type) Line 1450 C++
UnrealEditor-RenderCore.dll!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &),0>>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 975 C++
[Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> &) Line 587 C++
[Inline Frame] UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::QueueTask::__l5::<lambda_13c427d0bfcf321a066cb5a2badfbc27>::operator()() Line 2027 C++
UnrealEditor-Core.dll!LowLevelTasks::FTask::Init::__l2::(const bool NotCanceled) Line 350 C++
[Inline Frame] UnrealEditor-Core.dll!Invoke(LowLevelTasks::FTask::Init::__l2::void (const bool) &) Line 47 C++
[Inline Frame] UnrealEditor-Core.dll!LowLevelTasks::TTaskDelegate<void __cdecl(bool),48>::TTaskDelegateImpl<void (const bool),0>::Call(void *) Line 162 C++
UnrealEditor-Core.dll!LowLevelTasks::TTaskDelegate<void __cdecl(bool),48>::TTaskDelegateImpl<void (const bool),0>::CallAndMove(LowLevelTasks::TTaskDelegate<void __cdecl(bool),48> & Destination, void * InlineData, unsigned int DestInlineSize, bool <Params_0>) Line 171 C++
[Inline Frame] UnrealEditor-Core.dll!LowLevelTasks::TTaskDelegate<void __cdecl(bool),48>::CallAndMove(LowLevelTasks::TTaskDelegate<void __cdecl(bool),48> &) Line 308 C++
UnrealEditor-Core.dll!LowLevelTasks::FTask::ExecuteTask() Line 426 C++
UnrealEditor-Core.dll!LowLevelTasks::FScheduler::TryExecuteTaskFrom<&LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue::DequeueGlobal,0>(LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue * Queue, LowLevelTasks::TLocalQueueRegistry<1024>::FOutOfWork & OutOfWork, bool bPermitBackgroundWork, bool bDisableThrottleStealing) Line 280 C++
UnrealEditor-Core.dll!LowLevelTasks::FScheduler::WorkerMain(LowLevelTasks::FSleepEvent * WorkerEvent, LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue * ExternalWorkerLocalQueue, unsigned int WaitCycles, bool bPermitBackgroundWork) Line 320 C++
[Inline Frame] UnrealEditor-Core.dll!LowLevelTasks::FScheduler::CreateWorker::__l2::<lambda_776551d1e343b6cb7eaf0e5521c77c81>::operator()() Line 86 C++
[Inline Frame] UnrealEditor-Core.dll!Invoke(LowLevelTasks::FScheduler::CreateWorker::__l2::<lambda_776551d1e343b6cb7eaf0e5521c77c81> &) Line 47 C++
UnrealEditor-Core.dll!UE::Core::Private::Function::TFunctionRefCaller<<lambda_776551d1e343b6cb7eaf0e5521c77c81>,void __cdecl(void)>::Call(void * Obj) Line 549 C++
[Inline Frame] UnrealEditor-Core.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void __cdecl(void)>::operator()() Line 676 C++
UnrealEditor-Core.dll!FThreadImpl::Run() Line 69 C++
UnrealEditor-Core.dll!FRunnableThreadWin::Run() Line 146 C++
UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() Line 68 C++
[External Code]

All right, after a lot of debugging, the problem was in my code: i need a decal as large as my world (for a world covering grid) and i had always set it to the max authorized float value.
My understanding is that this max float value is greater than the limit set for large worlds in UE5, which was leading to this crash.
So if anyone bumping here is playing with large decals, don’t do this (works in UE4, not in UE5):

//#define MAX_FLOAT TNumericLimits<float>::Max() // crash
#define MAX_FLOAT 10000.f
DecalGridComponent->SetWorldScale3D(FVector(MAX_FLOAT));

Cedric