Hi, when I pack Android(ASTC, engine version 5.5.1) and get some errors when cook resources.
It happens when build engine with Debug, and everything is fine when build with development.
here are the error logs:
UATHelper: packing (Android (ASTC)): LogInit: Display: LogShaderLibrary: Error: LandscapeMaterialInstanceConstant /Game/Maps/ActionRPG_Dungeon02_Asset/ActionRPG_Dungeon02_Asset/PersistentLevel/Landscape_0/LandscapeComponent_0.LandscapeMaterialInstanceConstant_0,TMobileBasePassPSFMobileDirectionalLightCSMAndLightMapPolicyLOCAL_LIGHTS_ENABLED,MeshMaterial,MD_Surface,ES3_1,Num,SF_Pixel,GLSL_ES3_1_ANDROID,FLandscapeXYOffsetVertexFactory,Perm_0,A4810763F3080A9AF3E405D3CF809F54820B5DA5,0000000000000000000000000000000000000000
The following codes causes these errors.
PipelineCacheUtilities.cpp:
bool UE::PipelineCacheUtilities::LoadStableKeysFile(const FStringView& Filename, TArray& InOutArray)
{
…
// Standardize on all CompactNames being parsed from string. This is a temporary hack until the names are parsed from CSV when reading StablePC
FString StringRep = Item.ClassNameAndObjectPath.ToString();
Item.ClassNameAndObjectPath.ParseFromString(StringRep);
…
}
ShaderCodeLibrary.cpp:
bool SaveToDisk(FString const& OutputDir, FString& OutSCLCSVPath)
{
…
if (!UE::PipelineCacheUtilities::SaveStableKeysFile(IntermediateFormatPath, StableMap))
{
UE_LOG(LogShaderLibrary, Error, TEXT(“Could not save stable map to file ‘%s’”), *IntermediateFormatPath);
}
// check that it works in a Debug build pm;u
if (UE_BUILD_DEBUG)
{
TArray<FStableShaderKeyAndValue> LoadedBack;
if (!UE::PipelineCacheUtilities::LoadStableKeysFile(IntermediateFormatPath, LoadedBack))
{
UE_LOG(LogShaderLibrary, Error, TEXT("Saved stable map could not be loaded back (from file '%s')"), *IntermediateFormatPath);
}
else
{
if (LoadedBack.Num() != StableMap.Num())
{
UE_LOG(LogShaderLibrary, Error, TEXT("Loaded stable map has a different number of entries (%d) than a saved one (%d)"), LoadedBack.Num(), StableMap.Num());
}
else
{
for (FStableShaderKeyAndValue& Value : LoadedBack)
{
Value.ComputeKeyHash();
if (!StableMap.Contains(Value))
{
UE_LOG(LogShaderLibrary, Error, TEXT("Loaded stable map has an entry that is not present in the saved one"));
UE_LOG(LogShaderLibrary, Error, TEXT(" %s"), *Value.ToString());
}
}
}
}
}
}
…
}
when build engine with debug, when invoke “SaveStableKeysFile”,
FStableShaderKeyAndValue.ClassNameAndObjectPath.ObjectClassAndPath has more than 3 elements,
but when invoke “LoadStableKeysFile”,
FString StringRep = Item.ClassNameAndObjectPath.ToString();
Item.ClassNameAndObjectPath.ParseFromString(StringRep);
void FCompactFullName::ParseFromString(const FStringView& InSrc) will Standardize these elements to 3.
so, “Loaded stable map has an entry that is not present in the saved one”
please help