Description

Report of a chain of dependencies that can lead to a fatal loader stall in a nativized build:

  1. Thing -> BPStruct2
  2. BPStruct1 -> BPStruct2

The necessary order of operations is:

  1. BPStruct1 loads
  2. BPStruct2 loads
  3. BPStruct1 calls static constructor which calls constructor for BPStruct1 (before BPStruct1 has chance to call its static constructor)
  4. BPStruct2 calls static constructor and fails to register as fully loaded, even though it is.
  5. Thing tries to load and puts a loader node dependency on BPStruct2, which never is satisfied because BPStruct2 is done already.

User-suggested fix (for review):

Change the nativized code gen for the static script constructor from checking whether the object already exists via

  if (!Singleton)
  {

to using a static bool check instead

  static bool bWasRegisteredEver = false;
   if (!bWasRegisteredEver)
   {
         bWasRegisteredEver = true;

Have Comments or More Details?

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

1
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint Runtime
Affects Versions4.18
CreatedMar 7, 2018
ResolvedJul 15, 2021
UpdatedJul 19, 2021
View Jira Issue