Description

Using the NSLOCTEXT macro with the third string literal as an empty string causes a packaged game to immediately crash on launch. No Crash Reporter window opens, and no log is created.

A sample project (created in Main CL 4329255) is attached.

Steps to Reproduce
  1. Create a new Basic Code project.
  2. In the provided GameModeBase.h file, add a static FText variable to the class.
  3. In the provided GameModeBase.cpp file, add a #define LOCTEXT_NAMESPACE instruction and use the NSLOCTEXT macro to set a value for the FText variable from the previous step. Make sure the third string literal in the NSLOCTEXT macro is an emptry string (ie. "").
  4. Build the project in Visual Studio.
  5. Open the project in the Editor.
  6. Package the project for Development Win64.
  7. Run the packaged project.

RESULT:
The packaged project immediately crashes on launch. No Crash Reporter window appears, and no log is created.

EXPECTED:
There is either a compile error when the third string literal in the NSCLOCTEXT macro is an empty string, or the packaged project runs successfully.

WORKAROUND:
Make sure the third string literal in the NSLOCTEXT macro is not an empty string. Any single character (except for a NUL character) in the third string literal will allow the packaged project to launch successfully.

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Editor - UI Systems - Localization
Affects Versions4.19.24.20.24.21
Target Fix4.21
Fix Commit4334500
Main Commit4342443
Release Commit4399518
CreatedAug 30, 2018
ResolvedAug 31, 2018
UpdatedOct 2, 2018