Crash on commandlet denitnialization after migration to UE 5.5.4

I have a crash (Win64) on commandlet deinitialization after migration from 5.3.2 to 5.5.4.

Crash is somewhere in the renderer deinit (part of the callstack is bellow:)

ntdll.dll!RtlpWaitOnCriticalSection() ntdll.dll!RtlpEnterCriticalSectionContended() ntdll.dll!RtlEnterCriticalSection() Win64-DebugGame.exe!GPUMessage::FSocket::Reset(void) Win64-DebugGame.exe!Nanite::FGlobalResources::ReleaseRHI(void) Win64-DebugGame.exe!FRenderResource::ReleaseResource(void) Win64-DebugGame.exe!FVirtualTargetParameters::FTypeInfo::GetStructMetadata(void)‘::2'::dynamic atexit destructor for ‘StaticStructMetadata’’(void)
ucrtbase.dll!(void)()
ucrtbase.dll!__crt_seh_guarded_call::operator()<…>()
ucrtbase.dll!_execute_onexit_table()
ucrtbase.dll!(void)()
ucrtbase.dll!__crt_seh_guarded_call::operator()<…>()
ucrtbase.dll!common_exit()
Win64-DebugGame.exe!__scrt_common_main_seh()
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()`

The issue is easily reproducible even with a blank project and a blank commandlet (simply add a dummy commandlet to the project and try to run/debug it using the -run option in DebugGame mode ).

So, just build it and try to run/debug and you will have a crash:

0xC0000005: Access violation writing location 0x0000000000000024.

At the same time, the application itself works fine in all modes.

Has anyone else encountered this problem?

Hi,

Thank you for providing sample project files to assist in the investigation. Unfortunately I was unable to reproduce the issue you report, the following steps were performed.

  1. Extract the files from the provided project zip file
  2. Open the project in UE_5.5.4
  3. Package a project for the Windows platform using the DebugGame configuration
  4. Run the commandlet using the following command ‘<Packaged_Game_Location>\SampleApp.exe -run=HelloWorld’

Following is a screen capture of the steps and of the results

[Image Removed]

Are you able to share the terminal command that you are using to execute the commandlet and/or some detailed steps to reproduce the results that you are experiencing.

Best of Luck,

Hi,

Thank you for the detailed steps to reproduce. I have submitted a bug report to Epic using the information that you have provided, you can track the progress at this link when it becomes publicly available.

In the meantime a 0 exit status can be obtained by setting the following flags in the constructor of the commandlet to prevent the process waiting for the engine to exit before resolving:

FastExit = true; UseCommandletResultAsExitCode = true; // OptionalThis approach is also used by the WorldPartitionConvertCommandlet.cpp to mitigate a similar situation.

Kind Regards

Hi!

Thank you for reaching out to help me with this problem.

The issue is that the app crashes during deinitialization, so nothing appears in the log file(but app shutdowns with delay even in yuor case, due to the Windows Error Reporting and you can see WER interraction in the Process Monitor for example).

[Image Removed]

If you have Visual Studio, the easiest way to reproduce the problem is to run the app with the debugger.

Alternatively, we can track the exit code of the app. Under normal conditions, the exit code should be 0; however, in the event of a crash, it will be non-zero.

To run this, use the following PowerShell snippet (adjust the exePath as needed and paste it into the PowerShell console):

`# Define the path to the Unreal application executable (Put your path here).
$exePath = “.\Windows\SampleApp\Binaries\Win64\SampleApp-Win64-DebugGame.exe”

Set the command-line arguments for the executable.

$arguments = “-run=HelloWorld”

Launch the process with the specified executable and arguments.

- Waits for the process to complete.

- -PassThru returns a process object containing information (including the exit code).

$process = Start-Process -FilePath $exePath -ArgumentList $arguments -Wait -PassThru

Output the exit code of the process to the console.

Write-Host “Process Exit Code: $($process.ExitCode)”`In my case, the output is:

Process Exit Code: -1073741819

Thanks,

Serhii