Description

When GEngine is used in a constructor before calling a ConstructorHelper function, the packaged game will crash on open with an assertion about recursion (see screenshot)

Steps to Reproduce
  1. Open UE4Editor (Any project)
  2. Right click in the content browser to create a new material
  3. Right click new material and select "Copy Reference"
  4. Add code to project based on actor (MyActor)
  5. Add the following to MyActor.h
    TSubclassOf<UMaterial> MyMat;
    
  6. Add the following to MyActor.cpp constructor
    if (GEngine)
    {
    	static ConstructorHelpers::FClassFinder<class UMaterial> TestMat(TEXT("[/*Paste Copied Reference Here*/"));
    }
  7. Compile
  8. File->Package Project->Windows->Win64
  9. Open packaged .exe file

Result:
Package crashes with attached screenshot message

Expected:
Packaged project run after checking GEngine/ConstructorHelper

Have Comments or More Details?

Head over to the existingAnswerHub thread and let us know what's up.

2
Login to Vote

Fixed
ComponentCore - UObject
Affects Versions4.16.1
Target Fix4.17
Fix Commit3524289
Main Commit3555226
Release Commit3524289
CreatedJun 28, 2017
ResolvedJul 6, 2017
UpdatedApr 27, 2018