I’m using ensure() to check for a valid pointer like so:
if ( !ensure(MyPointer) ) return;
After a compilation, and then using Play In Editor, the log spits out a bunch of red lines with:
LogOutputDevice: Error: === Handled ensure: ===
LogOutputDevice: Error: Ensure condition failed: MyPointer [File:C:\projects\Unreal Projects\MyProject\Source\Proj\Private\MyClass.cpp] [Line: 63]
LogOutputDevice: Error: Stack:
LogOutputDevice: Error: [Callstack] 0x000007fee96f71f6 UE4Editor-Core.dll!FWindowsPlatformStackWalk::StackWalkAndDump() [d:\build++ue4\sync\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:236]
…
…
…
LogOutputDevice: Error: [Callstack] 0x000000013f3a5cbd UE4Editor.exe!FEngineLoop::Tick() [d:\build++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3495]
LogOutputDevice: Error: [Callstack] 0x000000013f3b5b3c UE4Editor.exe!GuardedMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\launch.cpp:166]
LogOutputDevice: Error: [Callstack] 0x000000013f3b5bba UE4Editor.exe!GuardedMainWrapper() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:144]
LogOutputDevice: Error: [Callstack] 0x000000013f3c3dac UE4Editor.exe!WinMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:223]
LogOutputDevice: Error: [Callstack] 0x000000013f3c5aaa UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
LogOutputDevice: Error: [Callstack] 0x0000000076f2652d kernel32.dll!UnknownFunction ]
LogOutputDevice: Error: [Callstack] 0x000000007705c541 ntdll.dll!UnknownFunction ]
Thereafter, the ensure does not trigger any more, even after stopping and starting again in the PIE until the next compilation or restarting the Editor.
What’s going on here, and how can I fix this so that my ensure works again?