Can not derivate from struct FTableRowBase

,Hi

I want to data from .csv files. After implementing the example given here the module crashes on editor startup.

The call stack:

 	KernelBase.dll!00007ff8c7459e3a()	Unknown
 	UE4Editor-Core.dll!00007ff8ad7b18bc()	Unknown
 	UE4Editor-CoreUObject.dll!00007ff8ad36d78b()	Unknown
 	UE4Editor-TheGame.dll!CastChecked<UPackage>(UObject * Src, ECastCheckedType::Type CheckType) Line 30	C++
>	UE4Editor-TheGame.dll!Z_Construct_UPackage_TheGame() Line 74	C++
 	UE4Editor-TheGame.dll!FExampleDataTable::StaticStruct() Line 18	C++
 	UE4Editor-CoreUObject.dll!00007ff8ad4a28d4()	Unknown
 	UE4Editor-CoreUObject.dll!00007ff8ad49697d()	Unknown
 	UE4Editor-CoreUObject.dll!00007ff8ad3d29aa()	Unknown
 	UE4Editor-Core.dll!00007ff8ad6cbdaf()	Unknown
 	UE4Editor-Core.dll!00007ff8ad7b111b()	Unknown
 	UE4Editor-Projects.dll!00007ff8b9dc4103()	Unknown
 	UE4Editor-Projects.dll!00007ff8b9dc431d()	Unknown
 	UE4Editor.exe!FEngineLoop::LoadStartupModules() Line 1765	C++
 	UE4Editor.exe!FEngineLoop::PreInit(const wchar_t * CmdLine) Line 1322	C++
 	UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 112	C++
 	UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 196	C++
 	[External Code]	

It look like StaticFindObjectFast called in Z_Construct_UPackage_TheGame in TheGame.gernerated.cpp returned NULL.

	UPackage* Z_Construct_UPackage_TheGame()
	{
		static UPackage* ReturnPackage = NULL;
		if (!ReturnPackage)
		{
			ReturnPackage = CastChecked<UPackage>(StaticFindObjectFast(UPackage::StaticClass(), NULL, FName(TEXT("/Script/TheGame")), false, false));
			ReturnPackage->PackageFlags |= PKG_CompiledIn | 0x00000000;
			FGuid Guid;
			Guid.A = 0x7DA723BD;
			Guid.B = 0x2C1E39E5;
			Guid.C = 0x00000000;
			Guid.D = 0x00000000;
			ReturnPackage->SetGuid(Guid);
		}
		return ReturnPackage;
	}

How do I fix that?
My ExampleDataTable.h:

/** Structure that defines an example data table entry */
USTRUCT(BlueprintType)

struct FExampleDataTable : public FTableRowBase
{
	GENERATED_USTRUCT_BODY()
public:
	/** Id of the row */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Example)
	FName EntryId;

	/** Value01 */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Example)
	int32 Value01;

	/** Value02 */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Example)
	int32 Value02;

	/** Value03 */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Example)
	int32 Value03;
};

Ok I managed to fix this by my self. The solution is that there has to be at least one class derived from a Unreal class in the project.

After adding a DummyActor class, every thing is running fine.

Ok !! thank you for the answer.
I think it must be reported as an issue, it is common if you start a blueprint project then you add a native struct/enum later…

Hi,

Just to clarify, were you trying to add a struct to a Blueprint-only project and you experienced this crash?

I think I had a similiar error. Custom struct for .CSV data table row is the only C++ code in my project. It contained only one UProperty - an FString.

I was using a ‘Get Data Table Row’ function on it. It worked fine. After opening the project again, pins detached, with strange errors. Several days later (and I don’t know what changed) the project crashed every time on startup.

To clarify: My row names were names like ‘abc’, not numbers, all lowercase.

Maybe this is related? https://answers.unrealengine.com/questions/88910/table-row-base-handles-disappear-if-you-open-proje.html?sort=oldest

It was also similar to this: Driving Gameplay with Data from Excel - Announcements - Unreal Engine Forums

Hi Oskar,

Would you be able to post all of the code in the header file where you set up your struct?

Hey Oskar-

Are you still experiencing an issue with setting up the .csv data table in the latest version of the engine? If so could you post the code in the header file where you setup the struct?

Hi Oskar,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.