Editor Crash 'Ensure Condition Failed' GenericPlatformMath.cpp - What does this mean?

Each time I open the editor I get this error from the output log. If I attempt to open a specific map, the editor will crash and this same error log will appear at the bottom of the crash log file. I’ve verified the engine and tried opening older versions of the map, but can’t figure out what this means and how to fix it. Can anyone help?

Thanks,
Svr33

LogOutputDevice: Error: === Handled ensure: ===
LogOutputDevice: Error: Ensure condition failed: Y != 0 [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformMath.cpp] [Line: 105]
LogOutputDevice: Error: FMath::FMod(X=0.000000, Y=0.000000) : Y is zero, this is invalid and would result in NaN!
LogOutputDevice: Error: Stack: 
LogOutputDevice: Error: [Callstack] 0x00007ffdd6b49513 UE4Editor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdd643a255 UE4Editor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdaf6f2582 UE4Editor-Engine.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdaf6f205e UE4Editor-Engine.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdaf76cc56 UE4Editor-Engine.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdaf6e011f UE4Editor-Engine.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdaf730abb UE4Editor-Engine.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdad59322f UE4Editor-Renderer.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdad588045 UE4Editor-Renderer.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdad58842f UE4Editor-Renderer.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdad656e2c UE4Editor-Renderer.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdaf0a230e UE4Editor-Engine.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdd6409ff2 UE4Editor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdd640a393 UE4Editor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdf8b35391 UE4Editor-RenderCore.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdf8b3e254 UE4Editor-RenderCore.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdd68832ef UE4Editor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffdd6882f94 UE4Editor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffe22487bd4 KERNEL32.DLL!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffe23f2ced1 ntdll.dll!UnknownFunction []
1 Like

can you download editor debug symbols (installation options) and cause crash and post call stack again? so we know where crash actually happens, might hint something. This is either a bug or level asset corruption

1 Like

Thanks , I added the new crash log (created when opening the editor). It references d:\build++ue4\ folder which is confusing to me… there’s no such folder and that’s a drive I only use to save my packaged game, UE4 is installed on the C: drive.

1 Like

It seems the crash log I pasted in got taken down? Here’s the text version.

link text

1 Like

Additionally, the crash reporter is not appearing when the game crashes and doesn’t seem to generate a crash log file except when I open the engine.

1 Like

LogStats: === Handled ensure: ===
LogOutputDevice: Error: SubmitErrorReport - 0.000 s
LogOutputDevice: Error: orReport - 0.000 s
LogOutputDevice: Error: rReport - 0.000 s
LogOutputDevice: Error: FMath::FMod(X=0.000000, Y=0.000000) : Y is zero, this is invalid and would result in NaN!
LogOutputDevice: Error: Stack:
LogOutputDevice: Error: [Callstack] 0x00007ffdd1d69513 UE4Editor-Core.dll!DispatchCheckVerify >() [d:\build++ue4\sync\engine\source\runtime\core\public\misc\assertionmacros.h:167]
LogOutputDevice: Error: [Callstack] 0x00007ffdd165a255 UE4Editor-Core.dll!FGenericPlatformMath::Fmod() [d:\build++ue4\sync\engine\source\runtime\core\private\genericplatform\genericplatformmath.cpp:82]
LogOutputDevice: Error: [Callstack] 0x00007ffda39d2582 UE4Editor-Engine.dll!FMaterialUniformExpressionFmod::GetNumberValue() [d:\build++ue4\sync\engine\source\runtime\engine\private\materials\materialuniformexpressions.h:1541]
LogOutputDevice: Error: [Callstack] 0x00007ffda39d205e UE4Editor-Engine.dll!FMaterialUniformExpressionAppendVector::GetNumberValue() [d:\build++ue4\sync\engine\source\runtime\engine\private\materials\materialuniformexpressions.h:926]
LogOutputDevice: Error: [Callstack] 0x00007ffda3a4cc56 UE4Editor-Engine.dll!FUniformExpressionSet::FillUniformBuffer() [d:\build++ue4\sync\engine\source\runtime\engine\private\materials\materialuniformexpressions.cpp:538]
LogOutputDevice: Error: [Callstack] 0x00007ffda39c011f UE4Editor-Engine.dll!FMaterialRenderProxy::EvaluateUniformExpressions() [d:\build++ue4\sync\engine\source\runtime\engine\private\materials\materialshared.cpp:2423]
LogOutputDevice: Error: [Callstack] 0x00007ffda3a10abb UE4Editor-

1 Like

No it just got auto moderated, it’s normal if you paste the logs as system thinks it’s spam, it’s main reason why i find you question in first place

1 Like

The issue seems to be in materials, crashs happens when renderer tries to set parameters for shader for material instance. Did you do something out of place with materials? When it is started?

Only way to save map is try to replace materials assets. I would also report bug anyway as in general this should not happen, they probably ask you to send project too for analyzes as its asset related it seems

1 Like

Ensure conditions have been crashing for me as well. This isn’t always the case.
The crash log points exactly to the line the ensure condition fails.

So… it’s 6 years later and I’m still dealing with this error. :slight_smile:

I’ve spent a lot of time lately trying to finally resolve it, since it creates so many editor crashes that it significantly slows down development. “FMod Y is zero” lead me to believe there was a material or function in my project that allowed a 0 to exist in the B input of the FMOD material expression but after removing every instance of the FMOD node from the project, clearing cache, rebuilding, recompiling, the error still occurs. I’m confident the crash has nothing to do with any of the materials or material functions in my project.

In my situation, even though it’s only an ensure, it seemingly hits every frame and causes the editor to hang and then crash. It happens seemingly randomly, working on all different parts of the game - different levels, characters, etc.

My only conclusion is that some sort of slate or ui editor element is causing the divide by zero but I’m not sure where to go next. I’m using a launcher build of 4.27.

Any help is appreciated!

LogOutputDevice: Error: === Handled ensure: ===
LogOutputDevice: Error: Ensure condition failed: Y != 0 [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformMath.cpp] [Line: 108]
LogOutputDevice: Error: FMath::FMod(X=0.000000, Y=0.000000) : Y is zero, this is invalid and would result in NaN!
LogOutputDevice: Error: Stack: 
LogOutputDevice: Error: [Callstack] 0x00007ffe4af43e08 UE4Editor-Core.dll!DispatchCheckVerify<bool,<lambda_b29f26d345353c81adef58105f028bdf> >() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Misc\AssertionMacros.h:164]
LogOutputDevice: Error: [Callstack] 0x00007ffe4a6f5a79 UE4Editor-Core.dll!FGenericPlatformMath::Fmod() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMath.cpp:83]
LogOutputDevice: Error: [Callstack] 0x00007ffe40e96257 UE4Editor-Engine.dll!EvaluateBinaryOp<<lambda_59357ac74c81c0ee9ba9808a1e9ba369> >() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialUniformExpressions.cpp:727]
LogOutputDevice: Error: [Callstack] 0x00007ffe40ec7c6d UE4Editor-Engine.dll!EvaluatePreshader() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialUniformExpressions.cpp:978]
LogOutputDevice: Error: [Callstack] 0x00007ffe40ecd0f8 UE4Editor-Engine.dll!FUniformExpressionSet::FillUniformBuffer() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialUniformExpressions.cpp:1194]
LogOutputDevice: Error: [Callstack] 0x00007ffe40e4b58d UE4Editor-Engine.dll!FMaterialRenderProxy::EvaluateUniformExpressions() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialShared.cpp:2958]
LogOutputDevice: Error: [Callstack] 0x00007ffe40e88eeb UE4Editor-Engine.dll!FMaterialRenderProxy::UpdateDeferredCachedUniformExpressions() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialShared.cpp:3205]
LogOutputDevice: Error: [Callstack] 0x00007ffe2727f2db UE4Editor-SlateRHIRenderer.dll!FSlateRHIRenderer::DrawWindow_RenderThread() [D:\Build\++UE4\Sync\Engine\Source\Runtime\SlateRHIRenderer\Private\SlateRHIRenderer.cpp:708]
LogOutputDevice: Error: [Callstack] 0x00007ffe2727785a UE4Editor-SlateRHIRenderer.dll!TEnqueueUniqueRenderCommandType<`FSlateRHIRenderer::DrawWindows_Private'::`39'::SlateDrawWindowsCommandName,<lambda_f9feabdceba9d88a5c7b2ca3d59100d9> >::DoTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\RenderCore\Public\RenderingThread.h:183]
LogOutputDevice: Error: [Callstack] 0x00007ffe2728c2ca UE4Editor-SlateRHIRenderer.dll!TGraphTask<TEnqueueUniqueRenderCommandType<`FSlateRHIRenderer::DrawWindows_Private'::`39'::SlateDrawWindowsCommandName,<lambda_f9feabdceba9d88a5c7b2ca3d59100d9> > >::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
LogOutputDevice: Error: [Callstack] 0x00007ffe4a6b2398 UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:710]
LogOutputDevice: Error: [Callstack] 0x00007ffe4a6b27ce UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:602]
LogOutputDevice: Error: [Callstack] 0x00007ffeec879c67 UE4Editor-RenderCore.dll!RenderingThreadMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:373]
LogOutputDevice: Error: [Callstack] 0x00007ffeec882f34 UE4Editor-RenderCore.dll!FRenderingThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:509]
LogOutputDevice: Error: [Callstack] 0x00007ffe4ac4ff0b UE4Editor-Core.dll!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
LogOutputDevice: Error: [Callstack] 0x00007ffe4ac47050 UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:35]
LogOutputDevice: Error: [Callstack] 0x00007fff1a85e8d7 KERNEL32.DLL!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007fff1c32c40c ntdll.dll!UnknownFunction []