Packaged .exe does nothing (silent crashes)

I can build and package my project, but when running the executable, nothing happens.
(Win 11, UE 5.5, VS 2022 17.11.5)

Running a “standalone game” or PIE works fine.
When I hit QUICK LAUNCH in the editor, this is the console result: Pasted log text from quick launch. The logs suggest to check Client.log for info, but no Client.log file is written:

The last lines of Log.text are here:
Stack trace log for client exit code 777006 in Log.txt

UAT: Client exited with error code: 777006

I have a working packaged version from a while ago - this problem happened some time after upgrading the project to 5.5, but I’m fairly sure it did build and run fine in 5.5 when I first imported the project. I did see this problem when I tried out 5.4 a while back, but just went back to my 100% working 5.3.2 version at that stage without chasing it up further.

The build and package process seemingly writes out all the correct files.

I loaded up the Build directory in VS and debugged the Faboratory.exe file. These are the results:
Log results from debugging broken packaged .exe file in VS

This problem with error code 777006 appears to have been mentioned only once before: This thread marked as solved - in that case, the OP found some problems with static variables, but didn’t explain how they reached that conclusion. I checked my project and have no uses of “global” and only a handful of static helper functions defined in a .h file (and no static properties). I checked uses of FStreamableManager but found nothing that I could see might cause a problem.

I don’t know how to proceed from here. I’m working on the assumption that my code is at fault, perhaps I’m using an engine native static reference somewhere inappropriately, but I don’t have enough knowledge to know where to continue looking. I spent yesterday interrogating chatgpt to try to coax some pointers out of it, but no success.

The [Solved] thread I linked to above indicates that this is likely a me problem - I can’t find any other sources where this problem has been mentioned. I can’t work out how to make the leap from this error to finding the offending code. It’s more confusing by the fact that I had it working just fine, then one day when I checked again, it wasn’t working. I can’t find anything in my git changes that I could see might affect this. I haven’t yet tried rolling back on git to see if I can narrow it down to some code change.

Thanks in advance for your help!

I ran Repair on the Visual C++ Redistributables and verified the UE 5.5 install: the problem persists.

Next tests:
I am using Dependencies to see if there are any missing dlls.

These files appear to be missing:
ext-ms-win32-subsystem-query-l1-1-0.dll
ext-ms-win-oobe-query-l1-1-0.dll
HvsiFileTrust.dll

Following the logic of the commenter in: this thread on Microsoft.com, I ignored the ext.ms- dlls and just copied one of the HvsiFileTrust.dll files that’s present elsewhere on my system into the Build directory.
Re-running Dependencies shows the same missing dlls, and the program still doesn’t run (same results when debugging in Visual Studio).

That seems like a wild goose chase.

I decided for some unknown reason to use Visual Studio to debug the Build/Windows/Binaries/Win64/Faboratory.exe file instead of the Build/Windows/Faboratory.exe that I had been working with.

Finally - a callstack!

The problem seems to be either in the fact that I have defined a TMap in the MultiplayerTypes.h file:

#pragma once

UENUM(BlueprintType, Meta = (Bitflags, UseEnumValuesAsMaskValuesInEditor = “true”))
enum class EMultiplayerType : uint8
{
EMT_SinglePlayer = 0,
EMT_MultiplayerFriendsOnly = 1,
EMT_MultiplayerPublic = 2
};

ENUM_RANGE_BY_COUNT(EMultiplayerType, EMultiplayerType::EMT_MultiplayerPublic);

namespace MultiplayerType
{
const TMap<EMultiplayerType, FText> MultiplayerTypeTexts
{
{ EMultiplayerType::EMT_SinglePlayer, FText::FromStringTable(“/Game/Assets/Localisation/MenuStrings”, TEXT(“L_SinglePlayerOffline”)) },
{ EMultiplayerType::EMT_MultiplayerFriendsOnly, FText::FromStringTable(“/Game/Assets/Localisation/MenuStrings”, TEXT(“L_MultiplayerFriendsOnly”)) },
{ EMultiplayerType::EMT_MultiplayerPublic, FText::FromStringTable(“/Game/Assets/Localisation/MenuStrings”, TEXT(“L_MultiplayerPublic”)) }
};
}

or in Localization. The MenuStrings table exists at the location referred to in the code, and the Keys are all present. In the meantime, I shall refactor this const TMap out and see if that fixes the problem.

We have lift-off.

I found 2 cases in my code where I had

FText::FromStringTable()

as values in a const TMap defined under an enum declaration in a header file in its own namespace.

I removed these by refactoring - moving the const TMap declaration to the header of a class that’s part of the HUD system was sufficient in my case.

So the key learning points for me (and anyone finding themselves with what looks a silent crash like this):

  1. Debug the .exe that’s within the YourBuildDirectory/Windows/YourProject/Binaries/Win64/ directory. (open the directory in Visual Studio, locate the YourProject.exe file, right click, and debug.
  2. Don’t bother trying to hunt down missing .dlls or following any AI suggestions to inspect dependency loading order, that’s all wild goose chase territory!
  3. Assume first that it’s your own code at fault (I did work from this assumption and it was correct!)
3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.