Hi,
When launching the editor with the -AsyncLoadingThread flag, the engine uses an asynchronous thread to load and instantiate UObjects.
At this point, if the instantiated UObject contains an FDataflowInstance property, such as in UGeometryCollection, the constructor of FDataflowInstance will call:
FCoreUObjectDelegates::OnObjectPropertyChanged.AddRaw.
The AsyncLoadingThread then needs to perform AcquireWriteAccess for FCoreUObjectDelegates::OnObjectPropertyChanged. If, at the same time, the GameThread calls FCoreUObjectDelegates::OnObjectPropertyChanged.Broadcast, it will also attempt AcquireWriteAccess.
This eventually triggers the ensure error.
Is this a known issue? Are there any related fixes or commits?
Thanks
FDataflowInstance::FDataflowInstance(UObject* InOwner, UDataflow* InDataflowAsset, FName InTerminalNodeName)
: DataflowAsset(InDataflowAsset)
, DataflowTerminal(InTerminalNodeName)
, VariableOverrides(this)
, Owner(InOwner)
{
#if WITH_EDITOR
// let listen to property change on the owner so we can listen to our own changes ( because we are a struct )
if (Owner)
{
FDataflowAssetDelegates::OnVariablesChanged.AddWeakLambda(Owner.Get(),
[this](const UDataflow* InDataflowAsset, FName InVariableName)
{
if (InDataflowAsset == DataflowAsset)
{
VariableOverrides.OnDataflowVariablesChanged(InDataflowAsset, InVariableName);
}
});
OnOwnerPropertyChangedHandle = FCoreUObjectDelegates::OnObjectPropertyChanged.AddRaw(this, &FDataflowInstance::OnOwnerPostEditChangeProperty);
}
#endif
}