在 Audiokinetic 社区问答论坛上,用户可对 Wwise 和 Strata 相关问题进行提问和解答。如需从 Audiokinetic 技术支持团队获取答复,请务必使用技术支持申请单页面。

Unreal Engine - error when generating sound data

+3 投票
Hello,

we are getting this error when generating sound data in UE 4.26 (Wwise 2021.10).  Does anyone else have same problem? We don't use event based packaging.

 

Assertion failed: IsInGameThread() [File:B:/UnrealEngineSourceBuild/Engine/Source/Runtime/Engine/Private/StreamableManager.cpp] [Line: 584]

UE4Editor_Core!AssertFailedImplV() [b:\unrealenginesourcebuild\engine\source\runtime\core\private\misc\assertionmacros.cpp:102]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [b:\unrealenginesourcebuild\engine\source\runtime\core\private\misc\assertionmacros.cpp:458]
UE4Editor_Engine!FStreamableHandle::ReleaseHandle() [b:\unrealenginesourcebuild\engine\source\runtime\engine\private\streamablemanager.cpp:584]
UE4Editor_AudiokineticTools!AkSoundDataBuilder::~AkSoundDataBuilder() [D:\Dev\payback-game\Plugins\Wwise\Source\AudiokineticTools\Private\AssetManagement\AkSoundDataBuilder.cpp:95]
UE4Editor_AudiokineticTools!<lambda_98943428dbac4f04fd156ca3b2654230>::~<lambda_98943428dbac4f04fd156ca3b2654230>()
UE4Editor_AudiokineticTools!UE4Function_Private::TFunction_UniqueOwnedObject<<lambda_98943428dbac4f04fd156ca3b2654230>,1>::`scalar deleting destructor'()
UE4Editor_AudiokineticTools!UE4Function_Private::IFunction_OwnedObject_OnHeap<<lambda_98943428dbac4f04fd156ca3b2654230> >::Destroy() [D:\Dev\UnrealEngine\Engine\Source\Runtime\Core\Public\Templates\Function.h:148]
UE4Editor_AudiokineticTools!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),0> >::ExecuteTask() [D:\Dev\UnrealEngine\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:887]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasks() [b:\unrealenginesourcebuild\engine\source\runtime\core\private\async\taskgraph.cpp:1065]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasksUntilQuit() [b:\unrealenginesourcebuild\engine\source\runtime\core\private\async\taskgraph.cpp:888]
UE4Editor_Core!FTaskThreadAnyThread::Run() [b:\unrealenginesourcebuild\engine\source\runtime\core\private\async\taskgraph.cpp:965]
UE4Editor_Core!FRunnableThreadWin::Run() [b:\unrealenginesourcebuild\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:86]
最新提问 3月 17, 2021 分类:General Discussion | 用户: Radek Karnik (990 分)
Same here. Really want to know.
Though we are using the event based pipeline.

1个回答

0 投票
Hi, we had this same issue. We use event based packaging and here is what we found and our approach to fix it.

The sound data builder AkSoundDataBuilder holds a handle for an asset it has loaded, this handle have to be released on the game thread as there are checks to see if IsInGameThread() is true when releasing it. We found it was released on a background thread so we fixed this by changing the code in ~AkSoundDataBuilder() to dispatch the cleanup to the game thread like below:
AkSoundDataBuilder::~AkSoundDataBuilder()
{
    // The handle can not be released on this thread, move and release it on the game thread.
    auto requestAsyncCleanupTask = FFunctionGraphTask::CreateAndDispatchWhenReady([handle = MoveTemp(loadedAssetsHandle)] {
        if (handle.IsValid())
        {
            handle->ReleaseHandle();
        }
    }, GET_STATID(STAT_EventPlatformDataEventGroup), nullptr, ENamedThreads::GameThread);
}

Hope this helps anyone else with this issue.
最新回答 6月 16, 2021 用户: Gustav L. (250 分)
...