Memory exception when building Unreal Engine 5.1.1 project on Windows/Linux

I’m working on a project in Unreal Engine 5.1.1 with the Unreal.js plugin, which builds fine without errors in earlier versions like 5.0.3. However, after migrating the project to 5.1.1 it throws an EXCEPTION_ACCESS_VIOLATION exception, preventing the game from being exported. This error can be reproduced by just trying to export a sample UE5.1.1 project with the Unreal.js plugin enabled.

I have tried to make the build with different versions of Visual Studio, project settings configurations, and Microsoft Desktop support versions, among other options. Even when exporting as a Linux version, it fails in the same manner.

The following is an extract of the output log after trying to build the project:

LogAudioDebug: Display: Lib vorbis DLL was dynamically loaded.
LogDerivedDataCache: Display: ../../../Engine/DerivedDataCache/Compressed.ddp: Opened pak cache for reading. (1363 MiB)
LogDerivedDataCache: Display: Performance to C:/Users/danie/AppData/Local/UnrealEngine/Common/DerivedDataCache: Latency=0.03ms. RandomReadSpeed=1617.41MBs, RandomWriteSpeed=137.42MBs. Assigned SpeedClass 'Local'
LogVirtualization: Display: VirtualizationSystem name found in ini file: None
LogVirtualization: Display: FNullVirtualizationSystem mounted, virtualization will be disabled
LogShaderCompilers: Display: Using Local Shader Compiler with 21 workers.
LogShaderCompilers: Display: Compiling shader autogen file: C:/Users/danie/Desktop/BigFootsProject/Intermediate/ShaderAutogen/PCD3D_SM5/AutogenShaderHeaders.ush
LogShaderCompilers: Display: Autogen file is unchanged, skipping write.
LogEditorDomain: Display: EditorDomain is Disabled
LogCsvProfiler: Display: Metadata set : deviceprofile="WindowsEditor"
LogShaderCompilers: Display: Compiling shader autogen file: C:/Users/danie/Desktop/BigFootsProject/Intermediate/ShaderAutogen/VULKAN_SM5/AutogenShaderHeaders.ush
LogShaderCompilers: Display: Autogen file is unchanged, skipping write.
LogShaderCompilers: Display: Compiling shader autogen file: C:/Users/danie/Desktop/BigFootsProject/Intermediate/ShaderAutogen/PCD3D_ES3_1/AutogenShaderHeaders.ush
LogShaderCompilers: Display: Autogen file is unchanged, skipping write.
LogAudio: Display: Registering Engine Module Parameter Interfaces...
LogAudioCaptureCore: Display: No Audio Capture implementations found. Audio input will be silent.
LogAudioCaptureCore: Display: No Audio Capture implementations found. Audio input will be silent.
LogCsvProfiler: Display: Metadata set : largeworldcoordinates="1"
LogEditorDomain: Display: Class /Script/AnimationData.AnimationSequencerDataModel is imported by a package but does not exist in memory. EditorDomain keys for packages using it will be invalid if it still exists.
	To clear this message, resave packages that use the deleted class, or load its module earlier than the packages that use it are referenced.
LogWindows: Error: begin: stack for UAT
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Fatal error!
LogWindows: Error:
LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000040
LogWindows: Error:
LogWindows: Error: [Callstack] 0x00007ff8779729e5 UnrealEditor-JavascriptConsole.dll!FJavascriptCommandExecutor::CacheJavascriptContext() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\UnrealJS\Source\JavascriptConsole\Private\JavascriptCommandExecutor.cpp:115]
LogWindows: Error: [Callstack] 0x00007ff87797193f UnrealEditor-JavascriptConsole.dll!FJavascriptCommandExecutor::FJavascriptCommandExecutor() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\UnrealJS\Source\JavascriptConsole\Private\JavascriptCommandExecutor.cpp:15]
LogWindows: Error: [Callstack] 0x00007ff8779718c0 UnrealEditor-JavascriptConsole.dll!SharedPointerInternals::NewIntrusiveReferenceController<1,FJavascriptCommandExecutor>() [D:\RocketSync\5.1.0-23058290+++UE5+Release-5.1\Working\Engine\Source\Runtime\Core\Public\Templates\SharedPointerInternals.h:445]
LogWindows: Error: [Callstack] 0x00007ff87797445a UnrealEditor-JavascriptConsole.dll!FJavascriptConsoleModule::StartupModule() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\UnrealJS\Source\JavascriptConsole\Private\JavascriptConsoleModule.cpp:15]
LogWindows: Error: [Callstack] 0x00007ff8b4e4e23e UnrealEditor-Core.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff8f8d0d434 UnrealEditor-Projects.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff8f8d233e4 UnrealEditor-Projects.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff8f8d0d17f UnrealEditor-Projects.dll!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7afc8ac15 UnrealEditor-Cmd.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7afc82688 UnrealEditor-Cmd.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7afc8296a UnrealEditor-Cmd.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7afc85680 UnrealEditor-Cmd.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7afc971b4 UnrealEditor-Cmd.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7afc996f2 UnrealEditor-Cmd.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff9243b7614 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff9245226a1 ntdll.dll!UnknownFunction []
LogWindows: Error:
LogWindows: Error: end: stack for UAT
Took 9.6905192s to run UnrealEditor-Cmd.exe, ExitCode=3
SafeDeleteFile C:\Users\danie\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UE_5.1\Cook-2023.05.11-19.16.17.txt
SafeCopyFile D:\UE_5.1\Engine\Programs\AutomationTool\Saved\Cook-2023.05.11-19.16.07.txt C:\Users\danie\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UE_5.1\Cook-2023.05.11-19.16.17.txt
SafeDeleteFile D:\UE_5.1\Engine\Programs\AutomationTool\Saved\Cook-2023.05.11-19.16.07.txt
==============================================================================
ERROR: Cook failed.
       (see C:\Users\danie\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UE_5.1\Log.txt for full exception trace)

CommandletException: Editor terminated with exit code 3 while running Cook for C:\Users\danie\Desktop\BigFootsProject\BigFootsProject.uproject; see log C:\Users\danie\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UE_5.1\Cook-2023.05.11-19.16.17.txt
   at AutomationTool.CommandUtils.FinishRunCommandlet(FileReference ProjectName, String Commandlet, DateTime StartTime, IProcessResult RunResult, String LocalLogFile, String& DestLogFile, Int32 ErrorLevel) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 441
   at AutomationTool.CommandUtils.CookCommandlet(FileReference ProjectName, String UnrealExe, String[] Maps, String[] Dirs, String InternationalizationPreset, String[] CulturesToCook, String TargetPlatform, String Parameters) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 90
   at AutomationScripts.Project.Cook(ProjectParams Params) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\CookCommand.Automation.cs:line 291Wrapped by AutomationException: Cook failed.
   at AutomationScripts.Project.Cook(ProjectParams Params) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\CookCommand.Automation.cs:line 301
   at BuildCookRun.DoBuildCookRun(ProjectParams Params) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 221
   at BuildCookRun.ExecuteBuild() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 42
   at AutomationTool.BuildCommand.Execute() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 344
   at AutomationTool.BuildCommand.ExecuteAsync() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 353
   at AutomationTool.Automation.ExecuteAsync(List`1 CommandsToExecute, Dictionary`2 Commands) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 257
   at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 156
==============================================================================
AutomationTool executed for 0h 0m 59s
AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

1 Like