This is a deadlock caused by re-entry of the constructor which is initialising the static. The native AMyGameMode class load the character blueprint which has the same native AMyGameMode class as its export so AMyGameMode's CDO needs to be constructed on load which leads to a dead-lock caused by internal C++ guard on static local variables.
There's no way around it in UE4. The native AMyGameMode class load the character blueprint which has the same native AMyGameMode class as its export so AMyGameMode's CDO needs to be constructed on load which leads to a dead-lock caused by internal C++ guard on static local variables.
When a GameMode class defines the default pawn class as a character blueprint, and the character blueprint contains a cast node to a blueprint based on the GameMode class, the project will freeze between 70%-73% on load. This occurs even if the cast node is not connected to any execution path.
This is inconsistent with using a cast node to the GameMode class directly which will load fully and launch the editor.
Result:
Project gets to 71% - 73% and then stops loading. UE4Editor must be closed from Task Manager
Expected:
Project loads and editor opens
Head over to the existing Questions & Answers thread and let us know what's up.
3 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.13.2, 4.14 |
Target Fix | 4.16 |
Created | Oct 27, 2016 |
---|---|
Resolved | Apr 12, 2017 |
Updated | Apr 27, 2018 |