Download

UMaterialInstance::PostLoad assert. Help needed to understand why

Hello,

Getting this assert, but very rarely (cannot repro on dev machine):
check(!Parent->HasAnyFlags(RF_NeedLoad));
in here:
void UMaterialInstance::PostLoad()

// Ensure that the instance's parent is PostLoaded before the instance.
if(Parent)
{

#if !WITH_EDITORONLY_DATA
check(!Parent->HasAnyFlags(RF_NeedLoad));
#endif
Parent->ConditionalPostLoad();
}

It happens during async loading of assets. Tried splitting async request into loading individual assets, but that did not help.
Obviously it asserts because parent was not loaded yet. But I don’t understand how that can happen.

Maybe someone else had similar issue by any chance?

Using unreal engine 4.14.1

Full call stack:
PWNDClient.exe!FDebug::AssertFailed(const char * Expr, const char * File, int Line, const wchar_t * Format, …) Line 332 C++
> PWNDClient.exe!UMaterialInstance::PostLoad() Line 1990 C++
PWNDClient.exe!UObject::ConditionalPostLoad() Line 834 C++
PWNDClient.exe!UMaterialInstance::PostLoad() Line 1994 C++
PWNDClient.exe!UObject::ConditionalPostLoad() Line 834 C++
PWNDClient.exe!UMaterialInstance::PostLoad() Line 1994 C++
PWNDClient.exe!UObject::ConditionalPostLoad() Line 834 C++
PWNDClient.exe!FAsyncPackage::PostLoadObjects() Line 5405 C++
PWNDClient.exe!FAsyncPackage::TickAsyncPackage(bool InbUseTimeLimit, bool InbUseFullTimeLimit, float & InOutTimeLimit, FFlushTree * FlushTree) Line 4544 C++

Any ideas or suggestions would be highly appreciated!