DataTable that based on a C++ FTableRowBase child from a plugin crashes upon cook (UE5)

I have a struct that is defined in a custom plugin:

USTRUCT(BlueprintType, Blueprintable)
struct MYGAME_API FMySTRUCT : public FTableRowBase

I created a DataTable of that row type. It’s filled out and works fine from an editor build. However, as soon as I cook, the game will crash with


Looking at the log I see

[2022.04.29-11.44.23:662][  0]LogDataTable: Error: Missing RowStruct while emptying DataTable '/Game/dtMyTable.dtMyTable'!
[2022.04.29-11.44.23:664][  0]LogDataTable: Error: Missing RowStruct while loading DataTable '/Game/dtMyTable.dtMyTable'!

I’m guessing the cooked build isn’t finding FMySTRUCT or FMySTRUCT isn’t cooking for some reason. The plugin itself is cooked and running. Anyone have an idea?

Does the error still occur if you delete your Data Table asset and create a new one? You should be able to export your data to JSON/CSV format so you don’t lose it.

Assuming no other bugs, there’s a chance your Data Table asset is referencing an old or incorrect version of the underlying data structure. I’d check for the following:

  • Is the struct defined in C++? Does it exist in the same module as your Data Table?
  • Did you rename your struct? Do you have a redirector in place on your .ini file?
  • Are you using Editor modules or plugins in your code? Is your struct or data table defined in one? Are these being cooked along with the rest of your project?

Creating a new version of the DataTable from scratch after moving to 5.0 had the same issue.

FMyStruct is a c++ struct and is defined in a game plug-in. The plug-in’s module is in PublicDependencyModuleNames. The plugin is cooking and runs fine in the cook build. And I have a version of the code that bypasses the Datatable and that version has now problem with FMyStruct directly. It’s just the cook datatable.

I haven’t had time to try and reproduce just cooking a plug-in based TableRowBase in a project that relies on it.

Ok, this is can either be a dependency issue with the Game Feature plugin or a deeper issue with the Cooker. I’m not entirely clear on where the Data Table lives in relation to the plugin, so assuming they exist on different modules. Let’s rule out this case first:

  • Move the data table to the same plugin that defines the native struct. Check if it cooks correctly.
  • If the above works, you should be able to move the Struct to your main game module as a temporary workaround to help the Cooker resolve the data type reference.

I know this is an older thread, but I’m having a similar issue that may help provide more insight on what’s actually happening.

I recently upgraded a work project from 4.23 - 4.27. After cleaning up our include paths to handle the new cooking methodology, one of data tables appears to have lost it’s row structure.

We have the same errors (Obviously for a different asset), the main difference is in our project the C++ struct that is used for the Table lives in the same module as the table itself. So I’m not sure this is a plugin location issue.

I tried simply moving the table to a new folder as an attempt at your suggested solution but that only results in crashing my editor before it can save that I’ve moved the asset.

Upon further inspection I discovered when I open the Data Table in the Editor that it both does and does not know what it’s row struct is. (See Attached File.)

I’m not sure what happened as I can find no issues with the struct itself, but these errors are the only things stopping a successful package at the moment.

1 Like

Yea, I was never able to find the solution so I just re-engineered to work around it. I think it’s a deeper problem somewhere in the cooking code. Sorry I cant’ be more helpful.

This log entry popped up for me after moving a c++ struct from one package to another (project to plugin) without a proper Core Redirect. I restored the project from Git at that point just to be sure, added a Core Redirect and continued working without errors.

1 Like