DataTable::FindRow Error and crash in packaged version

Thanks for pay attendtion.
I have a problem ,in packaged version,my game crash because of UDataTable::FindRow.but it doesn’t occur always.it’s a skill datatable,it works well at start,but a few minutes later,it crash.

below is crash log:
[2022.08.14-09.22.48:916][476]LogWindows: Error: === Critical error: ===
[2022.08.14-09.22.48:916][476]LogWindows: Error:
[2022.08.14-09.22.48:916][476]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff
[2022.08.14-09.22.48:916][476]LogWindows: Error:
[2022.08.14-09.22.48:916][476]LogWindows: Error: [Callstack] 0x00007ff65016fbf7 XMXXZ.exe!UDataTable::FindRow() [D:\UE4\UE_4.26\Engine\Source\Runtime\Engine\Classes\Engine\DataTable.h:210]
[2022.08.14-09.22.48:916][476]LogWindows: Error: [Callstack] 0x00007ff650177424 XMXXZ.exe!AXMXXZCharacter::castSkill() [E:\UE4 projects\XMXXZ\Source\XMXXZ\XMXXZCharacter.cpp:845]
[2022.08.14-09.22.48:916][476]LogWindows: Error: [Callstack] 0x00007ff650178fce XMXXZ.exe!AXMXXZCharacter::checkPreInputValue() [E:\UE4 projects\XMXXZ\Source\XMXXZ\XMXXZCharacter.cpp:559]
[2022.08.14-09.22.48:916][476]LogWindows: Error: [Callstack] 0x00007ff65017a684 XMXXZ.exe!AXMXXZCharacter::mouseClick() [E:\UE4 projects\XMXXZ\Source\XMXXZ\XMXXZCharacter.cpp:511]
[2022.08.14-09.22.48:916][476]LogWindows: Error: [Callstack] 0x00007ff65436e402 XMXXZ.exe!FInputActionUnifiedDelegate::Execute() []

Only paste the last few logs.
in function castSkill,


here used a datatable ownedSkills ,which was assignment at beginplay.
ownedSkills = LoadObject(NULL, UTF8_TO_TCHAR(“DataTable’/Game/BP/skillBP/ownedSkills.ownedSkills’”));

here is UDataTable.h:210

it not always crash,and never happen in UE4 editor.
Only occur sometime in windows package.
i am totally no idea how to fix it…And will be very appriciate for any guide or help,thank you!

Hey WilliamXu,

Just had the same issue in my project and managed to fix it, but im not sure the same fix will apply to your error.
The source of the problem is that the Data Table pointer is invalid for one reason or another (its the 0xfffffffffff). In my case, i had a blueprint function library function that fetched a data table. In order to avoid fetching the data table over and again i saved it in a variable. Since the BFL functions need to be static, so does the variable, but in editor between game starts the Objects i saved static pointers to were deleted, yet the pointers were never invalidated.

Like state previously, im unsure if that’s any way relevant to your problem, but maybe it can help you find the issue. Try to check and make sure that your data table pointer is 100% a valid object pointer.

1 Like

Thank you FUIbricht!
I fix it the next day,want to report here but be disturbed then forgeted…
That’s a GC problem,DataTable variable will be GC after a short time,as I know it’s two way to avoid this.One is AddToRoot() Manually,like this:

ownedSkills = LoadObject(NULL, UTF8_TO_TCHAR(“DataTable’/Game/BP/skillBP/ownedSkills.ownedSkills’”));
ownedSkills->AddToRoot();

Keep it in system memory,so variable won’t be GC.
Second is using UPROPERTY() modification,that will keep it too.
You save it in a variable in BP,I think it’s the same like this.A BP vairable is almost the same to a C++ variable modificated by UPROPERTY(EditAnywhere, BlueprintReadWrite).

But still ,Thank you~^-^