Data race detected: acquiring write access on thread

Hi Everyone, I have been having an small issue with UE5.7.1 lately where each time that I recompile from editor I get the errors:

LogOutputDevice: Error: Ensure condition failed: UE::Private::FMTAccessDetectorOptions::bSuppressCheckFailure [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Misc\MTAccessDetector.h] [Line: 646]
Data race detected: acquiring write access on thread 6784 concurrently with 1 writers on thread 20936:
Current thread 6784 callstack:
0x0000024e2818b877 UnrealEditor-RigVMDeveloper.dll!FMRSWRecursiveAccessDetector::GetCurrentThreadCallstack() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Misc\MTAccessDetector.h:413]
0x0000024e2842398a UnrealEditor-RigVMDeveloper.dll!FMRSWRecursiveAccessDetector::AcquireWriteAccess’::17’::<lambda_4>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Misc\MTAccessDetector.h:646]
0x0000024e2816fa27 UnrealEditor-RigVMDeveloper.dll!FMRSWRecursiveAccessDetector::AcquireWriteAccess() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Misc\MTAccessDetector.h:646]
0x0000024e28196887 UnrealEditor-RigVMDeveloper.dll!TDelegateAccessHandlerBase::GetWriteAccessScope() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateAccessHandler.h:169]
0x0000024e2814bc39 UnrealEditor-RigVMDeveloper.dll!TMulticastDelegateBase::AddDelegateInstance<TDelegate<void __cdecl(enum ERigVMGraphNotifType,URigVMGraph *,UObject *),FDefaultDelegateUserPolicy> >() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\MulticastDelegateBase.h:323]
0x0000024e28388e5e UnrealEditor-RigVMDeveloper.dll!URigVMController::SetActionStack() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMModel\RigVMController.cpp:24480]
0x0000024e28302d85 UnrealEditor-RigVMDeveloper.dll!URigVMController::URigVMController() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMModel\RigVMController.cpp:136]
0x00007ffc9916f799 UnrealEditor-CoreUObject.dll!StaticConstructObject_Internal() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:4969]
0x0000024e282739e8 UnrealEditor-RigVMDeveloper.dll!FRigVMClient::CreateController() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMModel\RigVMClient.cpp:1206]
0x0000024e28292bf7 UnrealEditor-RigVMDeveloper.dll!FRigVMClient::GetOrCreateController() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMModel\RigVMClient.cpp:542]
0x0000024e281b1ea8 UnrealEditor-RigVMDeveloper.dll!IRigVMAssetInterface::SerializeImpl() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMAsset.cpp:1380]
0x00007ffc4315cb6d UnrealEditor-UnrealEd.dll!FAsyncTaskFReload::ReplaceReferencesToReconstructedCDOs’::2’::FFindRefTask::DoTaskWork() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:655]
0x00007ffc4315cc71 UnrealEditor-UnrealEd.dll!FAsyncTaskBase::DoWork() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:289]
0x00007ffc4315cbbe UnrealEditor-UnrealEd.dll!FAsyncTaskBase::DoThreadedWork() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:313]
0x00007ffc99a0e568 UnrealEditor-Core.dll!FQueuedThread::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp:1471]
0x00007ffc99e766a8 UnrealEditor-Core.dll!FRunnableThreadWin::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:159]
0x00007ffc99e6f58c UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:71]
0x00007ffd4432259d KERNEL32.DLL!UnknownFunction
0x00007ffd4536af78 ntdll.dll!UnknownFunction
Writer thread 20936 callstack:
0x00007ffd45336cf2 ntdll.dll!UnknownFunction
0x00007ffc99d08e51 UnrealEditor-Core.dll!FCurrentCustomVersions::Get() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Serialization\CustomVersion.cpp:202]
0x00007ffc99d22c1b UnrealEditor-Core.dll!FCustomVersionContainer::SetVersionUsingRegistry() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Serialization\CustomVersion.cpp:422]
0x00007ffc99d2997d UnrealEditor-Core.dll!FArchive::UsingCustomVersion() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Serialization\Archive.cpp:599]
0x00007ffc99a7df24 UnrealEditor-Core.dll!FText::SerializeText() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Internationalization\Text.cpp:862]
0x00007ffc99a7de9e UnrealEditor-Core.dll!FText::SerializeText() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Internationalization\Text.cpp:847]
0x00007ffc99cf0e7e UnrealEditor-Core.dll!FArchive::operator<<() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Serialization\Archive.cpp:472]
0x00007ffc95385cf2 UnrealEditor-Engine.dll!UEdGraphPin::Serialize() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphPin.cpp:1886]
0x00007ffc953878e3 UnrealEditor-Engine.dll!UEdGraphPin::SerializePin() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphPin.cpp:2291]
0x00007ffc95387e54 UnrealEditor-Engine.dll!UEdGraphPin::SerializePinArray() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphPin.cpp:2094]
0x00007ffc95385a73 UnrealEditor-Engine.dll!UEdGraphNode::Serialize() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphNode.cpp:260]
0x00007ffc24b60688 UnrealEditor-BlueprintGraph.dll!UK2Node::Serialize() [D:\build++UE5\Sync\Engine\Source\Editor\BlueprintGraph\Private\K2Node.cpp:137]
0x00007ffc24b6120f UnrealEditor-BlueprintGraph.dll!UK2Node_CallFunction::Serialize() [D:\build++UE5\Sync\Engine\Source\Editor\BlueprintGraph\Private\K2Node_CallFunction.cpp:2308]
0x00007ffc4315cb6d UnrealEditor-UnrealEd.dll!FAsyncTaskFReload::ReplaceReferencesToReconstructedCDOs’::2’::FFindRefTask::DoTaskWork() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:655]
0x00007ffc4315cc71 UnrealEditor-UnrealEd.dll!FAsyncTaskBase::DoWork() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:289]
0x00007ffc4315cbbe UnrealEditor-UnrealEd.dll!FAsyncTaskBase::DoThreadedWork() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:313]
0x00007ffc99a0e568 UnrealEditor-Core.dll!FQueuedThread::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp:1471]
0x00007ffc99e766a8 UnrealEditor-Core.dll!FRunnableThreadWin::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:159]
0x00007ffc99e6f58c UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:71]
0x00007ffd4432259d KERNEL32.DLL!UnknownFunction
LogStats: FDebug::EnsureFailed - 0.000 s
LogOutputDevice: Error: Ensure condition failed: UE::Private::FMTAccessDetectorOptions::bSuppressCheckFailure [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Misc\MTAccessDetector.h] [Line: 661]
Data race detected: other thread(s) activity during acquiring write access on thread 6784: 0 → 0 readers, 1 → 0 writers on thread 20936 → 4294967295:
Current thread 6784 callstack:
0x0000024e2818b877 UnrealEditor-RigVMDeveloper.dll!FMRSWRecursiveAccessDetector::GetCurrentThreadCallstack() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Misc\MTAccessDetector.h:413]
0x0000024e28423b00 UnrealEditor-RigVMDeveloper.dll!FMRSWRecursiveAccessDetector::AcquireWriteAccess’::20’::<lambda_5>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Misc\MTAccessDetector.h:661]
0x0000024e2816fa8c UnrealEditor-RigVMDeveloper.dll!FMRSWRecursiveAccessDetector::AcquireWriteAccess() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Misc\MTAccessDetector.h:670]
0x0000024e28196887 UnrealEditor-RigVMDeveloper.dll!TDelegateAccessHandlerBase::GetWriteAccessScope() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateAccessHandler.h:169]
0x0000024e2814bc39 UnrealEditor-RigVMDeveloper.dll!TMulticastDelegateBase::AddDelegateInstance<TDelegate<void __cdecl(enum ERigVMGraphNotifType,URigVMGraph *,UObject *),FDefaultDelegateUserPolicy> >() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\MulticastDelegateBase.h:323]
0x0000024e28388e5e UnrealEditor-RigVMDeveloper.dll!URigVMController::SetActionStack() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMModel\RigVMController.cpp:24480]
0x0000024e28302d85 UnrealEditor-RigVMDeveloper.dll!URigVMController::URigVMController() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMModel\RigVMController.cpp:136]
0x00007ffc9916f799 UnrealEditor-CoreUObject.dll!StaticConstructObject_Internal() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:4969]
0x0000024e282739e8 UnrealEditor-RigVMDeveloper.dll!FRigVMClient::CreateController() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMModel\RigVMClient.cpp:1206]
0x0000024e28292bf7 UnrealEditor-RigVMDeveloper.dll!FRigVMClient::GetOrCreateController() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMModel\RigVMClient.cpp:542]
0x0000024e281b1ea8 UnrealEditor-RigVMDeveloper.dll!IRigVMAssetInterface::SerializeImpl() [D:\build++UE5\Sync\Engine\Plugins\Runtime\RigVM\Source\RigVMDeveloper\Private\RigVMAsset.cpp:1380]
0x00007ffc4315cb6d UnrealEditor-UnrealEd.dll!FAsyncTaskFReload::ReplaceReferencesToReconstructedCDOs’::2’::FFindRefTask::DoTaskWork() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:655]
0x00007ffc4315cc71 UnrealEditor-UnrealEd.dll!FAsyncTaskBase::DoWork() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:289]
0x00007ffc4315cbbe UnrealEditor-UnrealEd.dll!FAsyncTaskBase::DoThreadedWork() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:313]
0x00007ffc99a0e568 UnrealEditor-Core.dll!FQueuedThread::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp:1471]
0x00007ffc99e766a8 UnrealEditor-Core.dll!FRunnableThreadWin::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:159]
0x00007ffc99e6f58c UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:71]
0x00007ffd4432259d KERNEL32.DLL!UnknownFunction
0x00007ffd4536af78 ntdll.dll!UnknownFunction
Writer thread 4294967295 callstack:
[none]

I’m not sure why this is happening, if anyone can take a guess of what the cause of this is, I would really like to hear about it.

Hello there @WolfAlvein!

Checking with my peers, this issue can happen if any editors tied to RigVM are left open during compilation (Control Rig, IK Rig, etc).

Additionally, the error can be generated by stale/corrupt cache data. Please navigate to your project’s main directory, and delete folders Intermediate, Saved, and DerivedDataCache. After that, allow the project to regenerate, then test compiling again, with all editors closed.