I've just come across the same issue reported by reini99, having upgraded from 4.25.1 to 4.26. We have source code so I've done some digging and it seems that we have 4 substance textures that have headers but no bulk data.
The USubstanceTexture2D::SerializeCurrent function reads the header correctly and claims to have 11 mip levels.
The call into SerializeTexture2DMip for this 0th mip crashes in this call: mip.BulkData.Serialize(Ar, Owner, MipIdx);
Inside FUntypedBulkData::Serialize the Ar << BulkDataFlags at line 936 crashes because it's already at the end of the file. The files are all 3648 bytes long. I have no idea how the artists have generated such broken files. (All of the broken textures are _metallic, not sure if that's relevant.)
I went back to the previous UE4 version (at great personal expense - what a nightmare) to see why it didn't used to crash. The reason is simply that it never tries to load those texures. If I double click on one of them then it does indeed crash.
I'm planning to add some code to just bail out of the serialization when this case is detected, maybe you guys can do the same.
-----------------------------------
Update, I'm back up and running by adding these lines:
SubstanceTexture2D.cpp, line 122:
void USubstanceTexture2D::SerializeCurrent(FArchive& Ar)
{
...
if (Ar.IsLoading())
{
NumMips -= FirstMipToSerialize;
Mips.Empty(NumMips);
if (Ar.Tell() == (Ar.TotalSize() - 4)) NumMips = 0; <<<<<<<<<<< added this
for (int32 MipIndex = 0; MipIndex < NumMips; ++MipIndex)
{
Mips.Add(new FTexture2DMipMap);
SerializeTexture2DMip(Mips[MipIndex], Ar, this, MipIndex);
}
}
Also had do add this to SubstanceGraphInstance.cpp (line 229) - no idea why:
bool USubstanceGraphInstance::GraphRequiresUpdate()
{
...
if (Instance) <<<<<<<<<<< added this
for (USubstanceTexture2D* TexItr : AllSubstanceTextures)
{
if (Instance->findOutput(TexItr->mUid) && TexItr->ParentInstance == this)
{
return true;
}
}