BuildPatchTool crashes when trying to run BinaryDeltaOptimise

As the subject says, we’re trying to run BinaryDeltaOptimise in BPT as shown in the documentation and it immediately crashes out with no useful errors. Any help appreciated.

S:\sn2-main>Tools\BuildPatchTool\Engine\Binaries\Win64\BuildPatchTool.exe -OrganizationId="<REDACTED>" -ProductId="<REDACTED>" -ArtifactId="<REDACTED>" -ClientId="<REDACTED>" -ClientSecret="<REDACTED>" -mode=BinaryDeltaOptimise -BuildVersionA="607_SHIPPING_RELEASEHOTFIX_CL-121347" -BuildVersionB="2967_STAGE_CL-123362" -CloudDir=".\CloudDir"
BUILDPATCHTOOL v1.8.7-56187695+++UE5+Release-BPT-5.5
Copyright Epic Games, Inc. All Rights Reserved.

Running optimisation for patching 607_SHIPPING_RELEASEHOTFIX_CL-121347 -> 2967_STAGE_CL-123362
Using MinCompressionPct=10
Using MinCompressionBytes=65536
Creating thread CloudChunkSourceFactory #0
Creating thread CloudChunkSourceFactory #1
Creating thread CloudChunkSourceFactory #0
Creating thread CloudChunkSourceFactory #1
appError called: Assertion failed: Size > 0 [File:D:\build\++Distro\Sync\Engine\Source\Runtime\Online\BuildPatchServices\Private\Core\BlockRange.h] [Line: 17]
Using GetFirst for a 0 size range is invalid.

appError called: Assertion failed: Size > 0 [File:D:\build\++Distro\Sync\Engine\Source\Runtime\Online\BuildPatchServices\Private\Core\BlockRange.h] [Line: 17]
Using GetFirst for a 0 size range is invalid.

Error reentered: Assertion failed: Ptr [File:D:\build\++Distro\Sync\Engine\Source\Runtime\Core\Public\Misc\LazySingleton.h] [Line: 109]


Runnable thread HttpManagerThread crashed.

S:\sn2-main



[Attachment Removed]

Steps to Reproduce

  1. Run BuildPatchTool v1.8.7 in BinaryDeltaOptimise mode
  2. Note immediate crash out
    [Attachment Removed]

Hello, I have raised this with the BuildPatchTool team for further investigation, but I was able to confirm that the trigger for this crash is zero-byte files in the builds.

I ran the GetBinaryMetadata command for these two build versions and confirmed that each contains a file named `CompatibleBuildNumber` with a file size of “0”.

Unfortunately, the only workaround I can think of at this time is to exclude this file from your builds, though you may require it.

I will let you know as soon as I have an update from the team.

[Attachment Removed]

Thanks for the update! We actually don’t need that file any more, so I’ll get it removed from our future builds, but glad we could accidentally surface a bug!

[Attachment Removed]