After updating my project from 5.0.3 to 5.1, the game crashes after a few minutes when played as a standalone program (it does NOT crash if played in-editor). It only seems to happen if I’ve selected the window, if I click onto a different window before it starts then it doesn’t crash until I click back on it. I’ve re-enabled every plugin that I had active before I updated, but that hasn’t solved the issue. I’ve posted the full log below, but this is the error message that appears immediately before it crashes:
[2023.01.29-17.42.21:959][134]LogWindows: Error: appError called: Assertion failed: IntFitsIn<OutType>(In) [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Templates\UnrealTemplate.h] [Line: 183]
Loss of data caused by narrowing conversion
The only thing I know is that something, somewhere is causing data loss because it’s being narrowed to a shorter value. I have a few suspicions (which I’m currently working on testing), but I’m not sure yet if it’s something in my code or something in the engine settings. Has anyone else encountered this problem, and if so, what did you do to fix it?
…
The post-crash log that pops up if it helps
Assertion failed: IntFitsIn(In) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Templates\UnrealTemplate.h] [Line: 183] Loss of data caused by narrowing conversion
UnrealEditor_ApplicationCore!FWindowsApplication::ProcessMessage() [D:\build++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:1900]
UnrealEditor_ApplicationCore!FWindowsApplication::AppWndProc() [D:\build++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:925]
user32
user32
user32
ntdll
win32u
user32
user32
UnrealEditor_ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages() [D:\build++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsPlatformApplicationMisc.cpp:142]
UnrealEditor!FEngineLoop::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5291]
UnrealEditor!GuardedMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:202]
UnrealEditor!GuardedMainWrapper() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:107]
UnrealEditor!LaunchWindowsStartup() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:244]
UnrealEditor!WinMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:282]
UnrealEditor!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll
…
The full log from the time the build starts (was too long to post here directly). There are a few warnings that pop up, but I don’t think those are the issue (other people have reported them but I haven’t read that they’re causing crashes).