Trouble with data table, makes unreal editor unable to load (stuck on loading project)

Hello!

I’ve encountered this problem while developing some inventory functionality on my game, I’ve created a data table where I store my items information and if it requires an animation blueprint when used.

When I fill the data table with UE editor and I set all the values I need everything works just fine, code do what it’s supposed to and all, problem comes when I close and try to run again the UE editor it won’t load until I delete the data table asset from the files on my project, then it loads.

I tried to debug loading with the option -LOG but it won’t show any error whatsoever, just gets stuck at 75% .

Any help would be really appreciated it, I can share some info now:

Data Table structure (C++)

USTRUCT(BlueprintType)
struct FEscapeGameDTItems : public FTableRowBase
{
GENERATED_BODY()

public:

UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FText ObjectID;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FText UseActionText;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FText ItemType;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
	class UTexture2D* Thumbnail;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FText ItemDisplayName;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (MultiLine = true))
	FText ItemDescription;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float Weight;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float HealthToHeal;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float HealthRate;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float StaminaToHeal;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float StaminaRate;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float BleedingToHeal;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float BleedingRate;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float HeartRateToHeal;

UPROPERTY(EditAnywhere, BlueprintReadWrite,meta = (ClampMin = 0.0))
	float HeartRateRate;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float SanityToHeal;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	float SanityRate;

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = 0.0))
	bool HasBeenUsedByPlayer;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UAnimBlueprintGeneratedClass* AnimationAssetReference;

};

Last lines of code from LOG

[2022.03.13-22.18.04:215][ 0]LogHMD: PokeAHoleMaterial loaded successfully
[2022.03.13-22.18.04:220][ 0]LogUObjectArray: 17178 objects as part of root set at end of initial load.
[2022.03.13-22.18.04:220][ 0]LogUObjectAllocator: 4302048 out of 0 bytes used by permanent object pool.
[2022.03.13-22.18.04:220][ 0]LogUObjectArray: CloseDisregardForGC: 0/0 objects in disregard for GC pool
[2022.03.13-22.18.04:498][ 0]LogNiagaraDebuggerClient: Niagara Debugger Client Initialized | Session: F71B28A54713C82CCB6B27B971986A63 | Instance: 7ED6308F454703EF3EDD1FA325A6A12B (MAXPC-9724).
[2022.03.13-22.18.04:531][ 0]LogTcpMessaging: Initializing TcpMessaging bridge
[2022.03.13-22.18.04:535][ 0]LogUdpMessaging: Initializing bridge on interface 0.0.0.0:0 to multicast group 230.0.0.1:6666.
[2022.03.13-22.18.04:548][ 0]LogPython: Using Python 3.7.7

Here is when it gets stuck

But if I delete the file:

image

image

I click OK and editor loads, problem is I lose the file, even if I recreate it the problem still occurs everytime I close and open the editor

Just a Quick update: I upgraded my project to UE5 and the problem remains, however, I decided to remove the “UAnimBlueprintGeneratedClass” variable from my data table since before that everything was working fine and try to make the functionality work on blueprints.

I ran the LOG again just to see what followed the last line (“LogPython: Using Python 3.7.7”) and I found something interesting, after that line UE loaded my data table like so:

[2022.03.14-21.04.31:017][ 0]LogPython: Using Python 3.9.7
[2022.03.14-21.04.31:664][ 0]LogTemp: Warning: Data base loaded succesfully
[2022.03.14-21.04.31:865][ 0]SourceControl: Source control is disabled
[2022.03.14-21.04.31:912][ 0]SourceControl: Source control is disabled
[2022.03.14-21.04.31:921][ 0]SourceControl: Source control is disabled
[2022.03.14-21.04.31:943][ 0]LogUProjectInfo: Found projects:

and some warnings also below that

[2022.03.14-21.04.32:409][ 0]LogClass: Warning: ObjectProperty FEscapeGameDTItems::Thumbnail is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:409][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::Weight is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:410][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::HealthToHeal is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:410][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::HealthRate is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:410][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::StaminaToHeal is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:410][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::StaminaRate is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:411][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::BleedingToHeal is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:411][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::BleedingRate is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:411][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::HeartRateToHeal is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:411][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::HeartRateRate is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:411][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::SanityToHeal is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:411][ 0]LogClass: Display: FloatProperty FEscapeGameDTItems::SanityRate is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:412][ 0]LogClass: Display: BoolProperty FEscapeGameDTItems::HasBeenUsedByPlayer is not initialized properly. Module:EscapeGame File:MainCharacter.h
[2022.03.14-21.04.32:412][ 0]LogClass: Display: 13 Uninitialized script struct members found including 1 object properties
[2022.03.14-21.04.32:414][ 0]LogAutomationTest: Warning: ObjectProperty FEscapeGameDTItems::Thumbnail is not initialized properly. Module:EscapeGame File:MainCharacter.h

Could it be that because I’m not initializing my anim variable properly (and the others also) is why is getting stuck on loading?

Also…I don’t know how to initialize them properly, I created a constructor within the data table and I still get the same error:

FEscapeGameDTItems()
{
ObjectID = FText::FromString(TEXT(""));
UseActionText = FText::FromString(TEXT(""));
ItemType = FText::FromString(TEXT(""));
ItemDisplayName = FText::FromString(TEXT(""));
ItemDescription = FText::FromString(TEXT(""));
Weight = 0;
HealthToHeal = 0;
HealthRate = 0;
StaminaToHeal = 0;
StaminaRate = 0;
BleedingToHeal = 0;
BleedingRate = 0;
HeartRateToHeal = 0;
HeartRateRate = 0;
SanityToHeal = 0;
SanityRate = 0;
HasBeenUsedByPlayer = false;
}

And here is the code I use to load the data base (on my character constructor)

// load the database
static ConstructorHelpers::FObjectFinder ItemDataBaseLoad(TEXT(“DataTable’/Game/blueprints/Items/Datatable/DT_EscapeGameItemsDB.DT_EscapeGameItemsDB’”));
if(ItemDataBaseLoad.Succeeded())
{
ItemDataBase = ItemDataBaseLoad.Object;
UE_LOG(LogTemp, Warning, TEXT(“Data base loaded succesfully”));
}
else
{
UE_LOG(LogTemp, Warning, TEXT(“Error loading database”));
}

I set the data table outside C++ code on my character properties

image

Thank you!

Hi.

I solved this problem, my steps where as follow:

  1. Deleted the previous data table.
  2. I removed from the constructor the FObjectFinder code, since the data table was assigned outside C++ I didn’t have the need to search and load it in code. Just have a validation before using it in code.
  3. Rebuilt the solution, the warnings about bad initialization where gone.
  4. In UE editor I created again the data table from the new asset, checking that it was the right and updated struct.
  5. Connected all the logic, worked, saved and loads with no problem.

That really threw me off, I’m still learning UE :slight_smile: if it can help someone in the future, there it is.

Thank you!

i had this same problem that bogged me down for near a week, my solution was to encase the FObjectFinder call in a “if(GetWorld())” block.

it seems to be something to do with when that constructor is called by blueprints or constructors of other classes occurring before the asset manager has compiled the asset references.

or something. idk.

2 Likes

You saved my life my man. I have a hand in today for my project lol.

1 Like

update on this for me:

so i found out my problem was that i was putting references to objects and actors that needed to be constructed or spawned in-world into a data table. this doesn’t apply for some things like static/skeletal meshes and materials, but it does seem to for most blueprint classes. im sure this makes sense somewhere in the backend (a flag or something component related? idk) but i’m juggling way too many things to figure it out right now. if i ever do get around to it i’ll swoop in with a better answer.

1 Like