AudiokineticのコミュニティQ&Aは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]
Radek Karnik (990 ポイント) 2021 3/17 質問 General Discussion
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.
Gustav L. (250 ポイント) 2021 6/16 回答
...