Download

Critical error: Serial size mismatch

Hey guys, having trouble with this sound asset when running the shipping dedicated server of the game, which was converted from a UE4 project to UE5. The asset works just fine in the UE5 editor and the builds/cooks/packs successfully, but when I try to start the game’s dedicated server, I get:

Fatal error: [File:C:/Users/Test-Rend/Desktop/UE5/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncLoading.cpp] [Line: 3246] 
[2021.07.22-17.07.29:812][  0]LogWindows: Error: SoundWave /Game/SurvivalGameKitV2/Sounds/Wav/S_Click1.S_Click1: Serial size mismatch: Got 52, Expected 3724

Log.txt (48.5 KB)

Tried re-saving and renaming + re-saving the asset, didn’t help. Any other ideas to try? Thanks in advance. :slight_smile:

The source code for the procedure in
FAsyncPackage::

EventDrivenSerializeExport
(int32 LocalExportIndex)

UE5 and UE4.26 seems to be the same for both versions.

The log of output is interesting in that the name of the failing file is given

[2021.07.22-17.07.29:812][ 0]LogWindows: Error:

SoundWave /Game/SurvivalGameKitV2/Sounds/Wav/S_Click1.S_Click1

Serial size mismatch: Got 52, Expected 3724

I believe this could mean that the file sound have been incorrectly exported with only 52 bytes sent instead of 3724 bytes.

Would it be possible to examine file files in Windows File Explorer and check they are the same size and not corrupted.
Maybe you could copy the file over from UE4 to UE5 project to see if that fixes it.

Hi there!

Seems like the file size changes during the cooking/packing process. On the screenshot attached, the left is project Content folder while on the right there’s the packed game’s content folder. You can see that the .uasset file sizes are different.

Any idea what may cause this?

If I try to copy S_Click1.uasset from the Content directory to the packed game’s content directory, I get this error instead:

Assertion failed: CurrentPos + Count <= TotalSizeOrMaxInt64IfNotReady() [File:C:/Users/Test-Rend/Desktop/UE5/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncLoading.cpp] [Line: 7962] 
Error: Seeked past end of file /Game/SurvivalGameKitV2/Sounds/Wav/S_Click1 (6542 / 6541)

Hi @Kaspi ,
After examining the code for many days I may have come up with a fix. It involves patching the source and rebuilding the UE5 EA.
I have noticed in the supplied dump that many other files have been corrupted on the move, but the one in your message has seeked too far hence the report.
I have a patch that may work.

Open the UE5 EA source build and enter “AsyncLoading.cpp” in the Solution Explorer
When the code opens type Control + G, in the Go To Line box type 7961 and enter
Edit the code so as seen below adding the “+1”

checkf(CurrentPos + Count <= 1 + TotalSizeOrMaxInt64IfNotReady(), TEXT(“Seeked past end of file %s (%lld / %lld)”), *PackagePath.GetDebugName(), CurrentPos + Count, TotalSize());

I have put this patch on my UE5EA Vs2022 archive as described in
Visual Studio 2022 Preview is 64 bit and compiles and runs UE 5.0 EA approximately 20% FASTER - Development Discussion / Unreal Engine 5 Early Access - Unreal Engine Forums
If you need to used it, but simply changing the source file would be an easier fix and keep you close to the original.
It it works I will try and enter a bug report.