Description

POST LINK: https://forums.unrealengine.com/t/tmap-where-key-is-an-fstring-initializer-list-will-accept-bad-maketuple/2747443

POST BODY:

  • Summary

A TMap where the key is an FString can be created like so:

```
TMap MyMap =

{ MakeTuple(TEXT("A"), 0) };
```

This will compile fine. During runtime when the code executes the program will crash.

If you mouse over MakeTuple it is creating a TTuple.

Issue can be solved by changing the code to:

```
TMap MyMap = { MakeTuple(FString(TEXT("A")), 0) };
```

* What Type of Bug are you experiencing?

Other

* Steps to Reproduce

1. create a new project

2. open project in visual studio. In any of the project's .cpp files in global scope declare:

```
static TMap M = { MakeTuple(TEXT("A"), 0) }

;
```

3. close unreal engine

4. compile your code

5. launch the project. The project's module will fail to load. The error message you receive will be: "The game module 'MyProject570' could not be loaded. There may be an operating system error, the module may not be properly set up, or a plugin which has been included into the build has not been turned on."

  • Expected Result

Compile-time error. If that isn't possible then a check being hit would be helpful.

  • Observed Result

Project module fails to load. Unhelpful error message is shown. Logs are of no help.

  • Affects Versions

5.7

  • Platform(s)

Windows

  • Additional Notes

Tested in 5.7. I did not try 5.8.

Happens whether FString is key or value.

Causes crashes anytime the code is executed. I chose static variable initialization time because that is the most difficult to debug, to show a case that could cause some engine users to lose a lot of time trying to debug.

It would be a good idea to update that error message so that it asks users to check static variable initialization for any errors.

POST AUTHOR: Fresh_mutroom
CREATED AT: 08/30/2026 06:31 PM EDT
UPDATED AT: 09/02/2026 10:33 AM EDT

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-394884 in the post.

0
Login to Vote

Fixed
Fix Commit57675625
CreatedSep 2, 2026
ResolvedSep 2, 2026
UpdatedSep 2, 2026
View Jira Issue