Crash on Android after using UDataTable->GetRowNames()

Unreal Engine 5.5.3
Android 13,level 33
arm64-v8a
Samsung Galaxy S20 5G (SM-G981U)

I have a UDatatable* DT_Gift, and configured the data. The data was successfully loaded in PIE, but when I packaged it and ran it on an Android phone, executing auto RowNames = DT_Gift->GetRowNames() always caused a crash.

Below is the crash log:

Fatal error: [File:./Runtime/Core/Private/Containers/ContainerHelpers.cpp] [Line: 14]
Trying to resize TSet to an invalid size of 18446744073709551612
[Callstack] 0x0000006C7D277B10 libUnreal.so(0x000000000AB40B10)!FContainersSmokeTest::RunTest(FString const&)
[Callstack] 0x0000006C833F80FC libUnreal.so(0x0000000010CC10FC)!int TMapBase<FName, unsigned char*, FDefaultSetAllocator, TDefaultMapHashableKeyFuncs<FName, unsigned char*, false> >::GetKeys<TSizedDefaultAllocator<32> >(TArray<FName, TSizedDefaultAllocator<32> >&) const
[Callstack] 0x0000006C84B2006C libUnreal.so(0x00000000123E906C)!UGameSubsystem::NewSave()

Below is the code:

	if (DT_Gift)
	{
		auto RowNames = DT_Gift->GetRowNames();
		UE_LOG(LogTemp, Error, TEXT("RowNames Num: %d"), RowNames.Num());
	}

Does anyone know what’s going on and how to solve it?

Hi there @wyn_n

Is this the same issue that you’re running into? Trying to resize TArray to an invalid size of 2147562356 - UE5 crash loading high poly scan If so, check the solution provided there. If not, let me know!

Thank you for your reply. Later I found that the problem was caused by an error in loading datatable, so datatable->getrownames() reported an error, indicating that I didn’t know why datatable!=nullptr was true, so I misunderstood that there was no problem with datatable. Now the problem has been solved.

Oh, right on! Well, I’m happy that you found a solution!