Hi Epic Games,
I’m writing in to report a bug that was driving me crazy after I updated from UE 4.13.2 to UE 4.17.2. I consider this bug extra nasty because the exact same source code works without any assertions or crashes on Windows and iOS, but freezes on Android.
Inside the constructor of my game mode, I’m using
ConstructorHelpers::FClassFinder<AMeshActor> Type
to get a pointer to the class of a data only blueprint which the game mode will spawn later on. I’m initializing the TSubclassOf inside the constructor to set a default value which I can then override in the level editor.
When executing the FClassFinder, it will also execute the constructor of the base type from which the data only blueprint is derived. Inside that constructor, I use an
ConstructorHelpers::FObjectFinderOptional<UMaterialInstance> MaterialActive;
MaterialActive(TEXT("/Game/M_Gem_Red_A.M_Gem_Red_A"))
for getting a material instance which I then store in a property:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
class UMaterialInstance* MaterialDefault;
using
MaterialDefault = ConstructorStatics.MaterialActive.Get();
and that causes my game to freeze at the splash screen on android.
The exact same source code compiles and works just fine on Windows and iOS, so this bug seems to be specific to Android. Also, it appears that the same source code worked with 4.13.2 on Android.
Cheers,