Hello,
We are migrating from 5.5.4 to 5.6.0 and encountered a crash during cooking: “Cannot generate proxies/runtime graph when execution is not enabled.” with the following call stack that prevents us from proceeding with the migration. I believe the changes in void UMetaSoundAssetSubsystem::PostInitAssetScanInternal() are the main cause. However, I am unsure how to resolve this issue. Perhaps you are already aware of this crash and have a changelist with a fix?
Thank you for any assistance.
Regards,
Igor.
call stack:
> UnrealEditor-MetasoundFrontend-Win64-Debug.dll!FMetasoundAssetBase::UpdateAndRegisterForExecution(Metasound::Frontend::FMetaSoundAssetRegistrationOptions InRegistrationOptions) Line 295 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!UMetaSoundSource::UpdateAndRegisterForExecution(Metasound::Frontend::FMetaSoundAssetRegistrationOptions InRegistrationOptions) Line 936 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!UMetaSoundAssetSubsystem::PostInitAssetScanInternal::__l5::<lambda_2>::()::__l2::<lambda_1>::operator()(FMetaSoundAssetKey __formal, UObject & AssetObject) Line 1464 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!``UMetaSoundAssetSubsystem::PostInitAssetScanInternal'::
5’::<lambda_2>::operator()‘::2'::<lambda_1>::<lambda_invoker_cdecl>(FMetaSoundAssetKey __p1, UObject & AssetObject) Line 1465 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefCaller<void (__cdecl*)(FMetaSoundAssetKey,UObject &),void,FMetaSoundAssetKey,UObject &>::Call(void * Obj, FMetaSoundAssetKey & <Params_0>, UObject & <Params_1>) Line 322 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<0>,void __cdecl(FMetaSoundAssetKey,UObject &)>::operator()(FMetaSoundAssetKey <Params_0>, UObject & <Params_1>) Line 472 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!Metasound::Engine::FMetaSoundAssetManager::AddOrLoadAndUpdateFromObjectAsync(const FAssetData & InAssetData, TFunction<void __cdecl(FMetaSoundAssetKey,UObject &)> && OnUpdatedAssetLoaded) Line 268 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!UMetaSoundAssetSubsystem::PostInitAssetScanInternal::__l5::<lambda_2>::operator()(const FAssetData & AssetData) Line 1453 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefCaller<
UMetaSoundAssetSubsystem::PostInitAssetScanInternal’::5'::<lambda_2>,void,FAssetData const &>::Call(void * Obj, const FAssetData & <Params_0>) Line 322 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!Metasound::Engine::FMetaSoundAssetManager::SearchAndIterateDirectoryAssets::__l2::<lambda_1>::operator()(UClass & RegisteredClass) Line 1165 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefCaller<
Metasound::Engine::FMetaSoundAssetManager::SearchAndIterateDirectoryAssets’::2'::<lambda_1>,void,UClass &>::Call(void * Obj, UClass & <Params_0>) Line 322 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!Metasound::FMetasoundUObjectRegistry::IterateRegisteredUClasses(TFunctionRef<void __cdecl(UClass &)> InFunc, bool bAssetTypesOnly) Line 87 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!Metasound::Engine::FMetaSoundAssetManager::SearchAndIterateDirectoryAssets(const TArray<FDirectoryPath,TSizedDefaultAllocator<32>> & InDirectories, TFunctionRef<void __cdecl(FAssetData const &)> InFunction) Line 1156 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!UMetaSoundAssetSubsystem::PostInitAssetScanInternal() Line 1466 C++ UnrealEditor-MetasoundEngine-Win64-Debug.dll!TBaseUObjectMethodDelegateInstance<0,UMetaSoundAssetSubsystem,void __cdecl(void),FDefaultDelegateUserPolicy>::ExecuteIfSafe() Line 691 C++ UnrealEditor-Engine-Win64-Debug.dll!TMulticastDelegateBase<FDefaultDelegateUserPolicy>::Broadcast<IBaseDelegateInstance<void __cdecl(void),FDefaultDelegateUserPolicy>>() Line 258 C++ UnrealEditor-Engine-Win64-Debug.dll!UAssetManager::PostInitialAssetScan() Line 3719 C++ UnrealEditor-Engine-Win64-Debug.dll!UAssetManager::OnAssetRegistryFilesLoaded() Line 4064 C++ UnrealEditor-Engine-Win64-Debug.dll!TBaseUObjectMethodDelegateInstance<0,UAssetManager,void __cdecl(void),FDefaultTSDelegateUserPolicy>::ExecuteIfSafe() Line 691 C++ UnrealEditor-AssetRegistry-Win64-Debug.dll!TMulticastDelegateBase<FDefaultTSDelegateUserPolicy>::Broadcast<IBaseDelegateInstance<void __cdecl(void),FDefaultTSDelegateUserPolicy>>() Line 258 C++ UnrealEditor-AssetRegistry-Win64-Debug.dll!UAssetRegistryImpl::Broadcast(UE::AssetRegistry::Impl::FEventContext & EventContext, bool bAllowFileLoadedEvent) Line 9863 C++ UnrealEditor-AssetRegistry-Win64-Debug.dll!UAssetRegistryImpl::WaitForCompletion() Line 2139 C++ UnrealEditor-UnrealEd-Win64-Debug.dll!UCookOnTheFlyServer::BlockOnAssetRegistry(TArrayView<FString const ,int> CommandlinePackages) Line 7993 C++ UnrealEditor-UnrealEd-Win64-Debug.dll!UCookOnTheFlyServer::StartCookByTheBook(const UCookOnTheFlyServer::FCookByTheBookStartupOptions & CookByTheBookStartupOptions) Line 10938 C++ UnrealEditor-UnrealEd-Win64-Debug.dll!UCookCommandlet::RunCookByTheBookCook(UCookOnTheFlyServer * CookOnTheFlyServer, void * StartupOptionsAsVoid, ECookByTheBookOptions CookOptions) Line 591 C++ UnrealEditor-UnrealEd-Win64-Debug.dll!UCookCommandlet::CookByTheBook(const TArray<ITargetPlatform *,TSizedDefaultAllocator<32>> & Platforms) Line 550 C++ UnrealEditor-UnrealEd-Win64-Debug.dll!UCookCommandlet::Main(const FString & CmdLineParams) Line 268 C++ UnrealEditor-Win64-Debug.exe!FEngineLoop::PreInitPostStartupScreen(const wchar_t * CmdLine) Line 3860 C++ UnrealEditor-Win64-Debug.exe!FEngineLoop::PreInit(const wchar_t * CmdLine) Line 4159 C++ UnrealEditor-Win64-Debug.exe!EnginePreInit(const wchar_t * CmdLine) Line 40 C++ UnrealEditor-Win64-Debug.exe!GuardedMain(const wchar_t * CmdLine) Line 143 C++ UnrealEditor-Win64-Debug.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 271 C++ UnrealEditor-Win64-Debug.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 339 C++ [Inline Frame] UnrealEditor-Win64-Debug.exe!invoke_main() Line 102 C++ UnrealEditor-Win64-Debug.exe!__scrt_common_main_seh() Line 288 C++ kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown
Yes, we’ve hit this crash internally. I believe the fix is in this code change: https://github.com/EpicGames/UnrealEngine/commit/967f7e4642802659102d1b9bdb340525e3f89072
There are a few other changes in that CL that aren’t necessarily related to the crash. The key is to avoid calling `UpdateAndRegisterForExecution()` in a cook commandlet. You can see the callsite is protected in the CL with a `if (!IsRunningCookCommandlet())`.
I spoke to the dev who implemented that fix. Our repro was that the metasound settings had values set in “Directories To Register”. Can you confirm that you have values there? Clearing them out seems to be the simplest fix in the short term.
If “Directories To Register” was already empty, let us know as that might point to a different issue.
Yeah, we have this line +DirectoriesToRegister=(Path=“/Game/Sounds”) in our config, but I’m not sure why it’s needed or what might happen if we remove it. Could you find out more information about this?
In the early days of metasounds, registering UMetaSoundPatch/UMetaSoundSource was slow when using the UE Editor in large projects. The “DirectoriesToRegister” was meant to fine-tune which metasound assets would be opened and regsitered during editor load especially if you had a particularly large project with many game plugins.
It’s not really needed anymore due to the improvements on editor loading and metasound utilizing the asset registry to register metasound assets in the metasound editor.